-
Notifications
You must be signed in to change notification settings - Fork 39
chore(setup): rewrite packaging #24
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a70220e
chore(setup): rewrite packaging
XuehaiPan 0a1ccb8
chore: fix file modes
XuehaiPan 01df51e
docs(README): update README
XuehaiPan c5d6b80
style: format code with yapf
XuehaiPan fbe3b12
style: reindent license
XuehaiPan fdf5077
chore(workflow): install CUDA Toolkit in GitHub Action
XuehaiPan 857338a
feat(workflow): build PyPI wheels for Python 3.7 / 3.8 / 3.9 / 3.10
XuehaiPan b9f9ebe
refactor(setup): use pybind11 PyPI package rather than git submodule
XuehaiPan ca92f9f
chore(setup): add dependency `typing-extensions`
XuehaiPan 294f7ed
chore(workflow): update workflow trigger
XuehaiPan bf14292
docs: use HTTPS URL for git clone
XuehaiPan 2e80b67
fix(tests): update requirements.txt
XuehaiPan 4ab4efa
chore(setup): remove deprecated dependency `distutils`
XuehaiPan 9580a96
test: disable CUDA tests if no GPU available
XuehaiPan 8640b81
chore(workflow): use Python 3.7 in tests
XuehaiPan 9730748
refactor(Makefile): update Makefile
XuehaiPan 3dcd29c
style: format CXX code
XuehaiPan 2f4e44f
chore(tests): test with CUDA Toolkit 11.3
XuehaiPan ad069a4
feat(CMakeLists.txt): auto detect nvcc arch flags
XuehaiPan bce754b
chore(workflow): set timeout
XuehaiPan 2dba710
docs: update sphinx docs
XuehaiPan de1bb87
chore: use CamelCased URL paths
XuehaiPan 5597da7
chore: add conda recipe
XuehaiPan 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 hidden or 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 contains hidden or 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 |
---|---|---|
@@ -1,44 +1,78 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Cancel previous run | ||
uses: styfle/cancel-workflow-action@0.9.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Upgrade pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Install requirements | ||
run: | | ||
python -m pip install -r requirements.txt | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -e . | ||
- name: flake8 | ||
run: | | ||
make flake8 | ||
- name: isort and yapf | ||
run: | | ||
make py-format | ||
- name: addlicense | ||
run: | | ||
make addlicense | ||
- name: mypy | ||
run: | | ||
make mypy | ||
- name: Cancel previous run | ||
uses: styfle/cancel-workflow-action@0.10.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 1 | ||
|
||
- name: Set up Python 3.7 # the lowest version we support | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.7" | ||
update-environment: true | ||
|
||
- name: Setup CUDA Toolkit | ||
uses: Jimver/cuda-toolkit@v0.2.7 | ||
id: cuda-toolkit | ||
with: | ||
cuda: "11.3.1" | ||
method: network | ||
sub-packages: '["nvcc"]' | ||
- run: | | ||
echo "Installed CUDA version is: ${{steps.cuda-toolkit.outputs.cuda}}" | ||
echo "CUDA install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}" | ||
nvcc -V | ||
|
||
- name: Upgrade pip | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -r tests/requirements.txt | ||
|
||
- name: Install TorchOpt | ||
run: | | ||
python -m pip install -e . | ||
|
||
- name: flake8 | ||
run: | | ||
make flake8 | ||
|
||
- name: isort and yapf | ||
run: | | ||
make py-format | ||
|
||
- name: addlicense | ||
run: | | ||
make addlicense | ||
|
||
- name: mypy | ||
run: | | ||
make mypy | ||
|
||
# - name: docstyle | ||
# run: | | ||
# make docstyle | ||
|
||
# - name: spelling | ||
# run: | | ||
# make spelling | ||
# make spelling |
This file contains hidden or 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 contains hidden or 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,60 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Cancel previous run | ||
uses: styfle/cancel-workflow-action@0.10.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 1 | ||
|
||
- name: Set up Python 3.7 # the lowest version we support | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.7" | ||
update-environment: true | ||
|
||
- name: Setup CUDA Toolkit | ||
uses: Jimver/cuda-toolkit@v0.2.7 | ||
id: cuda-toolkit | ||
with: | ||
cuda: "11.3.1" | ||
method: network | ||
sub-packages: '["nvcc"]' | ||
- run: | | ||
echo "Installed CUDA version is: ${{steps.cuda-toolkit.outputs.cuda}}" | ||
echo "CUDA install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}" | ||
nvcc -V | ||
|
||
- name: Upgrade pip | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -r tests/requirements.txt | ||
|
||
- name: Install TorchOpt | ||
run: | | ||
python -m pip install -e . | ||
|
||
- name: Test with pytest | ||
run: | | ||
make pytest |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
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.
If you got time, maybe add the docstyle? (docsting is a mess right now I think)
Uh oh!
There was an error while loading. Please reload this page.
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.
We may open a separate PR for this.