-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: incorporate more style check and package build elements from Bioc…
…ommons template (#58)
- Loading branch information
1 parent
44ede49
commit b444778
Showing
21 changed files
with
323 additions
and
306 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 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Additional context** | ||
Add any other context about the problem 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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file was deleted.
Oops, something went wrong.
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,34 @@ | ||
name: Python package | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
cqa: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: pip | ||
cache-dependency-path: '**/setup.cfg' | ||
|
||
- name: Install test dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --use-deprecated=legacy-resolver -e .[dev] | ||
- name: Lint with Ruff | ||
run: python3 -m ruff check src/ | ||
|
||
- name: Format check with black | ||
run: black --check src | ||
|
||
- name: Security check with bandit | ||
run: bandit -ll -r src | ||
|
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
hooks: | ||
- id: black | ||
language_version: python3.11 | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.244 | ||
rev: v0.0.290 | ||
hooks: | ||
- id: ruff | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.6.4 | ||
hooks: | ||
- id: isort | ||
args: ["--check"] |
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 |
---|---|---|
@@ -1,3 +1,65 @@ | ||
[project] | ||
name = "biocommons.anyvar" | ||
authors = [ | ||
{ name="biocommons contributors", email="[email protected]" }, | ||
] | ||
description = "AnyVar provides Python and REST interfaces to validate, normalize, generate identifiers, and register biological sequence variation according to the GA4GH Variation Representation standards." | ||
readme = "README.md" | ||
license = { file="LICENSE" } | ||
requires-python = ">=3.9" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/biocommons/anyvar" | ||
"Bug Tracker" = "https://github.com/biocommons/anyvar/issues" | ||
|
||
|
||
[build-system] | ||
requires = [ | ||
"setuptools >= 65.3", | ||
"setuptools_scm[toml] ~= 7.0" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
||
[tool.setuptools_scm] | ||
|
||
|
||
[tool.coverage.run] | ||
branch = true | ||
source = ["biocommons.example"] | ||
omit = ["*_test.py", "*/test/*", "*/tests/*"] | ||
|
||
|
||
[tool.coverage.report] | ||
show_missing = true | ||
exclude_lines = [ | ||
# Have to re-enable the standard pragma | ||
"pragma: no cover", | ||
|
||
# Don't complain about missing debug-only code: | ||
"def __repr__", | ||
"if self.debug", | ||
|
||
# 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 __name__ == .__main__.:", | ||
] | ||
|
||
[tool.black] | ||
line-length = 100 | ||
|
||
[tool.ruff] | ||
exclude = [ | ||
"venv", | ||
|
@@ -6,11 +68,7 @@ exclude = [ | |
"tests" | ||
] | ||
|
||
line-length = 88 | ||
line-length = 100 | ||
|
||
[tool.ruff.per-file-ignores] | ||
"__init__.py" = ["F401", "E402"] | ||
"uidoc.py" = ["E501"] | ||
|
||
[tool.isort] | ||
group_by_package = true |
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 |
---|---|---|
@@ -1,12 +1,7 @@ | ||
[metadata] | ||
name = anyvar | ||
author = Reece Hart | ||
author-email = [email protected] | ||
description-file = README.rst | ||
description-content-type = text/x-rst; charset=UTF-8 | ||
|
||
[options] | ||
zip_safe = false | ||
packages = find_namespace: | ||
package_dir = | ||
= src | ||
install_requires = | ||
canonicaljson | ||
fastapi >= 0.95.0 | ||
|
@@ -15,11 +10,6 @@ install_requires = | |
ga4gh.vrs[extras] ~= 0.8.4 | ||
ga4gh.vrsatile.pydantic ~= 0.0.11 | ||
psycopg[binary] | ||
setup_requires = | ||
setuptools_scm | ||
packages = find: | ||
package_dir = | ||
= src | ||
|
||
[options.package_data] | ||
* = | ||
|
@@ -35,24 +25,15 @@ exclude = | |
|
||
[options.extras_require] | ||
dev = | ||
ruff | ||
pre-commit | ||
isort | ||
black | ||
ruff | ||
pre-commit | ||
bandit~=1.7 | ||
test = | ||
pytest | ||
pytest-cov | ||
pytest-mock | ||
httpx | ||
|
||
|
||
[aliases] | ||
test = pytest | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[build_sphinx] | ||
all_files = 1 | ||
pytest | ||
pytest-cov | ||
pytest-mock | ||
httpx | ||
|
||
[tool:pytest] | ||
addopts = --cov=anyvar --cov-report term-missing |
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
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.