-
-
Notifications
You must be signed in to change notification settings - Fork 9
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 93cfe85
Showing
31 changed files
with
1,920 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,18 @@ | ||
version = 1 | ||
|
||
test_patterns = [ | ||
"*/tests/**", | ||
"*/test_*.py" | ||
] | ||
|
||
exclude_patterns = [ | ||
"docs/**", | ||
"ci/**" | ||
] | ||
|
||
[[analyzers]] | ||
name = "python" | ||
enabled = true | ||
|
||
[analyzers.meta] | ||
runtime_version = "3.x.x" |
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,15 @@ | ||
* PyNHD version: | ||
* Python version: | ||
* Operating System: | ||
|
||
### Description | ||
|
||
Describe what you were trying to get done. | ||
Tell us what happened, what went wrong, and what you expected to happen. | ||
|
||
### What I Did | ||
|
||
``` | ||
Paste the command(s) you ran and the output. | ||
If there was a crash, please include the traceback here. | ||
``` |
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,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
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,17 @@ | ||
name: lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
run-linters: | ||
name: Run linters | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- uses: pre-commit/[email protected] | ||
|
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,28 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
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,38 @@ | ||
name: build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: pytest (${{ matrix.python-version }}, ${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8"] | ||
os: ["ubuntu-latest", "macos-latest"] | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Setup Miniconda | ||
uses: goanpeca/[email protected] | ||
with: | ||
activate-environment: pynhd | ||
python-version: ${{ matrix.python-version }} | ||
environment-file: ci/requirements/py${{ matrix.python-version }}.yml | ||
auto-update-conda: true | ||
auto-activate-base: false | ||
|
||
- name: Install pynhd | ||
shell: bash -l {0} | ||
run: | | ||
conda info | ||
conda list | ||
conda install -y -c conda-forge pytest pytest-runner pytest-cov pytest-xdist codecov | ||
pip install --no-deps -e . | ||
- name: Run tests | ||
shell: bash -l {0} | ||
run: pytest --cov=pynhd --cov-report term-missing --cov-report xml --verbose --color=yes | ||
|
||
- name: Run codecov | ||
uses: codecov/[email protected] |
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 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# 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/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
.venv | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# IDE settings | ||
.vscode/ | ||
|
||
# logs | ||
.nvimlog | ||
data/ | ||
tags* |
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,6 @@ | ||
# https://github.com/OrkoHunter/pep8speaks for more info | ||
# pep8speaks will use the flake8 configs in `setup.cfg` | ||
|
||
scanner: | ||
diff_only: False | ||
linter: flake8 |
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 @@ | ||
repos: | ||
# isort should run before black as black sometimes tweaks the isort output | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: 5.1.4 | ||
hooks: | ||
- id: isort | ||
name: Sort imports with isort | ||
|
||
- repo: https://github.com/python/black | ||
rev: 19.10b0 | ||
hooks: | ||
- id: black | ||
name: Autoformat with black | ||
args: [-t, py38, -l, "100"] | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.1.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-executables-have-shebangs | ||
- id: requirements-txt-fixer | ||
|
||
- repo: https://github.com/PyCQA/doc8 | ||
rev: 0.8.1rc3 | ||
hooks: | ||
- id: doc8 | ||
name: Autoformat with doc8 | ||
args: [--max-line-length, "100"] | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.3 | ||
hooks: | ||
- id: flake8 | ||
name: Linting with flake8 | ||
exclude: docs/conf.py | ||
additional_dependencies: [flake8-comprehensions, flake8-builtins, flake8-blind-except, flake8-bugbear, flake8-use-fstring, flake8-docstrings] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.782 | ||
hooks: | ||
- id: mypy | ||
name: Static type checking with mypy | ||
files: pynhd | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.7.1 | ||
hooks: | ||
- id: pyupgrade | ||
name: Upgrade synax to python 3.6+ with pyupgrade | ||
args: [--py36-plus] | ||
|
||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.6.2 | ||
hooks: | ||
- id: bandit | ||
name: Check for security issues with bandit | ||
args: [-lll, --recursive, pynhd] | ||
files: .py$ |
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 @@ | ||
======= | ||
Credits | ||
======= | ||
|
||
Development Lead | ||
---------------- | ||
|
||
* Taher Chegini <[email protected]> | ||
|
||
Contributors | ||
------------ | ||
|
||
None yet. Why not be the first? |
Oops, something went wrong.