-
-
Notifications
You must be signed in to change notification settings - Fork 33
Improve ci #40
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
Improve ci #40
Conversation
The Python implementation named transifex-client uses Transifex's APIv2, which is deprecated and will sunset in november 2022. The new tool, called Transifex CLI, is written in Golang and is APIv3-ready. So adjusting the CI and requirements.txt is required.
Having the proper condition is important to have the translation update in the latest Python version (python-newest project), and the condition wouldn't match the current repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New Transifex CLI doesn't support TX_TOKEN
environment variable which update.sh
/GH Action uses. [1]
We should update this line [2] to contain the Transifex API token.
~~ ~~tx --token ${TX_TOKEN} pull -l ${LANGUAGE} --use-git-timestamps --parallel~~ ~~
[1] transifex/cli#116
[2] https://github.com/python/python-docs-ja/blob/3.10/scripts/update.sh#L42
EDIT: One comment. Otherwise looks good to me 👍 .
To avoid having LICENSE in checkout directory Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
@m-aciek Thanks for the suggestion. |
Possibly we also need to change format of .tx/config file for new CLI. Is it generated automatically? |
@m-aciek Currently .tx/config is recreated when scripts/update.sh runs the sed command outputting to .tx/config. Still, some changes are necessary to fit the new tx client, so thanks for bringing this up. |
Last released sphinx-intl uses old transifex-client, which uses the deprecated Transifex APIv2. There is a fix committed, but it is unreleased. So using specific commit where new Transifex CLI tool works.
Previous solution of patching .tx/config does not work with the new client, so the script had to be updated with new solution. Now, translations are pulled into a sub-directory of cpython, and then installed in the languages's repository. Also using 'realpath' tool in ROOTDIR to retrieve absolute path, which actually eases referencing the repository root directory.
One of the reason is that some of them use node.js 12, which is now deprecated. Actions is displaying warnings about it. v4 of setup-python is particular useful because it introduces package caching, which reduces the time of workflow run.
Source files auto-update is now done elsewhere
The last commit disables pushing source files to Transifex ( |
update in the latest Python version (python-newest project), and
the condition wouldn't match the current repository.