Skip to content
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: update readthedocs #22

Merged
merged 64 commits into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
cf3820b
fix(.github): update issue template
Benjamin-eecs Jul 4, 2022
f101c28
fix(torchopt): update lint
Benjamin-eecs Jul 4, 2022
702271a
merge: fix conflict
Benjamin-eecs Jul 4, 2022
c9ed91c
chore: fix type hint and docstring
Benjamin-eecs Jul 5, 2022
782587b
merge: resolve conflicts
Benjamin-eecs Jul 11, 2022
7c3e5e7
merge: resolve conflicts
Benjamin-eecs Jul 11, 2022
a5025df
style: fix docstyle
Benjamin-eecs Jul 11, 2022
2142325
fix: import error
Benjamin-eecs Jul 11, 2022
34d9db2
style: fix docstyle
Benjamin-eecs Jul 12, 2022
b0afbf8
style: fix lint
Benjamin-eecs Jul 12, 2022
f8998d5
style: fix lint
Benjamin-eecs Jul 12, 2022
83698eb
style: fix lint
Benjamin-eecs Jul 12, 2022
69373a5
style: fix lint
Benjamin-eecs Jul 13, 2022
d26930a
style: fix lint
Benjamin-eecs Jul 13, 2022
eeee54e
style: fix lint
Benjamin-eecs Jul 13, 2022
936b8a0
docs: pass docstyle
Benjamin-eecs Jul 13, 2022
d720156
merge: resolve conflicts
Benjamin-eecs Jul 13, 2022
eda3ecf
feat(docker): add dockerfile
Benjamin-eecs Jul 14, 2022
9c1dc2a
docs(tutorials): update tutorial notebooks
XuehaiPan Jul 15, 2022
504d049
chore(setup): remove duplicate extension copying
XuehaiPan Jul 15, 2022
f11128f
docs: add `-e` option for building from source
XuehaiPan Jul 15, 2022
eff468b
chore: update .gitignore and add .dockerignore
XuehaiPan Jul 15, 2022
cd67f72
docs: add api, examples, developer, torchopt101 documentation
Benjamin-eecs Jul 15, 2022
a9fb581
docs: fix MAML.rst
Benjamin-eecs Jul 15, 2022
d59ca51
docs: fix MAML.rst
Benjamin-eecs Jul 15, 2022
31e6e5d
docs: fix MAML.rst
Benjamin-eecs Jul 15, 2022
ec24b30
docs: fix MAML.rst
Benjamin-eecs Jul 15, 2022
9c43c54
docs: fix MAML.rst
Benjamin-eecs Jul 15, 2022
dd0c13d
docs: fix spelling
Benjamin-eecs Jul 15, 2022
1a01cc4
docs: pass lint
Benjamin-eecs Jul 15, 2022
7f2304b
docs: pass lint
Benjamin-eecs Jul 15, 2022
9aff453
chore: update .gitignore and add .dockerignore
XuehaiPan Jul 15, 2022
5c869ce
feat: add Dockerfile
XuehaiPan Jul 15, 2022
221f3d2
chore: update Dockerfile
XuehaiPan Jul 16, 2022
a9fcf88
feat: add CONTRIBUTING.md
Benjamin-eecs Jul 16, 2022
24d54ed
feat(examples): add requirements.txt
Benjamin-eecs Jul 16, 2022
0392e20
feat(Makefile): add make pypi-wheel
Benjamin-eecs Jul 16, 2022
2165cdb
feat(docs): add requirements.txt
Benjamin-eecs Jul 16, 2022
5f346f1
fix(.github): update link
Benjamin-eecs Jul 16, 2022
ff77b15
fix(Dockerfile): add release Dockerfile for testing before release
Benjamin-eecs Jul 16, 2022
1fc1d13
fix(Dockerfile): add release Dockerfile for testing before release
Benjamin-eecs Jul 16, 2022
5dff3c1
Revert "fix(Dockerfile): add release Dockerfile for testing before re…
XuehaiPan Jul 17, 2022
6e28212
Revert "fix(Dockerfile): add release Dockerfile for testing before re…
XuehaiPan Jul 17, 2022
b5fc606
refactor(Makefile): add target to build wheels
XuehaiPan Jul 17, 2022
87dea09
refactor(Makefile): update targets for building docker images
XuehaiPan Jul 17, 2022
44cafbe
chore: update requirements
XuehaiPan Jul 17, 2022
3db5ad7
chore(Dockerfile): install tutorial dependencies in docker
XuehaiPan Jul 17, 2022
6f24778
docs: fix MAML.rst
Benjamin-eecs Jul 17, 2022
58429f8
docs: fix MAML.rst
Benjamin-eecs Jul 17, 2022
54b05b4
docs: fix api.rst and corresponding docstring
Benjamin-eecs Jul 18, 2022
f857de0
fix(all): pass lint
Benjamin-eecs Jul 18, 2022
b294509
fix(all): pass lint
Benjamin-eecs Jul 18, 2022
63dd059
style: format code with black
XuehaiPan Jul 19, 2022
caba7ab
style: run pre-commit hooks
XuehaiPan Jul 19, 2022
6424cad
style: don't format .pyi files
XuehaiPan Jul 19, 2022
7210c0d
chore: reorganize docs structure
XuehaiPan Jul 19, 2022
e08343b
fix: pass lint
Benjamin-eecs Jul 19, 2022
f4e9a6a
docs: update sphinx docs conf
XuehaiPan Jul 19, 2022
9144082
docs: update docstrings
XuehaiPan Jul 19, 2022
b650fbc
docs: fix docstyle
XuehaiPan Jul 19, 2022
e771d3f
lint: add pylint
XuehaiPan Jul 19, 2022
70628de
feat: add pre-commit
XuehaiPan Jul 19, 2022
d8e6fe9
docs: update dictionary
XuehaiPan Jul 19, 2022
32414a7
chore(workflows): install docs dependencies for linters
XuehaiPan Jul 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BasedOnStyle: Google
BasedOnStyle: Google
1 change: 1 addition & 0 deletions .dockerignore
12 changes: 7 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,26 @@ Please use the markdown code blocks for both code and stack traces.
import torchopt
```

```bash
```pytb
Traceback (most recent call last):
File ...
File ...
```

## Expected behavior

A clear and concise description of what you expected to happen.

## Screenshots

If applicable, add screenshots to help explain your problem.

## System info

Describe the characteristic of your environment:
* Describe how the library was installed (pip, source, ...)
* Python version
* Versions of any other relevant libraries

- Describe how the library was installed (pip, source, ...)
- Python version
- Versions of any other relevant libraries

```python
import torchopt, numpy, sys
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
You can use the syntax `close #15213` if this solves the issue #15213

- [ ] I have raised an issue to propose this change ([required](https://torchopt.readthedocs.io/en/latest/pages/contributing.html) for new features and bug fixes)
- [ ] I have raised an issue to propose this change ([required](https://github.com/metaopt/TorchOpt/issues) for new features and bug fixes)

## Types of changes

Expand All @@ -32,7 +32,7 @@ What types of changes does your code introduce? Put an `x` in all the boxes that
Go over all the following points, and put an `x` in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

- [ ] I have read the [CONTRIBUTION](https://torchopt.readthedocs.io/en/latest/pages/contributing.html) guide (**required**)
- [ ] I have read the [CONTRIBUTION](https://torchopt.readthedocs.io/en/latest/developer/contributing.html) guide (**required**)
- [ ] My change requires a change to the documentation.
- [ ] I have updated the tests accordingly (*required for a bug fix or a new feature*).
- [ ] I have updated the documentation accordingly.
Expand Down
45 changes: 35 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Lint

on:
push:
branches:
- main
pull_request:

permissions:
Expand All @@ -23,7 +25,7 @@ jobs:
submodules: "recursive"
fetch-depth: 1

- name: Set up Python 3.7 # the lowest version we support
- name: Set up Python 3.7 # the lowest version we support
uses: actions/setup-python@v4
with:
python-version: "3.7"
Expand All @@ -37,30 +39,53 @@ jobs:
method: network
sub-packages: '["nvcc"]'
- run: |
echo "Installed CUDA version is: ${{steps.cuda-toolkit.outputs.cuda}}"
CUDA_VERSION="${{steps.cuda-toolkit.outputs.cuda}}"
echo "CUDA_VERSION='${CUDA_VERSION}'" >> "${GITHUB_ENV}"
TORCH_INDEX_URL="https://download.pytorch.org/whl/cu$(echo "${CUDA_VERSION}" | cut -d'.' -f-2 | tr -d '.')"
echo "TORCH_INDEX_URL='${TORCH_INDEX_URL}'" >> "${GITHUB_ENV}"

echo "Installed CUDA version is: ${CUDA_VERSION}"
echo "CUDA install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
nvcc -V
echo "Torch index URL: ${TORCH_INDEX_URL}"

- name: Upgrade pip
run: |
python -m pip install --upgrade pip setuptools

- name: Install dependencies
run: |
python -m pip install -r tests/requirements.txt
python -m pip install --extra-index-url "${TORCH_INDEX_URL}" \
-r tests/requirements.txt -r docs/requirements.txt

- name: Install TorchOpt
run: |
python -m pip install -e .

- name: pre-commit
run: |
make pre-commit

- name: flake8
run: |
make flake8

- name: isort and yapf
- name: pylint
run: |
make pylint

- name: isort and black
run: |
make py-format

- name: cpplint
run: |
make cpplint

- name: clang-format
run: |
make clang-format

- name: addlicense
run: |
make addlicense
Expand All @@ -69,10 +94,10 @@ jobs:
run: |
make mypy

# - name: docstyle
# run: |
# make docstyle
- name: docstyle
run: |
make docstyle

# - name: spelling
# run: |
# make spelling
- name: spelling
run: |
make spelling
11 changes: 9 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,24 @@ jobs:
method: network
sub-packages: '["nvcc"]'
- run: |
echo "Installed CUDA version is: ${{steps.cuda-toolkit.outputs.cuda}}"
CUDA_VERSION="${{steps.cuda-toolkit.outputs.cuda}}"
echo "CUDA_VERSION='${CUDA_VERSION}'" >> "${GITHUB_ENV}"
TORCH_INDEX_URL="https://download.pytorch.org/whl/cu$(echo "${CUDA_VERSION}" | cut -d'.' -f-2 | tr -d '.')"
echo "TORCH_INDEX_URL='${TORCH_INDEX_URL}'" >> "${GITHUB_ENV}"

echo "Installed CUDA version is: ${CUDA_VERSION}"
echo "CUDA install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
nvcc -V
echo "Torch index URL: ${TORCH_INDEX_URL}"

- name: Upgrade pip
run: |
python -m pip install --upgrade pip setuptools

- name: Install dependencies
run: |
python -m pip install -r tests/requirements.txt
python -m pip install --extra-index-url "${TORCH_INDEX_URL}" \
-r tests/requirements.txt

- name: Install TorchOpt
run: |
Expand Down
Loading