Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip and optimize "Updating translations" in tools/server_tests #763

Open
ryosuketc opened this issue Nov 11, 2020 · 3 comments
Open

Skip and optimize "Updating translations" in tools/server_tests #763

ryosuketc opened this issue Nov 11, 2020 · 3 comments
Assignees

Comments

@ryosuketc
Copy link
Contributor

tools/server_tests consists of two parts:

  1. Update translations
  2. Run tests (pytests)

1 is not always necessary and we sometimes want to skip 1 temporarily.

As a side note, the update message looks taking much longer than before, and it looks like it is trying to update unnecessary files. We may want to fix it too. I believe we only need to update our messages, not inside app/vendors.

TODO:

  1. An optional command line argument for tools/server_tests might make sense in order to skip update translations.
  2. Skip updating translations in app/vendors. for faster updates (might file a separate issue for this later).
@ryosuketc
Copy link
Contributor Author

Following up with @gimite internally.

@ryosuketc
Copy link
Contributor Author

ryosuketc commented Nov 13, 2020

Confirmed with him that this implementation and its output for the second TODO item are working as intended.
The changes will be sent after #764 is addressed and confirmed to pass all server tests.

Before the change

% tools/update_messages
 
--- Updating translations
processing locale en
No messages have changed.
processing file django.po in $HOME/repos/pf/app/vendors/django/contrib/admindocs/locale/gd/LC_MESSAGES
... (omitted) ...
processing file django.po in $HOME/repos/pf/app/locale/en/LC_MESSAGES
... (omitted) ...

After the change:

% tools/update_messages     
processing locale en
No messages have changed.

gimite pushed a commit that referenced this issue Nov 24, 2020
* Support an optional argument --skip_update_translations #763

* Skip app/vendors from compilemessages #763

* Add venv/ to .gitignore to support virtualenv #764

* Use boolean instead of strings to dispatch behavior of server tests by optional arguments
ryosuketc added a commit that referenced this issue Nov 25, 2020
This reverts commit 0af534c.

--ignore option for compilemessages is supported in greater than django 3.0.
https://docs.djangoproject.com/en/3.1/ref/django-admin/#cmdoption-compilemessages-ignore

makemessages support --ignore even on django 1.x
https://docs.djangoproject.com/en/3.1/ref/django-admin/#cmdoption-makemessages-ignore

Indeed, our django version is 1.11.29, which is the last version for Python 2.x
Django 1.11 is the last version to support Python 2.7. Support for Python 2.7 and Django 1.11 ends in 2020.
https://docs.djangoproject.com/en/3.1/faq/install/
ryosuketc added a commit that referenced this issue Nov 26, 2020
This reverts commit 0af534c.

--ignore option for compilemessages is supported in greater than django 3.0.
https://docs.djangoproject.com/en/3.1/ref/django-admin/#cmdoption-compilemessages-ignore

makemessages support --ignore even on django 1.x
https://docs.djangoproject.com/en/3.1/ref/django-admin/#cmdoption-makemessages-ignore

Indeed, our django version is 1.11.29, which is the last version for Python 2.x
Django 1.11 is the last version to support Python 2.7. Support for Python 2.7 and Django 1.11 ends in 2020.
https://docs.djangoproject.com/en/3.1/faq/install/
gimite pushed a commit that referenced this issue Nov 26, 2020
This reverts commit 0af534c.

--ignore option for compilemessages is supported in greater than django 3.0.
https://docs.djangoproject.com/en/3.1/ref/django-admin/#cmdoption-compilemessages-ignore

makemessages support --ignore even on django 1.x
https://docs.djangoproject.com/en/3.1/ref/django-admin/#cmdoption-makemessages-ignore

Indeed, our django version is 1.11.29, which is the last version for Python 2.x
Django 1.11 is the last version to support Python 2.7. Support for Python 2.7 and Django 1.11 ends in 2020.
https://docs.djangoproject.com/en/3.1/faq/install/
@ryosuketc
Copy link
Contributor Author

TODO 1 was completed and merged.
TODO 2 is reverted and on hold until we migrate to Python 3.
#768

@ryosuketc ryosuketc reopened this Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant