Skip to content

Commit

Permalink
[Doc, CI] Update doc workflow to run on PR and only publishes doc on …
Browse files Browse the repository at this point in the history
…main. (pytorch#745)

* Update workflow build to run on PR and only publishes doc on main.

* empty

Co-authored-by: Emilien Garreau <emgarr@meta.com>
Co-authored-by: vmoens <vincentmoens@gmail.com>
  • Loading branch information
3 people authored Dec 14, 2022
1 parent 457f9bd commit f674de4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- main
pull_request:
branches:
- "*"
workflow_dispatch:
jobs:
build_docs_job:
Expand Down Expand Up @@ -91,6 +94,7 @@ jobs:
- name: Get output time
run: echo "The time was ${{ steps.build.outputs.time }}"
- name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ We want to make contributing to this project as easy and transparent as
possible.

## Installing the library
Install the library as suggested in the README. For advanced features,
Install the library as suggested in the README. For advanced features,
it is preferable to install the nightly built of pytorch.

Make sure you install torchrl in develop mode by running
Expand All @@ -12,25 +12,25 @@ python setup.py develop
```
in your shell.

If the generation of this artifact in MacOs M1 doesn't work correctly or in the execution the message
If the generation of this artifact in MacOs M1 doesn't work correctly or in the execution the message
`(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))` appears, then try

```
ARCHFLAGS="-arch arm64" python setup.py develop
```

## Formatting your code
**Type annotation**
**Type annotation**

TorchRL is not strongly-typed, i.e. we do not enforce type hints, neither do we check that the ones that are present are valid. We rely on type hints purely for documentary purposes. Although this might change in the future, there is currently no need for this to be enforced at the moment.
TorchRL is not strongly-typed, i.e. we do not enforce type hints, neither do we check that the ones that are present are valid. We rely on type hints purely for documentary purposes. Although this might change in the future, there is currently no need for this to be enforced at the moment.

**Linting**

Before your PR is ready, you'll probably want your code to be checked. This can be done easily by installing
Before your PR is ready, you'll probably want your code to be checked. This can be done easily by installing
```
pip install pre-commit
```
and running
and running
```
pre-commit run --all-files
```
Expand All @@ -45,7 +45,7 @@ We actively welcome your pull requests.
1. Fork the repo and create your branch from `main`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
4. Ensure the test suite and the documentation pass.
5. Make sure your code lints.
6. If you haven't already, complete the Contributor License Agreement ("CLA").

Expand Down

0 comments on commit f674de4

Please sign in to comment.