-
Notifications
You must be signed in to change notification settings - Fork 213
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
Migrate automations to PDM #4625
Merged
+619
−665
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[project] | ||
name = "openverse-automations" | ||
version = "0.0.0" | ||
description = "Automations for the Openverse project" | ||
readme = "README.md" | ||
authors = [ | ||
{name = "Openverse Contributors", email = "[email protected]"}, | ||
] | ||
|
||
requires-python = "==3.12.*" | ||
dependencies = [ | ||
"pygithub >= 2.3.0, < 3", | ||
"pyyaml >= 6.0.1, < 7", | ||
"beautifulsoup4 >= 4.12.3, < 5", | ||
"requests >= 2.32.3, < 3", | ||
"mechanize >= 0.4.10, < 1", | ||
"pyotp >= 2.9.0, < 3", | ||
] | ||
|
||
[tool.pdm] | ||
distribution = false | ||
|
||
[tool.pdm.dev-dependencies] | ||
dev = [ | ||
"ipython", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ Follow the [general setup guide](/general/general_setup.md) to set up `ov`. | |
Node.js dependencies for automations as well as other parts of the repository. | ||
If you wish to install only dependencies for automations, run the following: | ||
|
||
- `ov pipenv install` in `automations/python` | ||
- `ov pdm install` in `automations/python` | ||
- `ov pnpm install --filter=automations` | ||
|
||
## Running a Script | ||
|
@@ -27,7 +27,7 @@ Ex.: | |
ov just automations/python/run print_labels.py | ||
``` | ||
|
||
The recipe is an alias for running `ov pipenv run <script>` inside the | ||
The recipe is an alias for running `ov pdm run <script>` inside the | ||
`automations/python` directory. This facilitates correct `PYTHONPATH` | ||
configuration as expected by many scripts. | ||
|
||
|
@@ -48,10 +48,6 @@ executable scripts available can also be run using the same recipe. | |
Many Openverse automation scripts expect to run inside a GitHub actions context | ||
and require specific environment variables to operate. Refer to individual | ||
script documentation (or implementation when no module documentation exists) to | ||
know which environment variables are expected. | ||
[Pipenv automatically loads `.env` files](https://pipenv-fork.readthedocs.io/en/latest/advanced.html#automatic-loading-of-env) | ||
so for ease of use, you may place relevant environment variables in | ||
`automations/python/.env`. Unlike Pipenv, however, pnpm does _not_ automatically | ||
load environment variables. If a Node.js script requires environment variables, | ||
you must pass them yourself via the command line or use another method to make | ||
the variables available to the script. | ||
know which environment variables are expected. If a script requires environment | ||
variables, you must pass them yourself via the command line or use another | ||
method to make the variables available to the script. | ||
Comment on lines
+51
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good observation on updating the docs. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This change is unrelated but I think it's ok to include it.