protein-quest 1.0.0__tar.gz → 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {protein_quest-1.0.0 → protein_quest-1.1.0}/.github/workflows/ci.yml +17 -18
- {protein_quest-1.0.0 → protein_quest-1.1.0}/.github/workflows/pages.yml +8 -8
- {protein_quest-1.0.0 → protein_quest-1.1.0}/.github/workflows/pypi-publish.yml +4 -4
- {protein_quest-1.0.0 → protein_quest-1.1.0}/.howfairis.yml +1 -1
- protein_quest-1.1.0/.markdownlint-cli2.yaml +16 -0
- protein_quest-1.1.0/.pre-commit-config.yaml +87 -0
- protein_quest-1.1.0/.vscode/extensions.json +8 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/CITATION.cff +1 -1
- {protein_quest-1.0.0 → protein_quest-1.1.0}/CODE_OF_CONDUCT.md +29 -29
- protein_quest-1.1.0/CONTRIBUTING.md +185 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/PKG-INFO +67 -30
- {protein_quest-1.0.0 → protein_quest-1.1.0}/README.md +65 -29
- protein_quest-1.1.0/docs/CONTRIBUTING.md +3 -0
- protein_quest-1.1.0/docs/faq.md +21 -0
- protein_quest-1.1.0/docs/index.md +3 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/mkdocs.yml +9 -9
- {protein_quest-1.0.0 → protein_quest-1.1.0}/pyproject.toml +2 -1
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/__version__.py +1 -1
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/cli.py +47 -3
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/converter.py +1 -1
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/mcp_server.py +2 -2
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/uniprot.py +1 -1
- protein_quest-1.1.0/tests/cassettes/test_cli/test_search_uniprot_with_provenance.yaml +64 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_cli.py +27 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/uv.lock +39 -0
- protein_quest-1.0.0/.vscode/extensions.json +0 -8
- protein_quest-1.0.0/CONTRIBUTING.md +0 -109
- protein_quest-1.0.0/docs/CONTRIBUTING.md +0 -1
- protein_quest-1.0.0/docs/faq.md +0 -17
- protein_quest-1.0.0/docs/index.md +0 -1
- {protein_quest-1.0.0 → protein_quest-1.1.0}/.gitignore +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/.python-version +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/LICENSE +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/docs/notebooks/.gitignore +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/docs/notebooks/alphafold.ipynb +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/docs/notebooks/index.md +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/docs/notebooks/pdbe.ipynb +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/docs/notebooks/uniprot.ipynb +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/docs/protein-quest-mcp.png +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/__init__.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/alphafold/__init__.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/alphafold/confidence.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/alphafold/entry_summary.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/alphafold/fetch.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/emdb.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/filters.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/go.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/io.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/parallel.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/pdbe/__init__.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/pdbe/fetch.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/py.typed +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/ss.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/structure.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/taxonomy.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/src/protein_quest/utils.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/alphafold/AF-A1YPR0-F1-model_v4.pdb +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/alphafold/cassettes/test_fetch/test_fetch_alphafold_db_version.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/alphafold/cassettes/test_fetch/test_fetch_many.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/alphafold/cassettes/test_fetch/test_fetch_many_all_isoforms.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/alphafold/cassettes/test_fetch/test_fetch_many_gzipped.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/alphafold/cassettes/test_fetch/test_fetch_many_no_summary.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/alphafold/cassettes/test_fetch/test_fetch_many_no_summary_with_version.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/alphafold/test_confidence.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/alphafold/test_entry_summary.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/alphafold/test_fetch.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_cli/test_search_alphafold.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_cli/test_search_pdbe.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_cli/test_search_uniprot.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_cli/test_search_uniprot_details.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_emdb/test_fetch.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_go/test_search_gene_ontology_term.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_taxonomy/test_search_taxon.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_taxonomy/test_search_taxon_by_id.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/TestSearch4AfExternalIsoforms.test_do_not_match_external_isoform.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/TestSearch4AfExternalIsoforms.test_match_canonical_isoform.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/test_map_uniprot_accessions2uniprot_details.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/test_search4af.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/test_search4af_ok_sequence_length.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/test_search4af_too_big_sequence_length.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/test_search4af_too_small_sequence_length.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/test_search4emdb.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/test_search4interaction_partners.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/test_search4macromolecular_complexes.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/test_search4pdb.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/cassettes/test_uniprot/test_search4uniprot.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/conftest.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/fixtures/2Y29.cif.gz +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/fixtures/3JRS_B2A.cif.gz +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/pdbe/cassettes/test_fetch/test_fetch.yaml +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/pdbe/test_fetch.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_converter.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_emdb.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_filters.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_go.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_io.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_mcp.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_parallel.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_ss.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_structure.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_taxonomy.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_uniprot.py +0 -0
- {protein_quest-1.0.0 → protein_quest-1.1.0}/tests/test_utils.py +0 -0
|
@@ -17,9 +17,9 @@ jobs:
|
|
|
17
17
|
permissions:
|
|
18
18
|
id-token: write
|
|
19
19
|
steps:
|
|
20
|
-
- uses: actions/checkout@
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
21
|
- name: Install uv
|
|
22
|
-
uses: astral-sh/setup-uv@
|
|
22
|
+
uses: astral-sh/setup-uv@v7
|
|
23
23
|
- name: Install the project
|
|
24
24
|
run: uv sync --locked --dev --extra mcp
|
|
25
25
|
- name: Install pocl
|
|
@@ -27,8 +27,8 @@ jobs:
|
|
|
27
27
|
- name: Cache downloaded test data
|
|
28
28
|
uses: actions/cache@v4
|
|
29
29
|
with:
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
path: ~/.cache/protein-quest-tests
|
|
31
|
+
key: cached-protein-quest-tests
|
|
32
32
|
- name: Run tests
|
|
33
33
|
run: |
|
|
34
34
|
uv run pytest --cov --cov-report=xml
|
|
@@ -42,27 +42,27 @@ jobs:
|
|
|
42
42
|
name: build
|
|
43
43
|
runs-on: ubuntu-latest
|
|
44
44
|
steps:
|
|
45
|
-
- uses: actions/checkout@
|
|
45
|
+
- uses: actions/checkout@v6
|
|
46
46
|
- name: Install uv
|
|
47
|
-
uses: astral-sh/setup-uv@
|
|
47
|
+
uses: astral-sh/setup-uv@v7
|
|
48
48
|
- name: Build the project
|
|
49
49
|
run: uv build
|
|
50
50
|
lint:
|
|
51
51
|
name: lint
|
|
52
52
|
runs-on: ubuntu-latest
|
|
53
53
|
steps:
|
|
54
|
-
- uses: actions/checkout@
|
|
54
|
+
- uses: actions/checkout@v6
|
|
55
55
|
- name: Install uv
|
|
56
|
-
uses: astral-sh/setup-uv@
|
|
56
|
+
uses: astral-sh/setup-uv@v7
|
|
57
57
|
- name: Run linters
|
|
58
58
|
run: uvx ruff check
|
|
59
59
|
typing:
|
|
60
60
|
name: typing
|
|
61
61
|
runs-on: ubuntu-latest
|
|
62
62
|
steps:
|
|
63
|
-
- uses: actions/checkout@
|
|
63
|
+
- uses: actions/checkout@v6
|
|
64
64
|
- name: Install uv
|
|
65
|
-
uses: astral-sh/setup-uv@
|
|
65
|
+
uses: astral-sh/setup-uv@v7
|
|
66
66
|
- name: Install the project
|
|
67
67
|
run: uv sync --locked --dev --extra mcp
|
|
68
68
|
- name: Run type checkers
|
|
@@ -71,9 +71,9 @@ jobs:
|
|
|
71
71
|
name: typing-docs
|
|
72
72
|
runs-on: ubuntu-latest
|
|
73
73
|
steps:
|
|
74
|
-
- uses: actions/checkout@
|
|
74
|
+
- uses: actions/checkout@v6
|
|
75
75
|
- name: Install uv
|
|
76
|
-
uses: astral-sh/setup-uv@
|
|
76
|
+
uses: astral-sh/setup-uv@v7
|
|
77
77
|
- name: Install the project
|
|
78
78
|
run: uv sync --group docs-type
|
|
79
79
|
- name: Convert notebooks to Python scripts
|
|
@@ -81,13 +81,12 @@ jobs:
|
|
|
81
81
|
find docs/ -name "*.ipynb" -exec uv run --group docs-type marimo convert {} -o {}.py \;
|
|
82
82
|
- name: Run type checkers on docs
|
|
83
83
|
run: uv run --group docs-type pyrefly check docs/notebooks/*.ipynb.py
|
|
84
|
-
|
|
84
|
+
pre-commit:
|
|
85
85
|
runs-on: ubuntu-latest
|
|
86
86
|
steps:
|
|
87
|
-
- uses: actions/checkout@
|
|
88
|
-
- name: Install
|
|
87
|
+
- uses: actions/checkout@v6
|
|
88
|
+
- name: Install nodejs
|
|
89
89
|
uses: actions/setup-node@v6
|
|
90
90
|
with:
|
|
91
|
-
node-version:
|
|
92
|
-
-
|
|
93
|
-
run: npx jscpd src
|
|
91
|
+
node-version: "24"
|
|
92
|
+
- uses: j178/prek-action@v1
|
|
@@ -23,20 +23,20 @@ jobs:
|
|
|
23
23
|
steps:
|
|
24
24
|
- name: Checkout
|
|
25
25
|
uses: actions/checkout@v4
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
- name: Install uv
|
|
28
28
|
uses: astral-sh/setup-uv@v6
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
- name: Install dependencies
|
|
31
31
|
run: uv sync --locked --group docs
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
- name: Build MkDocs site
|
|
34
34
|
run: |
|
|
35
35
|
uv run mkdocs build
|
|
36
36
|
env:
|
|
37
37
|
# Force colored output from rich library
|
|
38
|
-
TTY_COMPATIBLE:
|
|
39
|
-
TTY_INTERACTIVE:
|
|
38
|
+
TTY_COMPATIBLE: "1"
|
|
39
|
+
TTY_INTERACTIVE: "0"
|
|
40
40
|
|
|
41
41
|
- name: Upload artifact
|
|
42
42
|
uses: actions/upload-pages-artifact@v3
|
|
@@ -52,8 +52,8 @@ jobs:
|
|
|
52
52
|
|
|
53
53
|
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
|
54
54
|
permissions:
|
|
55
|
-
pages: write
|
|
56
|
-
id-token: write
|
|
55
|
+
pages: write # to deploy to Pages
|
|
56
|
+
id-token: write # to verify the deployment originates from an appropriate source
|
|
57
57
|
|
|
58
58
|
# Deploy to the github-pages environment
|
|
59
59
|
environment:
|
|
@@ -62,7 +62,7 @@ jobs:
|
|
|
62
62
|
|
|
63
63
|
# Specify runner + deployment step
|
|
64
64
|
runs-on: ubuntu-latest
|
|
65
|
-
steps:
|
|
65
|
+
steps:
|
|
66
66
|
- name: Deploy to GitHub Pages
|
|
67
67
|
id: deployment
|
|
68
68
|
uses: actions/deploy-pages@v4
|
|
@@ -12,15 +12,15 @@ jobs:
|
|
|
12
12
|
name: pypi
|
|
13
13
|
url: https://pypi.org/p/protein-quest
|
|
14
14
|
permissions:
|
|
15
|
-
id-token: write
|
|
15
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
16
16
|
steps:
|
|
17
17
|
- uses: actions/checkout@v4
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
- name: Install uv
|
|
20
20
|
uses: astral-sh/setup-uv@v6
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
- name: Build package
|
|
23
23
|
run: uv build
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
- name: Publish to PyPI
|
|
26
26
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
skip_checklist_checks_reason: "I'm using the fairsoftwarechecklist"
|
|
1
|
+
skip_checklist_checks_reason: "I'm using the fairsoftwarechecklist"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# markdownlint-cli2 configuration file
|
|
2
|
+
# See https://github.com/DavidAnson/markdownlint-cli2 for documentation
|
|
3
|
+
|
|
4
|
+
# Disable rules that conflict with Prettier formatting
|
|
5
|
+
config:
|
|
6
|
+
no-trailing-spaces: false
|
|
7
|
+
no-hard-tabs: false
|
|
8
|
+
no-multiple-blanks: false
|
|
9
|
+
line-length: false
|
|
10
|
+
blanks-around-headings: false
|
|
11
|
+
list-marker-space: false
|
|
12
|
+
blanks-around-fences: false
|
|
13
|
+
blanks-around-lists: false
|
|
14
|
+
no-inline-html: false
|
|
15
|
+
single-trailing-newline: false
|
|
16
|
+
descriptive-link-text: false
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Keeping pytest and pyrefly out of pre-commit as they need full venv.
|
|
2
|
+
# To run needs docker and nodejs installed.
|
|
3
|
+
|
|
4
|
+
# Do not check or fix downloaded files
|
|
5
|
+
exclude: ^tests/.*(\.yaml|\.pdb)$
|
|
6
|
+
|
|
7
|
+
repos:
|
|
8
|
+
- repo: https://github.com/adamchainz/blacken-docs
|
|
9
|
+
rev: "1.20.0"
|
|
10
|
+
hooks:
|
|
11
|
+
- id: blacken-docs
|
|
12
|
+
additional_dependencies: [black==25.*]
|
|
13
|
+
|
|
14
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
15
|
+
rev: "v6.0.0"
|
|
16
|
+
hooks:
|
|
17
|
+
- id: check-added-large-files
|
|
18
|
+
- id: check-case-conflict
|
|
19
|
+
- id: check-merge-conflict
|
|
20
|
+
- id: check-symlinks
|
|
21
|
+
- id: check-yaml
|
|
22
|
+
- id: debug-statements
|
|
23
|
+
- id: end-of-file-fixer
|
|
24
|
+
- id: mixed-line-ending
|
|
25
|
+
- id: name-tests-test
|
|
26
|
+
args: ["--pytest-test-first"]
|
|
27
|
+
- id: requirements-txt-fixer
|
|
28
|
+
- id: trailing-whitespace
|
|
29
|
+
|
|
30
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
31
|
+
rev: "v1.10.0"
|
|
32
|
+
hooks:
|
|
33
|
+
- id: rst-backticks
|
|
34
|
+
- id: rst-directive-colons
|
|
35
|
+
- id: rst-inline-touching-normal
|
|
36
|
+
|
|
37
|
+
- repo: https://github.com/rbubley/mirrors-prettier
|
|
38
|
+
rev: "v3.7.4"
|
|
39
|
+
hooks:
|
|
40
|
+
- id: prettier
|
|
41
|
+
types_or: [yaml, markdown, html, css, scss, javascript, json]
|
|
42
|
+
args: [--prose-wrap=always]
|
|
43
|
+
|
|
44
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
45
|
+
rev: "v0.14.10"
|
|
46
|
+
hooks:
|
|
47
|
+
- id: ruff-check
|
|
48
|
+
args: ["--fix", "--show-fixes"]
|
|
49
|
+
- id: ruff-format
|
|
50
|
+
|
|
51
|
+
- repo: https://github.com/codespell-project/codespell
|
|
52
|
+
rev: "v2.4.1"
|
|
53
|
+
hooks:
|
|
54
|
+
- id: codespell
|
|
55
|
+
additional_dependencies:
|
|
56
|
+
- tomli; python_version<'3.11'
|
|
57
|
+
|
|
58
|
+
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
59
|
+
rev: "v0.11.0.1"
|
|
60
|
+
hooks:
|
|
61
|
+
- id: shellcheck
|
|
62
|
+
|
|
63
|
+
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
64
|
+
rev: "0.36.0"
|
|
65
|
+
hooks:
|
|
66
|
+
- id: check-github-workflows
|
|
67
|
+
- id: check-citation-file-format
|
|
68
|
+
# Not checking mkdocs.yml as hook does not support custom YAML tags like !!python/....
|
|
69
|
+
# see https://github.com/python-jsonschema/check-jsonschema/issues/489
|
|
70
|
+
# mkdocs schema exists at https://www.schemastore.org/mkdocs-1.6.json
|
|
71
|
+
|
|
72
|
+
# Tried to use official jscpd repo, but got jscpd not found error
|
|
73
|
+
- repo: local
|
|
74
|
+
hooks:
|
|
75
|
+
- id: jscpd
|
|
76
|
+
name: jscpd code duplication checker
|
|
77
|
+
entry: npx jscpd
|
|
78
|
+
language: node
|
|
79
|
+
args: ["--gitignore", "--exitCode=1", "src"]
|
|
80
|
+
types: [text]
|
|
81
|
+
pass_filenames: false
|
|
82
|
+
|
|
83
|
+
- repo: https://github.com/DavidAnson/markdownlint-cli2
|
|
84
|
+
rev: v0.20.0
|
|
85
|
+
hooks:
|
|
86
|
+
- id: markdownlint-cli2
|
|
87
|
+
args: ["--fix"]
|
|
@@ -17,7 +17,7 @@ authors:
|
|
|
17
17
|
orcid: "https://orcid.org/0009-0002-1806-7951"
|
|
18
18
|
- given-names: Alexandre
|
|
19
19
|
family-names: Bonvin
|
|
20
|
-
affiliation: '@UtrechtUniversity'
|
|
20
|
+
affiliation: '@UtrechtUniversity'
|
|
21
21
|
orcid: "https://orcid.org/0000-0001-7369-1322"
|
|
22
22
|
repository-code: https://github.com/haddocking/protein-quest
|
|
23
23
|
identifiers:
|
|
@@ -6,8 +6,8 @@ We as members, contributors, and leaders pledge to make participation in our
|
|
|
6
6
|
community a harassment-free experience for everyone, regardless of age, body
|
|
7
7
|
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
8
|
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
-
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
|
10
|
+
orientation.
|
|
11
11
|
|
|
12
12
|
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
13
|
diverse, inclusive, and healthy community.
|
|
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
|
|
|
17
17
|
Examples of behavior that contributes to a positive environment for our
|
|
18
18
|
community include:
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
- Demonstrating empathy and kindness toward other people
|
|
21
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
- Giving and gracefully accepting constructive feedback
|
|
23
|
+
- Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
24
|
and learning from the experience
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
- Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
27
|
|
|
28
28
|
Examples of unacceptable behavior include:
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
- The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
- Public or private harassment
|
|
34
|
+
- Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
37
37
|
professional setting
|
|
38
38
|
|
|
39
39
|
## Enforcement Responsibilities
|
|
@@ -60,8 +60,8 @@ representative at an online or offline event.
|
|
|
60
60
|
|
|
61
61
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
62
|
reported to the community leaders responsible for enforcement at
|
|
63
|
-
s.verhoeven@esciencecenter.nl
|
|
64
|
-
|
|
63
|
+
<s.verhoeven@esciencecenter.nl>. All complaints will be reviewed and
|
|
64
|
+
investigated promptly and fairly.
|
|
65
65
|
|
|
66
66
|
All community leaders are obligated to respect the privacy and security of the
|
|
67
67
|
reporter of any incident.
|
|
@@ -82,15 +82,15 @@ behavior was inappropriate. A public apology may be requested.
|
|
|
82
82
|
|
|
83
83
|
### 2. Warning
|
|
84
84
|
|
|
85
|
-
**Community Impact**: A violation through a single incident or series
|
|
86
|
-
|
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
|
86
|
+
actions.
|
|
87
87
|
|
|
88
88
|
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
89
|
interaction with the people involved, including unsolicited interaction with
|
|
90
90
|
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
91
|
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
-
like social media. Violating these terms may lead to a temporary or
|
|
93
|
-
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
+
ban.
|
|
94
94
|
|
|
95
95
|
### 3. Temporary Ban
|
|
96
96
|
|
|
@@ -106,23 +106,23 @@ Violating these terms may lead to a permanent ban.
|
|
|
106
106
|
### 4. Permanent Ban
|
|
107
107
|
|
|
108
108
|
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
-
standards, including sustained inappropriate behavior,
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
110
|
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
111
|
|
|
112
|
-
**Consequence**: A permanent ban from any sort of public interaction within
|
|
113
|
-
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
+
community.
|
|
114
114
|
|
|
115
115
|
## Attribution
|
|
116
116
|
|
|
117
117
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
118
|
version 2.0, available at
|
|
119
|
-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
|
|
119
|
+
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
|
|
120
120
|
|
|
121
|
-
Community Impact Guidelines were inspired by
|
|
122
|
-
enforcement ladder](https://github.com/mozilla/diversity).
|
|
121
|
+
Community Impact Guidelines were inspired by
|
|
122
|
+
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
|
123
123
|
|
|
124
124
|
[homepage]: https://www.contributor-covenant.org
|
|
125
125
|
|
|
126
126
|
For answers to common questions about this code of conduct, see the FAQ at
|
|
127
|
-
https://www.contributor-covenant.org/faq
|
|
128
|
-
https://www.contributor-covenant.org/translations
|
|
127
|
+
<https://www.contributor-covenant.org/faq>. Translations are available at
|
|
128
|
+
<https://www.contributor-covenant.org/translations>.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Contributing guidelines
|
|
2
|
+
|
|
3
|
+
We welcome any kind of contribution to our software, from simple comment or
|
|
4
|
+
question to a full fledged
|
|
5
|
+
[pull request](https://help.github.com/articles/about-pull-requests/). Please
|
|
6
|
+
read and follow our [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
7
|
+
|
|
8
|
+
A contribution can be one of the following cases:
|
|
9
|
+
|
|
10
|
+
1. you have a question;
|
|
11
|
+
1. you think you may have found a bug (including unexpected behavior);
|
|
12
|
+
1. you want to make some kind of change to the code base (e.g. to fix a bug, to
|
|
13
|
+
add a new feature, to update documentation);
|
|
14
|
+
1. you want to make a new release of the code base.
|
|
15
|
+
|
|
16
|
+
The sections below outline the steps in each case.
|
|
17
|
+
|
|
18
|
+
## You have a question
|
|
19
|
+
|
|
20
|
+
1. use the search functionality
|
|
21
|
+
[here](https://github.com/haddocking/protein-quest/issues) to see if someone
|
|
22
|
+
already filed the same issue;
|
|
23
|
+
2. if your issue search did not yield any relevant results, make a new issue;
|
|
24
|
+
3. apply the "Question" label; apply other labels when relevant.
|
|
25
|
+
|
|
26
|
+
## You think you may have found a bug
|
|
27
|
+
|
|
28
|
+
1. use the search functionality
|
|
29
|
+
[here](https://github.com/haddocking/protein-quest/issues) to see if someone
|
|
30
|
+
already filed the same issue;
|
|
31
|
+
1. if your issue search did not yield any relevant results, make a new issue,
|
|
32
|
+
making sure to provide enough information to the rest of the community to
|
|
33
|
+
understand the cause and context of the problem. Depending on the issue, you
|
|
34
|
+
may want to include:
|
|
35
|
+
- the
|
|
36
|
+
[SHA hashcode](https://help.github.com/articles/autolinked-references-and-urls/#commit-shas)
|
|
37
|
+
of the commit that is causing your problem;
|
|
38
|
+
- some identifying information (name and version number) for dependencies
|
|
39
|
+
you're using;
|
|
40
|
+
- information about the operating system;
|
|
41
|
+
1. apply relevant labels to the newly created issue.
|
|
42
|
+
|
|
43
|
+
## You want to make some kind of change to the code base
|
|
44
|
+
|
|
45
|
+
1. (**important**) announce your plan to the rest of the community _before you
|
|
46
|
+
start working_. This announcement should be in the form of a (new) issue;
|
|
47
|
+
1. (**important**) wait until some kind of consensus is reached about your idea
|
|
48
|
+
being a good idea;
|
|
49
|
+
1. if needed, fork the repository to your own Github profile and create your own
|
|
50
|
+
feature branch off of the latest main commit. While working on your feature
|
|
51
|
+
branch, make sure to stay up to date with the main branch by pulling in
|
|
52
|
+
changes, possibly from the 'upstream' repository (follow the instructions
|
|
53
|
+
[here](https://help.github.com/articles/configuring-a-remote-for-a-fork/) and
|
|
54
|
+
[here](https://help.github.com/articles/syncing-a-fork/));
|
|
55
|
+
1. install [uv](https://docs.astral.sh/uv) to manage this packages development
|
|
56
|
+
environment);
|
|
57
|
+
1. Make sure
|
|
58
|
+
`uv sync --all-extras --all-groups && . .venv/bin/activate && protein-quest --help`
|
|
59
|
+
works;
|
|
60
|
+
1. make sure the existing tests still work by running `uv run pytest`;
|
|
61
|
+
1. add your own tests (if necessary);
|
|
62
|
+
1. format your code with `uvx ruff format` and sort imports with
|
|
63
|
+
`uvx ruff check --select I --fix`;
|
|
64
|
+
1. lint your code with `uvx ruff check` (use `uvx ruff check --fix` to fix
|
|
65
|
+
issues automatically);
|
|
66
|
+
1. type check your code with `uv run pyrefly check src tests`;
|
|
67
|
+
1. apply more formatting and linting with `uvx prek run --all-files`;
|
|
68
|
+
1. update or expand the documentation (see
|
|
69
|
+
[Contributing to documentation](#contributing-to-documentation) section
|
|
70
|
+
below);
|
|
71
|
+
1. [push](http://rogerdudler.github.io/git-guide/) your feature branch to (your
|
|
72
|
+
fork of) the protein-quest repository on GitHub;
|
|
73
|
+
1. create the pull request, e.g. following the instructions
|
|
74
|
+
[here](https://help.github.com/articles/creating-a-pull-request/).
|
|
75
|
+
|
|
76
|
+
In case you feel like you've made a valuable contribution, but you don't know
|
|
77
|
+
how to write or run tests for it, or how to generate the documentation: don't
|
|
78
|
+
let this discourage you from making the pull request; we can help you! Just go
|
|
79
|
+
ahead and submit the pull request, but keep in mind that you might be asked to
|
|
80
|
+
append additional commits to your pull request.
|
|
81
|
+
|
|
82
|
+
## You want to make a new release of the code base
|
|
83
|
+
|
|
84
|
+
To create a release you need write permission on the repository.
|
|
85
|
+
|
|
86
|
+
1. Bump the version in
|
|
87
|
+
[src/protein_quest/**version**.py](src/protein_quest/__version__.py).
|
|
88
|
+
2. Check the author list in [`CITATION.cff`](CITATION.cff)
|
|
89
|
+
3. Go to the
|
|
90
|
+
[GitHub release page](https://github.com/haddocking/protein-quest/releases)
|
|
91
|
+
4. Press draft a new release button
|
|
92
|
+
5. Fill tag, title and description field. For tag use version from
|
|
93
|
+
`src/protein_quest/__version__.py` and prepend with "v" character. For
|
|
94
|
+
description use "Python package to search/retrieve/filter proteins and
|
|
95
|
+
protein structures." line plus press "Generate release notes" button.
|
|
96
|
+
6. Press the Publish Release button
|
|
97
|
+
7. Wait until
|
|
98
|
+
[Build and upload to PyPI](https://github.com/haddocking/protein-quest/actions/workflows/pypi-publish.yml)
|
|
99
|
+
has completed
|
|
100
|
+
8. Verify new release is on
|
|
101
|
+
[PyPi](https://pypi.org/project/protein-quest/#history)
|
|
102
|
+
9. Verify new Zenodo record has been created.
|
|
103
|
+
|
|
104
|
+
## Contributing to documentation
|
|
105
|
+
|
|
106
|
+
To work on notebooks in the docs/ directory:
|
|
107
|
+
|
|
108
|
+
```shell
|
|
109
|
+
uv sync --group docs
|
|
110
|
+
# Open a notebook with VS code and select .venv/bin/python as kernel
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Start the live-reloading docs server with:
|
|
114
|
+
|
|
115
|
+
```shell
|
|
116
|
+
uv run mkdocs serve
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Build the documentation site with:
|
|
120
|
+
|
|
121
|
+
```shell
|
|
122
|
+
uv run mkdocs build
|
|
123
|
+
# The site will be built in the `site/` directory.
|
|
124
|
+
# You can preview it with
|
|
125
|
+
python3 -m http.server -d site
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
<details>
|
|
129
|
+
<summary>Type checking notebooks</summary>
|
|
130
|
+
|
|
131
|
+
[Pyrefly](https://pyrefly.org/) does not support notebooks yet, so we need to
|
|
132
|
+
convert them to python scripts and then run pyrefly on them.
|
|
133
|
+
|
|
134
|
+
```shell
|
|
135
|
+
find docs/ -name "*.ipynb" -exec uv run --group docs-type marimo convert {} -o {}.py \;
|
|
136
|
+
uv run --group docs-type pyrefly check docs/notebooks/*.ipynb.py
|
|
137
|
+
rm docs/notebooks/*.ipynb.py
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
</details>
|
|
141
|
+
|
|
142
|
+
## Contributing to tests
|
|
143
|
+
|
|
144
|
+
The code coverage is stored at
|
|
145
|
+
[https://app.codacy.com/gh/haddocking/protein-quest/coverage](https://app.codacy.com/gh/haddocking/protein-quest/coverage)
|
|
146
|
+
.
|
|
147
|
+
|
|
148
|
+
The search functions of the protein-quest package talk to web services on the
|
|
149
|
+
Internet. To have fast tests we use
|
|
150
|
+
[pytest-recording](https://github.com/kiwicom/pytest-recording) to record and
|
|
151
|
+
replay HTTP interactions. See
|
|
152
|
+
[pytest-recording documentation](https://github.com/kiwicom/pytest-recording)
|
|
153
|
+
for more details on how to use it. Like overwrite previous recordings in
|
|
154
|
+
test/cassettes/\*\*.yaml files with `--record-mode=rewrite`.
|
|
155
|
+
|
|
156
|
+
The files downloaded for tests are cached in `~/.cache/protein-quest-tests`.
|
|
157
|
+
|
|
158
|
+
## Automated code quality checks on git commit
|
|
159
|
+
|
|
160
|
+
This step is **optional** but recommended for developers who want to
|
|
161
|
+
automatically check code quality before committing.
|
|
162
|
+
|
|
163
|
+
We use [prek](https://github.com/j178/prek) to run pre-commit hooks. If you want
|
|
164
|
+
to set up automated checks:
|
|
165
|
+
|
|
166
|
+
1. Install prek if you haven't already:
|
|
167
|
+
|
|
168
|
+
```shell
|
|
169
|
+
uv tool install prek
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
1. Install git hooks:
|
|
173
|
+
|
|
174
|
+
```shell
|
|
175
|
+
prek install
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
1. Now every `git commit` will automatically run `prek run` on the files you're
|
|
179
|
+
committing. The hooks will check for common issues like trailing whitespace,
|
|
180
|
+
file endings, and run all configured linters.
|
|
181
|
+
|
|
182
|
+
1. If you ever want to disable the hooks, run:
|
|
183
|
+
```shell
|
|
184
|
+
prek uninstall
|
|
185
|
+
```
|