-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Docs: build.jobs
reference documentation
#9056
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -418,6 +418,42 @@ We don't currently support PPA's or other custom repositories. | |||||
When possible avoid installing Python packages using apt (``python3-numpy`` for example), | ||||||
:ref:`use pip or Conda instead <guides/reproducible-builds:pinning dependencies>`. | ||||||
|
||||||
|
||||||
build.jobs | ||||||
`````````` | ||||||
|
||||||
Commands to be run before or after a Read the Docs pre-defined job. | ||||||
This allows you to run custom commands at a particular moment in the build process. | ||||||
|
||||||
|
||||||
.. code-block:: yaml | ||||||
|
||||||
version: 2 | ||||||
|
||||||
build: | ||||||
os: ubuntu-22.04 | ||||||
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. Should we make this a string for consistency?
Suggested change
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. This one, in particular, is not required to be a string. However, we can declare it as it. We should change the other one as well where I copied it from https://docs.readthedocs.io/en/stable/config-file/v2.html#build |
||||||
tools: | ||||||
python: "3.10" | ||||||
jobs: | ||||||
pre_create_environment: | ||||||
- echo "Command run at 'pre_create_environment' step" | ||||||
post_build: | ||||||
- echo "Command run at 'post_build' step" | ||||||
- echo `date` | ||||||
|
||||||
.. note:: | ||||||
|
||||||
Each key under ``build.jobs`` must be a list of strings. | ||||||
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. I don't really know what this means. Can we communicate it more explicitly somehow? What else would users try to do here, that might be wrong? 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. I'm trying to avoid users writing something like build:
jobs:
post_install: pip install mypackage when it should be build:
jobs:
post_install:
- pip install mypackage |
||||||
|
||||||
|
||||||
:Type: ``dict`` | ||||||
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. Seems like the above note is probably better noted here? |
||||||
:Allowed keys: ``post_checkout``, ``pre_system_dependencies``, ``post_system_dependencies``, | ||||||
``pre_create_environment``, ``post_create_environment``, ``pre_install``, ``post_install``, | ||||||
``pre_build``, ``post_build`` | ||||||
:Required: ``false`` | ||||||
:Default: ``{}`` | ||||||
|
||||||
|
||||||
sphinx | ||||||
~~~~~~ | ||||||
|
||||||
|
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.
Thinking more about this, we probably need to define this feature a lot more explicitly in the docs somewhere, particularly around exit codes.
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.
I didn't mention use cases here because none of the other config keys do that. Instead, I suggested writing a guide explaining what are the known use cases we have already and expanding on each of them clearly.
I see this page as reference documentation that only explains what are the possible/valid config keys and values of each of them, but it does not talk about use cases. I'd include the link to that guide page here once we write it, tho, as we do with
build.tools.python
and the Conda Support link (https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python)What do you think?