-
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.
- Loading branch information
0 parents
commit fa4dd3c
Showing
56 changed files
with
6,181 additions
and
0 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 instadeep-ci" | ||
runs-on: instadeep-ci | ||
container: | ||
image: python:3.10 | ||
|
||
steps: | ||
- name: Install dependencies for viewer test | ||
run: apt-get update && apt-get install -y xvfb | ||
- name: Checkout your repo 📦 | ||
uses: actions/checkout@v3 | ||
|
||
- 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 | ||
- run: git config --system --add safe.directory $GITHUB_WORKSPACE | ||
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# PyCharm stuff | ||
.idea/ | ||
|
||
# VSCode stuff | ||
.vscode | ||
|
||
# Docker stuff | ||
.devcontainer | ||
|
||
# MacBook Finder | ||
.DS_Store | ||
|
||
# Experiment results | ||
outputs/ | ||
|
||
|
||
*.pyc | ||
__pycache__/ | ||
*lightning_logs | ||
*prithvi/ | ||
*.ipynb | ||
nul/ | ||
notebooks/ | ||
!notebooks/*.ipynb |
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).)*$", | ||
] |
Oops, something went wrong.