-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 480-assert-bad
- Loading branch information
Showing
35 changed files
with
2,166 additions
and
1,473 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 |
---|---|---|
|
@@ -2,21 +2,34 @@ name: Python CQA | |
|
||
on: [push, pull_request] | ||
|
||
|
||
# TODO: separate lint and test jobs; lint first, test "needs" lint | ||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobs | ||
|
||
jobs: | ||
test: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: actions/setup-python@v5 | ||
- name: Update pip and setuptools | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
- name: Install dependencies | ||
run: pip install -e '.[dev]' | ||
- name: Check style | ||
run: python3 -m ruff check --output-format=github | ||
- name: Check formatting | ||
run: python3 -m ruff format --check | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
env: | ||
SEQREPO_ROOT_DIR: ./tests/data/seqrepo/latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -43,7 +56,15 @@ jobs: | |
precommit_hooks: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
cmd: | ||
- "end-of-file-fixer" | ||
- "trailing-whitespace" | ||
- "mixed-line-ending" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- uses: pre-commit/[email protected] | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: ${{ matrix.cmd }} --all-files |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
version: "3" | ||
|
||
services: | ||
seqrepo: | ||
image: biocommons/seqrepo:2024-02-20 | ||
|
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,47 +1,51 @@ | ||
"""Python support used across GA4GH projects | ||
"""Python support used across GA4GH projects""" | ||
|
||
""" | ||
from importlib.metadata import PackageNotFoundError, version | ||
|
||
from importlib.metadata import version, PackageNotFoundError | ||
|
||
from .digests import sha512t24u | ||
from .enderef import ga4gh_enref, ga4gh_deref | ||
from .identifiers import ( | ||
ga4gh_digest, ga4gh_identify, ga4gh_serialize, is_ga4gh_identifier, | ||
VrsObjectIdentifierIs, use_ga4gh_compute_identifier_when, | ||
CURIE_NAMESPACE, CURIE_SEP, GA4GH_PREFIX_SEP, GA4GH_IR_REGEXP, GA4GH_DIGEST_REGEXP, | ||
PrevVrsVersion | ||
) | ||
from .pydantic import ( | ||
is_pydantic_instance, is_curie_type, pydantic_copy | ||
import ga4gh.core.models as core_models | ||
from ga4gh.core.digests import sha512t24u | ||
from ga4gh.core.enderef import ga4gh_deref, ga4gh_enref | ||
from ga4gh.core.identifiers import ( | ||
CURIE_NAMESPACE, | ||
CURIE_SEP, | ||
GA4GH_DIGEST_REGEXP, | ||
GA4GH_IR_REGEXP, | ||
GA4GH_PREFIX_SEP, | ||
PrevVrsVersion, | ||
VrsObjectIdentifierIs, | ||
ga4gh_digest, | ||
ga4gh_identify, | ||
ga4gh_serialize, | ||
is_ga4gh_identifier, | ||
use_ga4gh_compute_identifier_when, | ||
) | ||
from . import models as core_models | ||
from ga4gh.core.pydantic import is_curie_type, is_pydantic_instance, pydantic_copy | ||
|
||
__all__ = [ | ||
"sha512t24u", | ||
"ga4gh_enref", | ||
"CURIE_NAMESPACE", | ||
"CURIE_SEP", | ||
"GA4GH_DIGEST_REGEXP", | ||
"GA4GH_IR_REGEXP", | ||
"GA4GH_PREFIX_SEP", | ||
"PrevVrsVersion", | ||
"VrsObjectIdentifierIs", | ||
"core_models", | ||
"ga4gh_deref", | ||
"ga4gh_digest", | ||
"ga4gh_enref", | ||
"ga4gh_identify", | ||
"ga4gh_serialize", | ||
"is_curie_type", | ||
"is_ga4gh_identifier", | ||
"VrsObjectIdentifierIs", | ||
"use_ga4gh_compute_identifier_when", | ||
"CURIE_NAMESPACE", | ||
"CURIE_SEP", | ||
"GA4GH_PREFIX_SEP", | ||
"GA4GH_IR_REGEXP", | ||
"GA4GH_DIGEST_REGEXP", | ||
"PrevVrsVersion", | ||
"is_pydantic_instance", | ||
"is_curie_type", | ||
"pydantic_copy", | ||
"core_models", | ||
"sha512t24u", | ||
"use_ga4gh_compute_identifier_when", | ||
] | ||
|
||
try: | ||
__version__ = version(__name__) | ||
except PackageNotFoundError: # pragma: nocover | ||
except PackageNotFoundError: # pragma: nocover | ||
__version__ = "unknown" | ||
finally: | ||
del version, PackageNotFoundError |
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.