kbank 0.0.1__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.
- kbank-0.0.1/.github/workflows/ci.yml +120 -0
- kbank-0.0.1/.github/workflows/docs.yml +172 -0
- kbank-0.0.1/.github/workflows/release.yml +88 -0
- kbank-0.0.1/.gitignore +230 -0
- kbank-0.0.1/.pre-commit-config.yaml +23 -0
- kbank-0.0.1/.python-version +1 -0
- kbank-0.0.1/CHANGELOG.md +22 -0
- kbank-0.0.1/CITATION.cff +18 -0
- kbank-0.0.1/CODE_OF_CONDUCT.md +128 -0
- kbank-0.0.1/CONTRIBUTING.md +71 -0
- kbank-0.0.1/LICENSE +674 -0
- kbank-0.0.1/PKG-INFO +708 -0
- kbank-0.0.1/README.md +2 -0
- kbank-0.0.1/docs/architecture.md +39 -0
- kbank-0.0.1/docs/assets/favicon.svg +8 -0
- kbank-0.0.1/docs/citation.md +39 -0
- kbank-0.0.1/docs/conduct.md +13 -0
- kbank-0.0.1/docs/contributing.md +13 -0
- kbank-0.0.1/docs/explore.md +50 -0
- kbank-0.0.1/docs/index.md +131 -0
- kbank-0.0.1/docs/notebooks/cluster-classifier.md +40 -0
- kbank-0.0.1/docs/notebooks/curate-glycans.md +39 -0
- kbank-0.0.1/docs/notebooks/glycan-predictor.md +42 -0
- kbank-0.0.1/docs/notebooks/index.md +75 -0
- kbank-0.0.1/docs/overrides/main.html +210 -0
- kbank-0.0.1/docs/overrides/partials/comments.html +59 -0
- kbank-0.0.1/docs/reference/biosynthesis.md +35 -0
- kbank-0.0.1/docs/reference/db.md +77 -0
- kbank-0.0.1/docs/reference/glycan.md +24 -0
- kbank-0.0.1/docs/reference/index.md +19 -0
- kbank-0.0.1/docs/releases.md +14 -0
- kbank-0.0.1/docs/stylesheets/extra.css +734 -0
- kbank-0.0.1/pyproject.toml +179 -0
- kbank-0.0.1/scripts/__marimo__/session/bgc.py.json +49 -0
- kbank-0.0.1/scripts/__marimo__/session/csdb.py.json +247 -0
- kbank-0.0.1/scripts/__marimo__/session/curate_glycans.py.json +113 -0
- kbank-0.0.1/scripts/__marimo__/session/explore_kbank.py.json +139 -0
- kbank-0.0.1/scripts/__marimo__/session/train_cluster_classifier.py.json +113 -0
- kbank-0.0.1/scripts/__marimo__/session/train_glycan_predictor.py.json +126 -0
- kbank-0.0.1/scripts/curate_glycans.py +810 -0
- kbank-0.0.1/scripts/explore_kbank.py +1744 -0
- kbank-0.0.1/scripts/fetch_announcement.py +98 -0
- kbank-0.0.1/scripts/layouts/curate_glycans.slides.json +40 -0
- kbank-0.0.1/scripts/layouts/train_cluster_classifier.slides.json +40 -0
- kbank-0.0.1/scripts/layouts/train_glycan_predictor.slides.json +44 -0
- kbank-0.0.1/scripts/train_cluster_classifier.py +704 -0
- kbank-0.0.1/scripts/train_glycan_predictor.py +1591 -0
- kbank-0.0.1/src/kbank/__init__.py +0 -0
- kbank-0.0.1/src/kbank/_version.py +24 -0
- kbank-0.0.1/src/kbank/biosynthesis/__init__.py +0 -0
- kbank-0.0.1/src/kbank/biosynthesis/align.py +3312 -0
- kbank-0.0.1/src/kbank/biosynthesis/classifier.py +964 -0
- kbank-0.0.1/src/kbank/biosynthesis/predictor.py +2679 -0
- kbank-0.0.1/src/kbank/data/cluster_classifiers.npz +0 -0
- kbank-0.0.1/src/kbank/data/glycan_predictor_mpnn.npz +0 -0
- kbank-0.0.1/src/kbank/data/glycans.npz +0 -0
- kbank-0.0.1/src/kbank/db/__init__.py +0 -0
- kbank-0.0.1/src/kbank/db/curation.py +2560 -0
- kbank-0.0.1/src/kbank/db/models.py +214 -0
- kbank-0.0.1/src/kbank/db/records.py +1212 -0
- kbank-0.0.1/src/kbank/glycan.py +1683 -0
- kbank-0.0.1/src/kbank/io/__init__.py +0 -0
- kbank-0.0.1/src/kbank/io/base.py +101 -0
- kbank-0.0.1/src/kbank/io/csdb.py +354 -0
- kbank-0.0.1/src/kbank/io/iupac.py +172 -0
- kbank-0.0.1/src/kbank/io/kegg.py +221 -0
- kbank-0.0.1/src/kbank/io/sources.py +1383 -0
- kbank-0.0.1/src/kbank/py.typed +0 -0
- kbank-0.0.1/src/kbank/sugars.py +551 -0
- kbank-0.0.1/tests/test_glycan_deduplication.py +197 -0
- kbank-0.0.1/tests/test_io_and_curation.py +1308 -0
- kbank-0.0.1/uv.lock +1674 -0
- kbank-0.0.1/zensical.toml +203 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, master]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
16
|
+
|
|
17
|
+
env:
|
|
18
|
+
FORCE_COLOR: "1"
|
|
19
|
+
UV_CACHE_DIR: /tmp/.uv-cache
|
|
20
|
+
NUMBA_CACHE_DIR: ${{ github.workspace }}/.numba_cache
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
quality:
|
|
24
|
+
name: Lint & Typecheck
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
timeout-minutes: 10
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout repository
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- name: Set up uv
|
|
32
|
+
uses: astral-sh/setup-uv@v5
|
|
33
|
+
with:
|
|
34
|
+
version: "latest"
|
|
35
|
+
python-version: "3.14"
|
|
36
|
+
enable-cache: true
|
|
37
|
+
cache-dependency-glob: "uv.lock"
|
|
38
|
+
|
|
39
|
+
- name: Configure uv to install serogen from GitHub
|
|
40
|
+
run: |
|
|
41
|
+
python3 -c '
|
|
42
|
+
from pathlib import Path
|
|
43
|
+
p = Path("pyproject.toml")
|
|
44
|
+
p.write_text(
|
|
45
|
+
p.read_text().replace(
|
|
46
|
+
"serogen = { path = \"../SeroGen\", editable = true }",
|
|
47
|
+
"serogen = { git = \"https://github.com/seroverse/serogen.git\" }",
|
|
48
|
+
)
|
|
49
|
+
)
|
|
50
|
+
'
|
|
51
|
+
|
|
52
|
+
- name: Install Python 3.14 & dependencies
|
|
53
|
+
run: uv sync --python 3.14 --group lint --group typing
|
|
54
|
+
|
|
55
|
+
- name: Run Ruff linter
|
|
56
|
+
run: uv run --no-sync ruff check --output-format=github .
|
|
57
|
+
|
|
58
|
+
- name: Check Ruff formatting
|
|
59
|
+
run: uv run --no-sync ruff format --check .
|
|
60
|
+
|
|
61
|
+
- name: Run ty static type checker
|
|
62
|
+
run: uv run --no-sync ty check src/
|
|
63
|
+
|
|
64
|
+
test:
|
|
65
|
+
name: Test (${{ matrix.os }}, py${{ matrix.python-version }})
|
|
66
|
+
runs-on: ${{ matrix.os }}
|
|
67
|
+
timeout-minutes: 20
|
|
68
|
+
strategy:
|
|
69
|
+
fail-fast: false
|
|
70
|
+
matrix:
|
|
71
|
+
os: [ubuntu-latest, macos-latest]
|
|
72
|
+
python-version: ["3.14"]
|
|
73
|
+
steps:
|
|
74
|
+
- name: Checkout repository
|
|
75
|
+
uses: actions/checkout@v4
|
|
76
|
+
|
|
77
|
+
- name: Set up uv
|
|
78
|
+
uses: astral-sh/setup-uv@v5
|
|
79
|
+
with:
|
|
80
|
+
version: "latest"
|
|
81
|
+
python-version: ${{ matrix.python-version }}
|
|
82
|
+
enable-cache: true
|
|
83
|
+
cache-dependency-glob: "uv.lock"
|
|
84
|
+
|
|
85
|
+
- name: Restore Numba JIT cache
|
|
86
|
+
uses: actions/cache@v4
|
|
87
|
+
with:
|
|
88
|
+
path: ${{ env.NUMBA_CACHE_DIR }}
|
|
89
|
+
key: numba-jit-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('src/**/*.py') }}
|
|
90
|
+
restore-keys: |
|
|
91
|
+
numba-jit-${{ runner.os }}-py${{ matrix.python-version }}-
|
|
92
|
+
|
|
93
|
+
- name: Configure uv to install serogen from GitHub
|
|
94
|
+
run: |
|
|
95
|
+
python3 -c '
|
|
96
|
+
from pathlib import Path
|
|
97
|
+
p = Path("pyproject.toml")
|
|
98
|
+
p.write_text(
|
|
99
|
+
p.read_text().replace(
|
|
100
|
+
"serogen = { path = \"../SeroGen\", editable = true }",
|
|
101
|
+
"serogen = { git = \"https://github.com/seroverse/serogen.git\" }",
|
|
102
|
+
)
|
|
103
|
+
)
|
|
104
|
+
'
|
|
105
|
+
|
|
106
|
+
- name: Install Python ${{ matrix.python-version }} & test dependencies
|
|
107
|
+
run: uv sync --python ${{ matrix.python-version }} --group test
|
|
108
|
+
|
|
109
|
+
- name: Run pytest suite with coverage
|
|
110
|
+
run: |
|
|
111
|
+
uv run --no-sync pytest \
|
|
112
|
+
-o addopts="-ra --tb=short --cov=src/kbank --cov-report=term-missing --cov-report=xml --junitxml=pytest-report.xml"
|
|
113
|
+
|
|
114
|
+
- name: Publish test summary
|
|
115
|
+
if: always()
|
|
116
|
+
run: |
|
|
117
|
+
echo "### 🧪 Test Suite Results (${{ matrix.os }} / Python ${{ matrix.python-version }})" >> $GITHUB_STEP_SUMMARY
|
|
118
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
119
|
+
echo "- **Runner**: \`${{ runner.os }} (${{ runner.arch }})\`" >> $GITHUB_STEP_SUMMARY
|
|
120
|
+
echo "- **Numba Cache**: \`${{ env.NUMBA_CACHE_DIR }}\`" >> $GITHUB_STEP_SUMMARY
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, master]
|
|
8
|
+
paths:
|
|
9
|
+
- "docs/**"
|
|
10
|
+
- "scripts/**"
|
|
11
|
+
- "src/**"
|
|
12
|
+
- "zensical.toml"
|
|
13
|
+
- "CODE_OF_CONDUCT.md"
|
|
14
|
+
- "CONTRIBUTING.md"
|
|
15
|
+
- "CHANGELOG.md"
|
|
16
|
+
- "pyproject.toml"
|
|
17
|
+
- "uv.lock"
|
|
18
|
+
- ".python-version"
|
|
19
|
+
- ".github/workflows/docs.yml"
|
|
20
|
+
workflow_dispatch:
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
pages: write
|
|
25
|
+
id-token: write
|
|
26
|
+
|
|
27
|
+
concurrency:
|
|
28
|
+
group: pages-${{ github.ref }}
|
|
29
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
30
|
+
|
|
31
|
+
jobs:
|
|
32
|
+
build:
|
|
33
|
+
name: Build Zensical Site
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
timeout-minutes: 10
|
|
36
|
+
steps:
|
|
37
|
+
- name: Checkout repository
|
|
38
|
+
uses: actions/checkout@v4
|
|
39
|
+
with:
|
|
40
|
+
fetch-depth: 0
|
|
41
|
+
|
|
42
|
+
- name: Set up uv
|
|
43
|
+
uses: astral-sh/setup-uv@v5
|
|
44
|
+
with:
|
|
45
|
+
version: "latest"
|
|
46
|
+
python-version: "3.14"
|
|
47
|
+
enable-cache: true
|
|
48
|
+
cache-dependency-glob: "uv.lock"
|
|
49
|
+
|
|
50
|
+
- name: Configure uv to install serogen from GitHub
|
|
51
|
+
run: |
|
|
52
|
+
python3 -c '
|
|
53
|
+
from pathlib import Path
|
|
54
|
+
p = Path("pyproject.toml")
|
|
55
|
+
p.write_text(
|
|
56
|
+
p.read_text().replace(
|
|
57
|
+
"serogen = { path = \"../SeroGen\", editable = true }",
|
|
58
|
+
"serogen = { git = \"https://github.com/seroverse/serogen.git\" }",
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
'
|
|
62
|
+
|
|
63
|
+
- name: Install documentation dependencies
|
|
64
|
+
run: uv sync --python 3.14 --group docs
|
|
65
|
+
|
|
66
|
+
- name: Export Marimo slide decks and interactive apps
|
|
67
|
+
run: |
|
|
68
|
+
uv run --no-sync python -c '
|
|
69
|
+
import json
|
|
70
|
+
import subprocess
|
|
71
|
+
import sys
|
|
72
|
+
from pathlib import Path
|
|
73
|
+
from marimo._config.manager import get_default_config_manager
|
|
74
|
+
from marimo._export.exporter import Exporter
|
|
75
|
+
from marimo._export.file import _resolve_and_inline_layout
|
|
76
|
+
from marimo._export.requests import HTMLExportRequest
|
|
77
|
+
from marimo._schemas.export_options import HTMLExportOptions, NotebookExportSnapshot
|
|
78
|
+
from marimo._session.notebook import load_notebook
|
|
79
|
+
from marimo._session.state.serialize import serialize_notebook
|
|
80
|
+
from marimo._session.state.session_view import SessionView
|
|
81
|
+
from marimo._utils.code import hash_code
|
|
82
|
+
|
|
83
|
+
out_dir = Path("docs/notebooks/assets")
|
|
84
|
+
out_dir.mkdir(parents=True, exist_ok=True)
|
|
85
|
+
exporter = Exporter()
|
|
86
|
+
for nb_path in sorted(Path("scripts").glob("*.py")):
|
|
87
|
+
session_path = Path("scripts/__marimo__/session") / f"{nb_path.name}.json"
|
|
88
|
+
if not session_path.exists():
|
|
89
|
+
if "marimo.App(" in nb_path.read_text(encoding="utf-8"):
|
|
90
|
+
out_html = out_dir / f"{nb_path.stem}.html"
|
|
91
|
+
subprocess.run(
|
|
92
|
+
[
|
|
93
|
+
sys.executable,
|
|
94
|
+
"-m",
|
|
95
|
+
"marimo",
|
|
96
|
+
"export",
|
|
97
|
+
"html",
|
|
98
|
+
"--no-sandbox",
|
|
99
|
+
"--force",
|
|
100
|
+
str(nb_path),
|
|
101
|
+
"-o",
|
|
102
|
+
str(out_html),
|
|
103
|
+
"--no-include-code",
|
|
104
|
+
],
|
|
105
|
+
check=True,
|
|
106
|
+
)
|
|
107
|
+
print(f"Executed & exported {out_html} ({out_html.stat().st_size:,} bytes)")
|
|
108
|
+
continue
|
|
109
|
+
file_manager = load_notebook(str(nb_path.resolve()))
|
|
110
|
+
session_data = json.loads(session_path.read_text(encoding="utf-8"))
|
|
111
|
+
cell_datas = list(file_manager.app.cell_manager.cell_data())
|
|
112
|
+
session_cells = session_data.get("cells", [])
|
|
113
|
+
for idx, cd in enumerate(cell_datas):
|
|
114
|
+
if idx < len(session_cells):
|
|
115
|
+
session_cells[idx]["id"] = cd.cell_id
|
|
116
|
+
session_cells[idx]["code_hash"] = hash_code(cd.code)
|
|
117
|
+
session_view = SessionView()
|
|
118
|
+
for cd in cell_datas:
|
|
119
|
+
session_view.last_executed_code[cd.cell_id] = cd.code
|
|
120
|
+
layout = _resolve_and_inline_layout(file_manager.app)
|
|
121
|
+
config = get_default_config_manager(current_path=file_manager.path)
|
|
122
|
+
resolved = config.get_config()
|
|
123
|
+
snapshot = NotebookExportSnapshot(
|
|
124
|
+
notebook=serialize_notebook(session_view, file_manager.app.cell_manager),
|
|
125
|
+
session=session_data,
|
|
126
|
+
model_notifications=(),
|
|
127
|
+
)
|
|
128
|
+
html, _ = exporter.export_as_html(
|
|
129
|
+
HTMLExportRequest(
|
|
130
|
+
filename=file_manager.filename,
|
|
131
|
+
app_code=file_manager.app.to_py(),
|
|
132
|
+
app_config=file_manager.app.config,
|
|
133
|
+
snapshot=snapshot,
|
|
134
|
+
display_config=resolved["display"],
|
|
135
|
+
options=HTMLExportOptions(include_code=bool(layout is not None), files=()),
|
|
136
|
+
layout=layout,
|
|
137
|
+
sharing_config=resolved.get("sharing"),
|
|
138
|
+
)
|
|
139
|
+
)
|
|
140
|
+
(out_dir / f"{nb_path.stem}.html").write_text(html, encoding="utf-8")
|
|
141
|
+
print(f"Exported {out_dir / nb_path.stem}.html ({len(html):,} bytes)")
|
|
142
|
+
'
|
|
143
|
+
|
|
144
|
+
- name: Fetch latest announcement from SeroVerse/.github
|
|
145
|
+
env:
|
|
146
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
147
|
+
run: uv run --no-sync python scripts/fetch_announcement.py
|
|
148
|
+
|
|
149
|
+
- name: Build documentation with Zensical
|
|
150
|
+
run: uv run --no-sync zensical build --clean --strict
|
|
151
|
+
|
|
152
|
+
- name: Upload Pages artifact
|
|
153
|
+
if: github.event_name != 'pull_request'
|
|
154
|
+
uses: actions/upload-pages-artifact@v3
|
|
155
|
+
with:
|
|
156
|
+
path: site
|
|
157
|
+
|
|
158
|
+
deploy:
|
|
159
|
+
name: Deploy to GitHub Pages
|
|
160
|
+
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
|
|
161
|
+
needs: build
|
|
162
|
+
runs-on: ubuntu-latest
|
|
163
|
+
environment:
|
|
164
|
+
name: github-pages
|
|
165
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
166
|
+
steps:
|
|
167
|
+
- name: Configure GitHub Pages
|
|
168
|
+
uses: actions/configure-pages@v5
|
|
169
|
+
|
|
170
|
+
- name: Deploy to GitHub Pages
|
|
171
|
+
id: deployment
|
|
172
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
dry_run:
|
|
10
|
+
description: "Build & verify distributions without publishing to PyPI"
|
|
11
|
+
required: false
|
|
12
|
+
default: true
|
|
13
|
+
type: boolean
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build:
|
|
21
|
+
name: Build Distribution Artifacts
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
timeout-minutes: 10
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout repository with full history for hatch-vcs
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0
|
|
29
|
+
|
|
30
|
+
- name: Set up uv
|
|
31
|
+
uses: astral-sh/setup-uv@v5
|
|
32
|
+
with:
|
|
33
|
+
version: "latest"
|
|
34
|
+
python-version: "3.14"
|
|
35
|
+
enable-cache: true
|
|
36
|
+
cache-dependency-glob: "uv.lock"
|
|
37
|
+
|
|
38
|
+
- name: Build wheel and sdist
|
|
39
|
+
run: uv build
|
|
40
|
+
|
|
41
|
+
- name: Smoke-test built wheel in isolated environment
|
|
42
|
+
run: |
|
|
43
|
+
uv run --isolated --no-project --with dist/*.whl python -c "
|
|
44
|
+
import kbank
|
|
45
|
+
"
|
|
46
|
+
|
|
47
|
+
- name: Upload distribution artifacts
|
|
48
|
+
uses: actions/upload-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: dist
|
|
51
|
+
path: dist/
|
|
52
|
+
retention-days: 7
|
|
53
|
+
|
|
54
|
+
publish-pypi:
|
|
55
|
+
name: Publish to PyPI (Trusted Publishing)
|
|
56
|
+
if: startsWith(github.ref, 'refs/tags/v') && github.event.inputs.dry_run != 'true'
|
|
57
|
+
needs: build
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
environment:
|
|
60
|
+
name: pypi
|
|
61
|
+
url: https://pypi.org/p/kbank
|
|
62
|
+
steps:
|
|
63
|
+
- name: Download distribution artifacts
|
|
64
|
+
uses: actions/download-artifact@v4
|
|
65
|
+
with:
|
|
66
|
+
name: dist
|
|
67
|
+
path: dist/
|
|
68
|
+
|
|
69
|
+
- name: Publish package distributions to PyPI
|
|
70
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
71
|
+
|
|
72
|
+
github-release:
|
|
73
|
+
name: Create GitHub Release
|
|
74
|
+
if: startsWith(github.ref, 'refs/tags/v') && github.event.inputs.dry_run != 'true'
|
|
75
|
+
needs: [build, publish-pypi]
|
|
76
|
+
runs-on: ubuntu-latest
|
|
77
|
+
steps:
|
|
78
|
+
- name: Download distribution artifacts
|
|
79
|
+
uses: actions/download-artifact@v4
|
|
80
|
+
with:
|
|
81
|
+
name: dist
|
|
82
|
+
path: dist/
|
|
83
|
+
|
|
84
|
+
- name: Create GitHub Release
|
|
85
|
+
uses: softprops/action-gh-release@v2
|
|
86
|
+
with:
|
|
87
|
+
files: dist/*
|
|
88
|
+
generate_release_notes: true
|
kbank-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
.karva/
|
|
54
|
+
.karva_cache/
|
|
55
|
+
|
|
56
|
+
# Translations
|
|
57
|
+
*.mo
|
|
58
|
+
*.pot
|
|
59
|
+
|
|
60
|
+
# Django stuff:
|
|
61
|
+
*.log
|
|
62
|
+
local_settings.py
|
|
63
|
+
db.sqlite3
|
|
64
|
+
db.sqlite3-journal
|
|
65
|
+
|
|
66
|
+
# Flask stuff:
|
|
67
|
+
instance/
|
|
68
|
+
.webassets-cache
|
|
69
|
+
|
|
70
|
+
# Scrapy stuff:
|
|
71
|
+
.scrapy
|
|
72
|
+
|
|
73
|
+
# Sphinx documentation
|
|
74
|
+
docs/_build/
|
|
75
|
+
|
|
76
|
+
# PyBuilder
|
|
77
|
+
.pybuilder/
|
|
78
|
+
target/
|
|
79
|
+
|
|
80
|
+
# Jupyter Notebook
|
|
81
|
+
.ipynb_checkpoints
|
|
82
|
+
|
|
83
|
+
# IPython
|
|
84
|
+
profile_default/
|
|
85
|
+
ipython_config.py
|
|
86
|
+
|
|
87
|
+
# pyenv
|
|
88
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
89
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
90
|
+
# .python-version
|
|
91
|
+
|
|
92
|
+
# pipenv
|
|
93
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
94
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
95
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
96
|
+
# install all needed dependencies.
|
|
97
|
+
# Pipfile.lock
|
|
98
|
+
|
|
99
|
+
# UV
|
|
100
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
101
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
102
|
+
# commonly ignored for libraries.
|
|
103
|
+
# uv.lock
|
|
104
|
+
|
|
105
|
+
# poetry
|
|
106
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
107
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
108
|
+
# commonly ignored for libraries.
|
|
109
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
110
|
+
# poetry.lock
|
|
111
|
+
# poetry.toml
|
|
112
|
+
|
|
113
|
+
# pdm
|
|
114
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
115
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
116
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
117
|
+
# pdm.lock
|
|
118
|
+
# pdm.toml
|
|
119
|
+
.pdm-python
|
|
120
|
+
.pdm-build/
|
|
121
|
+
|
|
122
|
+
# pixi
|
|
123
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
124
|
+
# pixi.lock
|
|
125
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
126
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
127
|
+
.pixi
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
.idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
201
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
203
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo & IDE files (keep cached notebook session snapshots in scripts/)
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
!scripts/__marimo__/
|
|
219
|
+
scripts/__marimo__/*
|
|
220
|
+
!scripts/__marimo__/session/
|
|
221
|
+
.DS_Store
|
|
222
|
+
|
|
223
|
+
# Documentation build output
|
|
224
|
+
docs/notebooks/assets/
|
|
225
|
+
docs/overrides/announcement.html
|
|
226
|
+
|
|
227
|
+
# Local scratch directories
|
|
228
|
+
/notebooks/
|
|
229
|
+
/data/
|
|
230
|
+
src/kbank/app/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: local
|
|
3
|
+
hooks:
|
|
4
|
+
- id: ruff-check
|
|
5
|
+
name: ruff check
|
|
6
|
+
entry: uv run --no-sync ruff check --fix
|
|
7
|
+
language: system
|
|
8
|
+
types: [python]
|
|
9
|
+
require_serial: true
|
|
10
|
+
|
|
11
|
+
- id: ruff-format
|
|
12
|
+
name: ruff format
|
|
13
|
+
entry: uv run --no-sync ruff format
|
|
14
|
+
language: system
|
|
15
|
+
types: [python]
|
|
16
|
+
require_serial: true
|
|
17
|
+
|
|
18
|
+
- id: ty
|
|
19
|
+
name: ty check
|
|
20
|
+
entry: uv run --no-sync ty check src/
|
|
21
|
+
language: system
|
|
22
|
+
types: [python]
|
|
23
|
+
pass_filenames: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14+gil
|
kbank-0.0.1/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Release Notes
|
|
2
|
+
|
|
3
|
+
All notable changes to **`KBank`** are documented on this page. This project adheres to [Semantic Versioning](https://semver.org/) and the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) specification.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **CSR Chemical Glycan Graphs & Monosaccharide Registry (`kbank.glycan`, `kbank.sugars`)**:
|
|
12
|
+
- Structure-of-Arrays (SoA) `Sugars` chemical registry encoding monosaccharide base rings, stereochemistry (`Anomer`, `Chirality`), ring forms, and non-stoichiometric substituents.
|
|
13
|
+
- Compressed Sparse Row (CSR) directed multigraphs (`Glycan`, `Glycans`) with canonical root-invariant topological hashing and Weisfeiler-Lehman graph kernels.
|
|
14
|
+
- **Structural Parsers & Multi-Database Curation (`kbank.io`, `kbank.db`)**:
|
|
15
|
+
- `CSDBParser`, `IUPACParser`, and `KEGGParser` for bidirectional chemical graph parsing and serialization.
|
|
16
|
+
- Multi-database curation pipeline (`build_curated_glycan_records`) uniting **1,530** bacterial surface polysaccharide structures across CSDB, KEGG, ECODAB, EPS-DB, EK3D, and GlyTouCan paired *de novo* with `SeroGen` biosynthetic gene clusters (`GlycanRecords`).
|
|
17
|
+
- **Biosynthetic Alignment & De Novo Structure Prediction (`kbank.biosynthesis`)**:
|
|
18
|
+
- `BiosyntheticAssigner` and `PanGraphConsensusPrior` Expectation-Maximization homology priors for bipartite enzyme-to-linkage assignment.
|
|
19
|
+
- 10-head factorized 1D-CNN `BiosyntheticClassifierSuite` (`ClusterClassifier`) predicting donor, acceptor, anomer, linkage position, and substituent specificity from protein sequences.
|
|
20
|
+
- `GlycanPredictor` combining `RelationalMPNN` message passing with a branch-and-bound Constrained Spanning Arborescence solver for *de novo* repeating-unit structure reconstruction.
|
|
21
|
+
- **Interactive Benchmarks & Documentation**:
|
|
22
|
+
- Reproducible 16:9 Marimo slide decks (`curate_glycans.py`, `train_cluster_classifier.py`, `train_glycan_predictor.py`) and unified SeroVerse Zensical documentation.
|
kbank-0.0.1/CITATION.cff
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use KBank in your work, please cite it using the following metadata."
|
|
3
|
+
title: "KBank: Geno-glycomic database for bacterial glycans"
|
|
4
|
+
type: software
|
|
5
|
+
authors:
|
|
6
|
+
- family-names: "Stanton"
|
|
7
|
+
given-names: "Thomas David"
|
|
8
|
+
email: "tomdstanton@gmail.com"
|
|
9
|
+
orcid: "https://orcid.org/0000-0002-8898-4432"
|
|
10
|
+
affiliation: "Monash University"
|
|
11
|
+
repository-code: "https://github.com/SeroVerse/KBank"
|
|
12
|
+
url: "https://seroverse.github.io/KBank/"
|
|
13
|
+
license: "GPL-3.0-only"
|
|
14
|
+
keywords:
|
|
15
|
+
- bioinformatics
|
|
16
|
+
- genomics
|
|
17
|
+
- serotyping
|
|
18
|
+
- microbiology
|