{"id":21882296,"url":"https://github.com/bfssi-bioinformatics-lab/flaime","last_synced_at":"2026-04-11T07:37:07.792Z","repository":{"id":37860319,"uuid":"202194731","full_name":"BFSSI-Bioinformatics-Lab/flaime","owner":"BFSSI-Bioinformatics-Lab","description":"Web app for monitoring the online food landscape","archived":false,"fork":false,"pushed_at":"2024-10-09T00:37:57.000Z","size":129644,"stargazers_count":0,"open_issues_count":19,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-03-22T01:15:07.373Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BFSSI-Bioinformatics-Lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-13T17:40:22.000Z","updated_at":"2024-07-26T18:35:44.000Z","dependencies_parsed_at":"2024-07-26T21:29:14.567Z","dependency_job_id":null,"html_url":"https://github.com/BFSSI-Bioinformatics-Lab/flaime","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BFSSI-Bioinformatics-Lab/flaime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BFSSI-Bioinformatics-Lab%2Fflaime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BFSSI-Bioinformatics-Lab%2Fflaime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BFSSI-Bioinformatics-Lab%2Fflaime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BFSSI-Bioinformatics-Lab%2Fflaime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BFSSI-Bioinformatics-Lab","download_url":"https://codeload.github.com/BFSSI-Bioinformatics-Lab/flaime/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BFSSI-Bioinformatics-Lab%2Fflaime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271578496,"owners_count":24784051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T09:28:13.301Z","updated_at":"2026-04-11T07:37:02.749Z","avatar_url":"https://github.com/BFSSI-Bioinformatics-Lab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FLAIME\n\n## Settings\n\n[Settings Documentation](http://cookiecutter-django.readthedocs.io/en/latest/settings.html)\n\n## Setting Up Users\n\n* To create an **superuser account**, use this command:\n\n\u003epython manage.py createsuperuser\n\nFor convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.\n\n##  Running tests with pytest\n\nConfig for pytest is available in `pytest.ini`\n\nRun tests:\n\u003epytest\n\n##  Deployment\n\n**Dependencies:**\n- Ubuntu 20.04\n- PostgreSQL 12.2\n- Python 3.7.6\n- Node 14.8.0\n- npm 6.14.7\n- Redis\n\nAdditional dependencies can be found in `flaim/utility/requirements-bionic.apt`\n\nPython dependencies can be found in `flaim/requirements/local.txt`\n\nNote that while `nltk` is listed as a dependency, two additional packages must be installed via the Python shell for\ncategory predictions to function correctly.\n\n\u003epython manage.py shell\n```python\nimport nltk\nnltk.download('stopwords')\nnltk.download('punkt')\n```\n\nRun `npm i` to install necessary node packages.\nUse `python manage.py collectstatic` to put them into the expected static directory.\n\n\n##  Redis Guide\n[Installing Redis](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04\n)\n[Installing Django RQ](https://github.com/rq/django-rq)\n\n##  Installing Postgres Trigram Extension\nWe use this for more flexible searching. Installing this app on a new server will require this to be installed.\n\nTrigrams allows you to do something like this:\n\n```python\nqueryset = queryset.filter(name__trigram_similar=name_contains)\n```\n\nFirst, you must create an empty migration with the following command::\n\n\u003epython manage.py makemigrations database --empty\n\nThen you must navigate to the newly created empty migration and set it up so it looks like this::\n\n```python\nfrom django.contrib.postgres.operations import TrigramExtension\n\n# ...\n\noperations = [TrigramExtension()]\n```\n\nAnd confirm it with:\n\n\u003epython manage.py migrate\n\n\n## Misc. Dev Notes\n\nTo activate the browser based RQ dashboard:\n\n\u003erq-dashboard\n\n\n##  Using FLAIME\n\n### Uploading new web scrapes\n\nNew data can be uploaded to the database via management commands available in `python manage.py`\n\nTo upload Walmart data:\n\u003epython manage.py load_walmart_to_db --input_dir /media/scraper_output/walmart/2020-08-19 --date 2020-08-19\n\nTo upload Loblaws data:\n\u003epython manage.py load_loblaws_to_db --input_dir /media/scraper_output/loblaws/2020-01-01 --date 2020-01-01\n\nFollowing upload of data, categories will be automatically predicted and assigned and Atwater calculations will be run.\n\n\n### Export reports\n\nAd-hoc product reports can be generated using `manage.py export_product_report`\n\n`python manage.py export_product_report --help`\n\n```text\nusage: manage.py export_product_report [-h] --outdir OUTDIR [--all_products]\n                                       [--categories {Bakery Products,Beverages,Cereals and Other Grain Products,Dairy Products and Substitutes,Desserts,Eggs and Egg Substitutes,Fats and Oils,Marine and Fresh Water Animals,Fruit and Fruit Juices,Legumes,Meat and Poultry, Products and Substitutes,Miscellaneous,Combination Dishes,Nuts and Seeds,Potatoes, Sweet Potatoes and Yams,Salads,Sauces, Dips, Gravies and Condiments,Snacks,Soups,Sugars and Sweets,Vegetables,Baby Food,Meal Replacements and Nutritional Supplements,Not Food} [{Bakery Products,Beverages,Cereals and Other Grain Products,Dairy Products and Substitutes,Desserts,Eggs and Egg Substitutes,Fats and Oils,Marine and Fresh Water Animals,Fruit and Fruit Juices,Legumes,Meat and Poultry, Products and Substitutes,Miscellaneous,Combination Dishes,Nuts and Seeds,Potatoes, Sweet Potatoes and Yams,Salads,Sauces, Dips, Gravies and Condiments,Snacks,Soups,Sugars and Sweets,Vegetables,Baby Food,Meal Replacements and Nutritional Supplements,Not Food} ...]]\n\nExport a full product report to a .csv file with ease. Can filter on a variety\nof options.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --outdir OUTDIR       Path to export reports\n  --all_products        Sets most_recent=False when filtering the product set.\n                        Beware, this will make the script run considerably\n                        slower.\n  --categories          Filter queryset to only the specified categories. Can\n                        take multiple categories at once, delimited by a space\n                        e.g. --categories \"Soups\" \"Beverages\" will filter the\n                        queryset to only contain products from the Soups and\n                        Beverages categories.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfssi-bioinformatics-lab%2Fflaime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfssi-bioinformatics-lab%2Fflaime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfssi-bioinformatics-lab%2Fflaime/lists"}