-
-
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
Conversation
Small reference documentation for `build.jobs` and all the pre/post jobs allowed.
7b9aa52
to
22192c8
Compare
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. |
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.
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. | |
Commands to be run before or after a Read the Docs pre-defined build step. | |
This allows you to run custom commands at various times in the build process. | |
A few common use cases for this area: | |
* Modifying the state of the checkout of your repository | |
* Stopping a build by returning a non-zero exit code on certain conditions | |
* Running a command to process generate markup files prior to building |
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?
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 |
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.
Should we make this a string for consistency?
os: ubuntu-22.04 | |
os: "ubuntu-22.04" |
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 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
|
||
.. 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 comment
The 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 comment
The 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
Each key under ``build.jobs`` must be a list of strings. | ||
|
||
|
||
:Type: ``dict`` |
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.
Seems like the above note is probably better noted here?
I'm merging this so it goes out tomorrow together with the deploy and the |
Small reference documentation for
build.jobs
and all the pre/post jobs allowed.Related #9016