-
Notifications
You must be signed in to change notification settings - Fork 0
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
55 changed files
with
6,266 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,27 @@ | ||
--- | ||
name: upper-envelope | ||
|
||
channels: | ||
- conda-forge | ||
- nodefaults | ||
|
||
dependencies: | ||
- pip | ||
- setuptools_scm | ||
- toml | ||
|
||
# Package dependencies | ||
- jax | ||
- numpy | ||
- numba | ||
- pandas | ||
- pyyaml | ||
|
||
# Testing infrastructure | ||
- pytest | ||
- pytest-cov | ||
- pytest-xdist | ||
|
||
# Install locally | ||
- pip: | ||
- -e ../ |
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,48 @@ | ||
--- | ||
name: main | ||
# Automatically cancel a previous run. | ||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- '*' | ||
jobs: | ||
run-tests: | ||
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
python-version: | ||
- '3.10' | ||
- '3.11' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: create build environment | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: ./.envs/testenv.yml | ||
environment-name: upper-envelope | ||
create-args: | | ||
python=${{ matrix.python-version }} | ||
init-shell: >- | ||
bash | ||
powershell | ||
cache-environment: true | ||
- name: run pytest | ||
shell: bash -el {0} | ||
run: | | ||
micromamba activate upper-envelope | ||
pytest --cov-report=xml --cov=./ | ||
- name: Upload coverage report. | ||
if: runner.os == 'Linux' && matrix.python-version == '3.10' | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
# Files | ||
.pyc | ||
.txt | ||
.npy | ||
|
||
|
||
src/upper_envelope/_version.py | ||
|
||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
__pxcache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# MacOS specific service store | ||
.DS_Store | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
_build/ | ||
_generated/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
*build/ | ||
|
||
# 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 | ||
*.sublime-workspace | ||
*.sublime-project | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# VSCode project settings | ||
.vscode | ||
.idea | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
*notes/ | ||
|
||
*.bak | ||
|
||
*.db | ||
|
||
.pytask.sqlite3 | ||
|
||
*.~lock.* | ||
|
||
# Local envrc file | ||
*envrc | ||
|
||
|
||
# Debugging files should be ignored | ||
*.png |
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,110 @@ | ||
--- | ||
repos: | ||
- repo: meta | ||
hooks: | ||
- id: check-hooks-apply | ||
- id: check-useless-excludes | ||
# - id: identity # Prints all files passed to pre-commits. Debugging. | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.32.0 | ||
hooks: | ||
- id: yamllint | ||
- repo: https://github.com/lyz-code/yamlfix | ||
rev: 1.13.0 | ||
hooks: | ||
- id: yamlfix | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-added-large-files | ||
args: | ||
- --maxkb=500 | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-vcs-permalinks | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: fix-byte-order-marker | ||
- id: mixed-line-ending | ||
- id: no-commit-to-branch | ||
args: | ||
- --branch | ||
- main | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: python-check-blanket-noqa | ||
- id: python-check-mock-methods | ||
- id: python-no-eval | ||
- id: python-no-log-warn | ||
- id: python-use-type-annotations | ||
- id: text-unicode-replacement-char | ||
- repo: https://github.com/asottile/reorder-python-imports | ||
rev: v3.10.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
args: | ||
- --py37-plus | ||
- repo: https://github.com/asottile/setup-cfg-fmt | ||
rev: v2.4.0 | ||
hooks: | ||
- id: setup-cfg-fmt | ||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
hooks: | ||
- id: black | ||
language_version: python3.10 | ||
exclude: tests/utils/fast_upper_envelope_org.py | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.282 | ||
hooks: | ||
- id: ruff | ||
# exclude: | | ||
# (?x)^( | ||
# tests/| | ||
# docs/source/conf.py| | ||
# )$ | ||
- repo: https://github.com/PyCQA/docformatter | ||
rev: v1.7.5 | ||
hooks: | ||
- id: docformatter | ||
args: | ||
- --in-place | ||
- --wrap-summaries | ||
- '88' | ||
- --wrap-descriptions | ||
- '88' | ||
- --blank | ||
exclude: tests/utils/fast_upper_envelope_org.py | ||
- repo: https://github.com/nbQA-dev/nbQA | ||
rev: 1.7.0 | ||
hooks: | ||
- id: nbqa-black | ||
- id: nbqa-ruff | ||
- repo: https://github.com/executablebooks/mdformat | ||
rev: 0.7.16 | ||
hooks: | ||
- id: mdformat | ||
additional_dependencies: | ||
- mdformat-gfm | ||
- mdformat-black | ||
args: | ||
- --wrap | ||
- '88' | ||
files: (README\.md) | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.5 | ||
hooks: | ||
- id: codespell | ||
additional_dependencies: | ||
- tomli | ||
# - repo: https://github.com/mgedmin/check-manifest | ||
# rev: "0.49" | ||
# hooks: | ||
# - id: check-manifest | ||
# args: [--no-build-isolation] | ||
# additional_dependencies: [setuptools-scm, toml] | ||
ci: | ||
autoupdate_schedule: monthly |
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,36 @@ | ||
--- | ||
yaml-files: | ||
- '*.yaml' | ||
- '*.yml' | ||
- .yamllint | ||
rules: | ||
braces: enable | ||
brackets: enable | ||
colons: enable | ||
commas: enable | ||
comments: | ||
level: warning | ||
comments-indentation: | ||
level: warning | ||
document-end: disable | ||
document-start: | ||
level: warning | ||
empty-lines: enable | ||
empty-values: disable | ||
float-values: disable | ||
hyphens: enable | ||
indentation: {spaces: 2} | ||
key-duplicates: enable | ||
key-ordering: disable | ||
line-length: | ||
max: 88 | ||
allow-non-breakable-words: true | ||
allow-non-breakable-inline-mappings: false | ||
new-line-at-end-of-file: enable | ||
new-lines: | ||
type: unix | ||
octal-values: disable | ||
quoted-strings: disable | ||
trailing-spaces: enable | ||
truthy: | ||
level: warning |
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,20 @@ | ||
--- | ||
codecov: | ||
notify: | ||
require_ci_to_pass: true | ||
coverage: | ||
precision: 2 | ||
round: down | ||
range: 60...100 | ||
status: | ||
patch: | ||
default: | ||
target: 70% | ||
project: | ||
default: | ||
target: 90% | ||
ignore: | ||
- setup.py | ||
- tests/* | ||
- tests/**/* | ||
- .tox/**/* |
Oops, something went wrong.