Граф коммитов

144 Коммитов

Автор SHA1 Сообщение Дата
Francesco Lodolo d650739031
Replace black, flake8, pyupgrade with ruff for Python linting and formatting (#3248) 2024-06-03 19:08:47 +02:00
Francesco Lodolo 4b6e839447
Update workflows and docker to Python 3.11 (#3188)
* Use Python 3.11

* Run pyupgrade with Python 3.11+

* Update pyupgrade to latest version

* Update Celery and python-dateutil

Celery is not compatible with Python 3.11, leading to test failures. Need to update also python-dateutil to install the latest version.
2024-04-25 12:31:24 +02:00
Matjaž Horvat 3d51fba96c
Upgrade Django to 4.2.11 (#3183)
* pytest.yield_fixture is a deprecated alias for pytest.fixture

* Update Django dev dependencies

* Update bleach

* Upgrade existing dependencies within the given constraints of the input files

* Fix jinja after update

* Update pip-tools

* Update django-* libraries

* Upgrade graphene-django

* Upgrade Django to 4.0

* Drop pytz

* ALLOWED_HOSTS must be a list

* Upgrade Django to 4.1

* Add workaround for the Raygun AttributeError

See:
https://github.com/MindscapeHQ/raygun4py/issues/108

* Avoid ValueError when instance doesn't have a primary key value but relationship is used.

See:
7ba6ebe914

* Upgrade Django to 4.2.11

* Drop pytz as a direct requirement
2024-04-24 21:31:23 +02:00
Matjaž Horvat e3b2e20a97
Update compare-locales to 9.0.3 (#3182) 2024-04-18 15:08:05 +02:00
Eemeli Aro e996d94cfa
Drop support for the .lang format (#3163)
* Fix remaining failing test

---------

Co-authored-by: Matjaž Horvat <matjaz.horvat@gmail.com>
2024-04-04 19:54:44 +02:00
ayanaar 3e03b17424
Implementation of LLM-Assisted Translations Backend (#3100) 2024-02-26 21:29:45 +01:00
Francesco Lodolo 9cf89026f2
Update to Python 3.10 (#3112)
In:
* GitHub workflows
* Docker
* Heroku

Also make related flake8, black and pyupgrade fixes (some actually only needed in future versions of python).
2024-02-22 19:33:05 +01:00
Matjaž Horvat 4d19972932
Update Django to the latest dot version. (#3098)
Also update django-jinja to the latest version.
2024-02-15 14:28:01 +01:00
Matjaž Horvat b013fb937f
Update New Relic (#3092) 2024-02-13 17:11:39 +01:00
Matjaž Horvat 59eb3c0038
Update to compare-locales 9.0.2 (#2962) 2023-09-18 19:49:49 +02:00
Fabien LOISON 976385b1ad
Updated parsimonious to v0.10 (#2916) 2023-07-24 14:14:12 +02:00
Fabien LOISON 464835d2cc
Updated psycopg2 from 2.8.5 to 2.9.6 (#2906) 2023-07-18 10:11:33 +02:00
Matjaž Horvat 0ce71dccaa Generate accesskeys (rather than pretranslate)
Fluent Rich editor has a special UI for messages with access keys, which lists access key candidates. We now use the same logic when
pretranslating accesskeys and save the first candidate as the pretranslation.

Also: Remove regex dependency and use the built-in re.
2023-05-17 17:47:13 +02:00
Matjaž Horvat 60735c68f0 Update black and test requirements, fix pip-compile warnings
- Ignore resolver deprecation warning on make requirements
- Ignore egg fragment deprecation warning on make requirements
- Update test requirements (needed to update black)
- Update black (needed to install the regex package)
- Run make black
- Add regex package (needed to implement accesskey candidate generator)
2023-05-17 17:47:13 +02:00
Matjaž Horvat d49eac8262
Optimize Thunderbird and Seamonkey sync (#2830) 2023-05-04 00:08:41 +02:00
Eemeli Aro 641c90c14e
Update to compare-locales 9.0.1, fluent-syntax 0.19.0, pip-tools 6.13.0 (#2817)
* Update to compare-locales 9.0.1, fluent-syntax 0.19.0, pip-tools 6.13.0

The transitive dependency typing-extensions is also updated to 4.5.0

* ci: Use codecov action rather than the removed/deprecated pypi & npm packages
2023-04-18 07:42:52 +03:00
Matjaž Horvat ceef69803d
Set up a dedicated dyno to schedule and execute Google AutoML Translate Warmup process (#2682)
Usually, separating scheduler and execution worker is recommended, but we break that pattern intentionally in order to run the task exactly when scheduled.

Co-authored-by: Francesco Lodolo <flod@lodolo.net>
2023-02-16 10:06:39 +01:00
Matjaž Horvat 016de8a937
Add sacrebleu, needed for Pretranslation evaluation (#2747) 2023-02-09 15:08:14 +01:00
Matjaž Horvat ca67f5d312
Add support for Google AutoML Translation (#2648)
* Gracefully handle Google AutoML error when credentials not set

* Prevent app crash on Heroku by forcing protobuf to use Python for parsing

By default, protobuf uses C++ for parsing. The library includes prebuilt binary modules for Apple silicon, which my local box uses, so for me the
library works as expected without this hack. I only noticed that's not the case for everyone after deploying to the stage server on Heroku.

Read more:
https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
https://developers.google.com/protocol-buffers/docs/reference/python-generated#sharing-messages

* Add buildpack needed for authentication using Google Cloud service accounts

And while we're at it, let's remove the unused buildpack.
2022-11-07 11:51:04 +01:00
Tomás Novau b5b19f73d0
Add missing python-binary-memcached package hash (#2644) 2022-10-25 17:49:29 +02:00
Matjaž Horvat 8e709ac2c5
Update Django (#2614) 2022-08-26 12:16:10 +02:00
Matjaž Horvat 49f2e2f17a
Allow user to add a contact email address (#2606)
- Adds a contact email field to user settings.
- Implements verification process: sends unique verification URL with a token to that email address.

Co-authored-by: Eemeli Aro <eemeli@gmail.com>
2022-08-17 14:43:18 +02:00
Matjaž Horvat fbafc74c55
Update Python requirements (#2580) 2022-07-27 20:20:39 +02:00
Fabien LOISON 7fed45cf77
Update pip-tools to v6.6.1 (#2530)
* Update pip-tools to v6.6.1 (fixes when using pip 22.1)
* set tomli to v1.2.2
* Full 'make requriements' output
2022-05-18 11:36:10 +02:00
Matjaž Horvat 175082327a
Bump Silme to 0.11.2 (#2496)
- Switch to mozilla org on GitHub
- Release notes: https://github.com/mozilla/silme/releases/tag/v0.11.0
- Release notes: https://github.com/mozilla/silme/releases/tag/v0.11.1
- Release notes: https://github.com/mozilla/silme/releases/tag/v0.11.2
2022-04-27 11:22:01 +02:00
Matjaž Horvat 74b9c6a77b
Update celery to 5.2.6 (#2498) 2022-04-27 10:16:03 +02:00
Matjaž Horvat 681925b8b7
Bump Django to 3.2.13 (#2497) 2022-04-27 00:22:17 +02:00
Eemeli Aro 8d2714d5db
Refactor tag-admin to use functional components, stop testing its internals, replace webpack with rollup (#2432)
* refactor(tag-admin): Use functional components, stop testing internals

* style(tag-admin): Satisfy Prettier

* chore(tag-admin): Add & configure build with Rollup

* chore: Drop webpack dependencies as unused

terser is included in the root package.json to ensure its availability
for pipeline during the Django build via TERSER_BINARY.

* chore(tag-admin): Add npm install & build targets to Makefile

Also sets engine-strict = true in .npmrc, so attempts to use
npm cli versions which do not support workspaces will fail.

* chore(tag-admin): Update from rollup-plugin-replace to @rollup/plugin-replace

* docs: Update prerequisites
2022-02-21 19:28:25 +01:00
Matjaž Horvat 261792baac
Update Django to 3.2.10 (#2392) 2021-12-21 11:50:41 +01:00
Matjaž Horvat 4e6099eabc
Update dependencies (#2390)
* Update lxml

* Update new frontend dependencies by running `yarn upgrade` in /frontend

* Update old frontend dependencies by regenerating package-lock.json using `npm i --package-lock-only`.

* Replace Array<React.ReactNode> with React.ReactNodeArray to match react-content-marker
2021-12-21 00:18:33 +01:00
Matjaž Horvat ace0e2b948
Update Django to 3.2.9 (#2371)
Also update existing dependencies within the given constraints of the input files.
2021-11-24 22:12:55 +01:00
Matjaž Horvat 1e444eeb68
Upgrade parsimonious to 0.8.1 (#2365) 2021-11-14 00:38:21 +01:00
Matjaž Horvat 87cb409009
Update black to 21.10b0 (#2359) 2021-11-10 16:11:31 +01:00
Eemeli Aro 406f7421c9
Add missing-placeholder warnings for Android strings.xml & don't always ignore warnings (#2348)
* fix: EditorMainAction buttons were always ignoring warnings

Calling `sendTranslation(reactEvent)` resulted in considering
the first argument `ignoreWarnings` as true-ish.

* chore: Update compare-locales to 8.2.0
2021-11-01 15:27:09 +01:00
Axel Hecht 6e48bfa390 No bug, use markupsafe.Markup instead of jinja2, as advertised.
This cuts the warnings during python tests from 2010 to some 40.
And no, I'm not talking about a date 11 years ago.
2021-08-02 20:40:05 +02:00
Axel Hecht 8601d0a197 No bug, use constraints vs imports in python requirements.
Using constraints has the benefit that updates to default.in only
show up in default.txt, and not in dev.txt. That should make reviews
easier. It still ensures there's only one version of each package
used across production, dev, and local testing.
2021-08-02 20:40:05 +02:00
Matjaž Horvat ededc2c9f2
Update to Django 3.2.4 (#1965) 2021-06-10 22:09:34 +02:00
Matjaž Horvat b407ecef28
Update Django to 3.2.1 (#1961) 2021-06-05 14:27:37 +02:00
Matjaž Horvat a49defa662
Update existing dependencies within the given constraints of the input files (#1959) 2021-06-04 14:28:54 +02:00
Matjaž Horvat 587c53b1fb
Update django-debug-toolbar to 3.2.1 (#1925) 2021-04-18 21:28:54 +02:00
Philipp Fischbeck 1af6919f66
Bug 1704038: Update newrelic to 6.2.0.156 (#1924)
The previous version was incompatible with Django 3.2.
2021-04-18 21:28:28 +02:00
Philipp Fischbeck efcd4430b2
Fix bug 1704038: Upgrade to Django 3.2 (#1921)
* App configs are now automatically discovered, and most of our current app configs were redundant or had wrong names.
* The DEFAULT_AUTO_FIELD is needed to prevent unwanted migrations in the future, when the default value will change to BigAutoField.
* Make get_stats_sum return dict instead of AggregatedStats instance. Django 3.2 throws an error when instantiating an abstract model. Add tests for the relevant views that were previously not covered, marked with pytest.mark.no_cover.
2021-04-16 20:30:25 +02:00
Fabien LOISON 8cdd3005be
Fix bug 1699455: Replace django-dotenv with python-dotenv (#1904)
Which suppresses warnings when the dotenv file is missing among other things.
2021-04-09 14:42:27 +02:00
Matjaž Horvat 9aaa4633c6
Update django to 3.1.8 (#1917) 2021-04-08 22:50:27 +02:00
Matjaž Horvat 9edf703de1
Update dependencies (#1913) 2021-04-07 15:57:44 +02:00
Matjaž Horvat c5641aadcf
Update lxml to 4.6.3 (#1908) 2021-03-23 21:40:53 +01:00
Matjaž Horvat 846013e9dd
Fix bug 1699655: Update to Django 3.1.7 (#1905)
Also: reflect django-dotenv update in the rest of the requirements files
2021-03-19 19:37:25 +01:00
Fabien LOISON f245ebff85
Read manage.py dotenv file from a supplied path (#1897)
Also:
* Fix dotenv link in the docs
* Update django-dotenv dependency to v1.4.2
2021-03-17 13:26:48 +01:00
Axel Hecht 70642cfac3
Fix bug 1696146 - Add linting for pyupgrade (#1886)
Also add pyupgrade to format.
2021-03-03 21:48:49 +01:00
Matjaž Horvat 363457c114
Remove dj.debug (#1875)
Dj.debug brings some utils to help with development, but
we don't seem to be using it much, because it doesn't support Python 3
and we haven't noticed it so far.
2021-02-25 16:56:26 +01:00