Skip to content

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

Merged
merged 7 commits into from
Dec 30, 2022
Merged

Improve ci #40

merged 7 commits into from
Dec 30, 2022

Conversation

rffontenelle
Copy link
Contributor

  • Use the new Transifex CLI toll: 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.
  • Fix condition in the merge job]: 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.

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.
Copy link
Contributor

@m-aciek m-aciek left a 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>
@rffontenelle
Copy link
Contributor Author

@m-aciek Thanks for the suggestion.

@m-aciek
Copy link
Contributor

m-aciek commented Oct 20, 2022

Possibly we also need to change format of .tx/config file for new CLI. Is it generated automatically?

@rffontenelle
Copy link
Contributor Author

@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
@rffontenelle
Copy link
Contributor Author

The last commit disables pushing source files to Transifex (tx push) because translations are now updated via rffontenelle/docspush-transifex, as discussed in Python's translation mailing list.

@methane methane merged commit ff06042 into python:3.10 Dec 30, 2022
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

Successfully merging this pull request may close these issues.

3 participants