-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
126 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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,12 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.7" | ||
|
||
python: | ||
install: | ||
- requirements: requirements.txt | ||
submodules: | ||
include: all |
This file contains 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,58 @@ | ||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
|
||
jobs: | ||
ci: | ||
name: "CI setup" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.12" | ||
- "3.11" | ||
- "3.10" | ||
|
||
os: | ||
- "ubuntu-latest" | ||
|
||
runs-on: "${{ matrix.os }}" | ||
|
||
# use bash everywhere | ||
defaults: | ||
run: | ||
shell: "bash -l {0}" | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: "actions/checkout@v4" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run pytest | ||
run: pytest -v | ||
|
||
- name: Check style | ||
run: yapf -d --recursive milliontrees/ --style=.style.yapf | ||
|
||
- name: Check notebook style | ||
run: nbqa yapf --in-place docs/examples/*.ipynb --style=.style.yapf | ||
|
||
# - name: Check notebook build | ||
# run: pytest --nbmake docs/*.ipynb | ||
|
||
- name: Run docformatter | ||
run: docformatter --check --recursive milliontrees/ | ||
|
||
- name: Test Docs | ||
run: | | ||
cd docs && make clean && make html SPHINXOPTS="-W" |
This file contains 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,39 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains 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 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,13 @@ | ||
numpy>=1.19.1 | ||
ogb>=1.2.6 | ||
outdated>=0.2.0 | ||
pandas>=1.1.0 | ||
pillow>=7.2.0 | ||
pytz>=2020.4 | ||
torch>=1.7.0 | ||
torchvision>=0.8.2 | ||
tqdm>=4.53.0 | ||
scikit-learn>=0.20.0 | ||
scipy>=1.5.4 | ||
albumentations>=0.5.2 | ||
pytest>=6.2.1 |