Commit Graph

74 Commits

Author SHA1 Message Date
Roland Geider
e7d4ffc216 Rename exercisebase model to exercise 2024-07-08 19:14:06 +02:00
Roland Geider
6fdeb96d64 Initial formatting with ruff 2024-01-27 10:30:02 +01:00
Roland Geider
32589310db Fix typo 2024-01-06 19:45:22 +01:00
Roland Geider
a26c1cb271 Also export the exercise aliases 2024-01-06 19:44:06 +01:00
Roland Geider
0515e03647 Simplify OFF import script
This now is automatically setup with docker compose, also the script has
been moved to a management command, which is cleaner
2023-11-25 10:57:46 +01:00
Roland Geider
23dca42a8b Import products with a completeness value higher than 0.7
We could probably go even lower, but this is a good start
2023-11-23 20:54:28 +01:00
Roland Geider
3ea0b7754b Make import logic more robust 2023-06-13 12:07:15 +02:00
Roland Geider
b5dc140b05 Fetch product from OFF if scan doesn't find ingredient locally 2023-06-08 13:35:28 +02:00
Roland Geider
0af3eda67f Update OFF ingredient completeness statistics 2023-04-08 12:22:49 +02:00
Roland Geider
11ef53cc00 Add fields to properly save attribution information 2023-04-07 17:25:18 +02:00
Roland Geider
e438a693b7 Use a counter to... count the edits and inserts 2023-03-26 13:17:47 +02:00
Roland Geider
722d2b66a6 Refactor some sync scripts
Common logic is extracted to a sync file which can be called from the regular
manage.py management scripts or added as a scheduled celery task.
2023-03-05 14:49:42 +01:00
Roland Geider
62694cd0e1 Merge branch 'master' into feature/ingredient-images
# Conflicts:
#	wger/nutrition/api/views.py
#	wger/settings_global.py
2022-11-30 15:18:06 +01:00
Roland Geider
dc9300f096 Remove language config
This was a bit weird and wasn't really used. If some kind of multi-language
search is required in the future, we can just pass the individual codes to
the search
2022-11-10 16:01:31 +01:00
Roland Geider
41dd35648e Fetch ingredient images in the background with celery 2022-10-24 17:01:33 +02:00
Roland Geider
7037ac9d8b Merge branch 'master' into feature/ingredient-images
# Conflicts:
#	docs/changelog.rst
#	docs/commands.rst
#	docs/settings.rst
2022-03-28 22:28:15 +02:00
Roland Geider
82255c951e Small improvements to OFF import script 2021-11-25 20:30:52 +01:00
Roland Geider
efb471e350 Correctly access the value of the ingredient source enum 2021-10-06 09:56:32 +02:00
Roland Geider
3c83a18e6a Use an enum to store the possible values for import sources 2021-08-02 16:59:26 +02:00
Roland Geider
1326abdc0a Improve instructions on how to use the filter-fixtures.py script 2021-01-09 11:36:47 +01:00
Roland Geider
8ae404de8c Move variations and base data to separate exercise json fixture 2021-01-05 13:32:26 +01:00
Roland Geider
88c214b22b Fix linting error 2020-12-20 15:01:45 +01:00
Roland Geider
621ae62181 Add steps on how to update fixtures 2020-12-20 14:55:45 +01:00
Roland Geider
9eef161842 Cleanup installation 2020-12-20 14:40:09 +01:00
Roland Geider
5f4c31a3cb Cleanup installation 2020-12-20 14:03:02 +01:00
Roland Geider
63caf299e1 Cleanup 2020-12-20 13:54:01 +01:00
Roland Geider
0f14def553 Fix linting errors 2020-12-19 20:01:37 +01:00
Roland Geider
b39b0cfc2d Use a dictionary for the languages, seem cleaner 2020-12-19 19:58:39 +01:00
Roland Geider
79b0472f4c Use bulk inserts when possible 2020-12-19 19:48:16 +01:00
Roland Geider
3898b6b086 Set the license for the ingredients 2020-12-19 18:21:15 +01:00
Roland Geider
35788d0a60 Use authentication when creating the mongo database 2020-12-19 14:58:54 +01:00
Roland Geider
2007a0419c Check name similarity with other ingredients
Also, move the contents of the shell script to a readme. I feel this is safer
for such a process.
2020-12-18 20:07:24 +01:00
Roland Geider
ee0a476846 Extend script to update or create products 2020-12-18 16:18:16 +01:00
Roland Geider
f740f84b6f Skip products with no name 2020-12-16 12:01:31 +01:00
Roland Geider
8aa966f1f5 Change path so that it finds the default settings.py file 2020-12-16 12:00:22 +01:00
nikithamurikinati
6fc7cb0cf1 added error handling and fixed bugs 2020-12-14 15:32:16 -05:00
nikithamurikinati
521da6add8 fixed linter errors 2020-12-14 13:11:56 -05:00
nikithamurikinati
69c60b5363 Added status to ingredient creation 2020-12-14 09:46:42 -05:00
nikithamurikinati
a6073d1990 Completed import open food facts script 2020-12-13 17:18:29 -05:00
nikithamurikinati
4bde5ac210 Exercis 2020-12-12 21:24:42 -05:00
Harlene Samra
35e2d2d738 Starting work on OpenFoodFacts import 2020-12-12 16:38:49 -05:00
Roland Geider
b7b3543653 Filter out submitted entries that are not accepted 2020-11-16 21:21:23 +01:00
Roland Geider
351deb9c35 Move filter to correct group 2020-08-30 18:47:50 +02:00
Roland Geider
cff54bc888 Merge branch 'master' into nutrition-diary
# Conflicts:
#	wger/core/templates/index.html
#	wger/core/templates/misc/fragments/shariff_modal.html
#	wger/nutrition/api/views.py
#	wger/nutrition/models.py
#	wger/nutrition/templates/mobile/plan/view.html
#	wger/nutrition/templates/plan/view.html
#	wger/nutrition/urls.py
2020-08-24 23:47:10 +02:00
Roland Geider
7ebdb0b4f0 noqa all the files to be skipped
Github's super linter seems to call each file individually. So instead of
flake --config foo . it does flake --config foo /path/to/file1.py and this
ignores the exclude values in the config.
2020-08-09 23:17:32 +02:00
Roland Geider
6a8655d77c Replace single triple quotes
This is consistent with PEP8 and wasn't done before due to a duty
to consistency
2020-07-22 23:00:14 +02:00
Roland Geider
405bfd694e Merge branch 'master' into nutrition-diary
Conflicts:
    wger/nutrition/templates/plan/view.html
2016-07-16 14:14:26 +02:00
Roland Geider
b18faf36bd Add Norwegian translation
Fixes #304
2016-07-11 23:14:38 +02:00
Roland Geider
6e8206036a Only write the JSON file if there are any entries 2016-05-16 10:38:30 +02:00
Roland Geider
d3824556df Rename SettingUnit to RepetitionUnit
The unit doesn't refer to the whole setting entry, but only to the "repetition"
(which is itself just one of the units).
2016-03-03 20:31:27 +01:00