-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from instadeepai/update-demo-notebook-3
Update demo notebook
- Loading branch information
Showing
8 changed files
with
713 additions
and
570 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,24 @@ | ||
[html] | ||
directory = coverage | ||
|
||
[run] | ||
source = | ||
instageo | ||
omit = | ||
*/__init__.py | ||
*_test.py | ||
|
||
[report] | ||
omit = | ||
__init__.py | ||
*_test.py | ||
*app.py | ||
|
||
exclude_lines = | ||
# Don't complain if tests don't hit defensive assertion code: | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
# Don't complain if non-runnable code isn't run: | ||
if 0: | ||
if __name__ == .__main__.: |
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,37 @@ | ||
name: Tests and Linters 🧪 | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests-and-linters: | ||
name: "Python 3.10 on Ubuntu Latest" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install dependencies for viewer test | ||
run: sudo apt-get update && sudo apt-get install -y xvfb | ||
- name: Checkout your repo 📦 | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install python dependencies 🔧 | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements.txt \ | ||
-r instageo/model/requirements.txt \ | ||
-r instageo/data/requirements.txt \ | ||
-r instageo/apps/requirements.txt | ||
- name: Run linters 🖌️ | ||
run: pre-commit run --all-files --verbose | ||
- name: Set PYTHONPATH | ||
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)" >> $GITHUB_ENV | ||
- name: Run tests 🧪 | ||
env: | ||
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }} | ||
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }} | ||
run: pytest --cov --cov-config=.coveragerc --cov-report=html --cov-report=term-missing --cov-fail-under=50 -m "not auth" | ||
# - name: Test build docs 📖 | ||
# run: mkdocs build --verbose --site-dir docs_public |
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,88 @@ | ||
# Pre-commit hooks for repo. | ||
|
||
# Packages: | ||
# pre-commit: General pre-commits for formatting. | ||
# black: Python code strict formatting. | ||
# pyupgrade: Upgrade syntax for newer versions of the language. | ||
# isort: Sorts imports. | ||
# flake8: Checks code follows PEP8 standard. | ||
# mypy: Static typing. | ||
# conventional-pre-commit: commit format checker. | ||
# blacken-docs: Checks docs follow black format standard. | ||
# pydocstyle: Checking docstring style. | ||
|
||
default_stages: ["commit", "commit-msg", "push"] | ||
default_language_version: | ||
python: python3.10 | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
exclude_types: [image] | ||
- id: check-merge-conflict | ||
- id: debug-statements | ||
- id: mixed-line-ending | ||
- id: check-yaml | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.11.0 | ||
hooks: | ||
- id: black | ||
exclude_types: [image] | ||
language_version: python3 | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.0 | ||
hooks: | ||
- id: pyupgrade | ||
|
||
- repo: https://github.com/timothycrosley/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files"] | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
args: | ||
[ | ||
"--max-line-length=100", | ||
"--extend-ignore=E203,BLK100", | ||
"--exclude=*tests*", | ||
] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.7.0 | ||
hooks: | ||
- id: mypy | ||
exclude: ^docs/|test | ||
args: [--config-file=setup.cfg] | ||
|
||
- repo: https://github.com/compilerla/conventional-pre-commit | ||
rev: v3.0.0 | ||
hooks: | ||
- id: conventional-pre-commit | ||
stages: [commit-msg] | ||
|
||
- repo: https://github.com/asottile/blacken-docs | ||
rev: 1.16.0 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black>=22.1.0] | ||
language_version: python3 | ||
|
||
- repo: https://github.com/pycqa/pydocstyle | ||
rev: 6.3.0 | ||
hooks: | ||
- id: pydocstyle | ||
name: Checking docstring style. | ||
args: | ||
[ | ||
"--convention=google", | ||
"--match=^((?!test).)*$", | ||
] |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ einops | |
tensorboard | ||
omegaconf | ||
hydra-core | ||
torchvision |
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
Oops, something went wrong.