cellme 1.0.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.
- cellme-1.0.0/.github/CODEOWNERS +1 -0
- cellme-1.0.0/.github/dependabot.yml +40 -0
- cellme-1.0.0/.github/workflows/publish_cellme.yml +139 -0
- cellme-1.0.0/.github/workflows/python_package.yml +35 -0
- cellme-1.0.0/.gitignore +159 -0
- cellme-1.0.0/CLAUDE.md +114 -0
- cellme-1.0.0/CONTRIBUTING.md +75 -0
- cellme-1.0.0/LICENSE +21 -0
- cellme-1.0.0/PKG-INFO +119 -0
- cellme-1.0.0/README.md +90 -0
- cellme-1.0.0/cellme/__init__.py +3 -0
- cellme-1.0.0/cellme/builds.py +128 -0
- cellme-1.0.0/cellme/cbioportal.py +331 -0
- cellme-1.0.0/cellme/main.py +34 -0
- cellme-1.0.0/cellme/py.typed +0 -0
- cellme-1.0.0/cellme/tools/__init__.py +0 -0
- cellme-1.0.0/cellme/tools/truth_track.py +77 -0
- cellme-1.0.0/cellme/vcf.py +472 -0
- cellme-1.0.0/pyproject.toml +228 -0
- cellme-1.0.0/tests/__init__.py +0 -0
- cellme-1.0.0/tests/test_builds.py +55 -0
- cellme-1.0.0/tests/test_cbioportal.py +152 -0
- cellme-1.0.0/tests/test_main.py +36 -0
- cellme-1.0.0/tests/test_vcf.py +210 -0
- cellme-1.0.0/uv.lock +1158 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @clintval
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# GitHub Actions — every workflow action is pinned to a commit SHA.
|
|
4
|
+
- package-ecosystem: "github-actions"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
# Quarantine fresh releases so a compromised publish has time to be caught.
|
|
9
|
+
cooldown:
|
|
10
|
+
default-days: 7
|
|
11
|
+
# Batch all action bumps into a single PR to reduce noise.
|
|
12
|
+
groups:
|
|
13
|
+
github-actions:
|
|
14
|
+
patterns:
|
|
15
|
+
- "*"
|
|
16
|
+
commit-message:
|
|
17
|
+
prefix: "chore"
|
|
18
|
+
include: "scope"
|
|
19
|
+
|
|
20
|
+
# Python dependencies (uv) — reads pyproject.toml + uv.lock.
|
|
21
|
+
- package-ecosystem: "uv"
|
|
22
|
+
directory: "/"
|
|
23
|
+
schedule:
|
|
24
|
+
interval: "weekly"
|
|
25
|
+
# Same one-week quarantine as the actions ecosystem above.
|
|
26
|
+
cooldown:
|
|
27
|
+
default-days: 7
|
|
28
|
+
versioning-strategy: "increase-if-necessary"
|
|
29
|
+
groups:
|
|
30
|
+
python-runtime:
|
|
31
|
+
dependency-type: "production"
|
|
32
|
+
patterns:
|
|
33
|
+
- "*"
|
|
34
|
+
python-dev:
|
|
35
|
+
dependency-type: "development"
|
|
36
|
+
patterns:
|
|
37
|
+
- "*"
|
|
38
|
+
commit-message:
|
|
39
|
+
prefix: "chore"
|
|
40
|
+
include: "scope"
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '[0-9]+.[0-9]+.[0-9]+'
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: publish-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: false
|
|
11
|
+
|
|
12
|
+
env:
|
|
13
|
+
UV_VERSION: 0.12.0
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
on-main-branch-check:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
outputs:
|
|
22
|
+
on_main: ${{ steps.contains_tag.outputs.retval }}
|
|
23
|
+
steps:
|
|
24
|
+
# TODO: remove this when the following PR is merged and released:
|
|
25
|
+
# https://github.com/rickstaa/action-contains-tag/pull/18
|
|
26
|
+
- name: git config --global remote.origin.followRemoteHEAD never
|
|
27
|
+
run: git config --global remote.origin.followRemoteHEAD never
|
|
28
|
+
|
|
29
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 0
|
|
32
|
+
persist-credentials: false
|
|
33
|
+
|
|
34
|
+
- uses: rickstaa/action-contains-tag@a9ff27d505ba2bf074a2ebb48b208e76d35ff308 # v1.2.10
|
|
35
|
+
id: contains_tag
|
|
36
|
+
with:
|
|
37
|
+
reference: "main"
|
|
38
|
+
tag: "${{ github.ref_name }}"
|
|
39
|
+
|
|
40
|
+
tests:
|
|
41
|
+
name: tests
|
|
42
|
+
needs: on-main-branch-check
|
|
43
|
+
if: ${{ needs.on-main-branch-check.outputs.on_main == 'true' }}
|
|
44
|
+
uses: "./.github/workflows/python_package.yml"
|
|
45
|
+
|
|
46
|
+
build:
|
|
47
|
+
name: build package
|
|
48
|
+
needs: tests
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
52
|
+
with:
|
|
53
|
+
fetch-depth: 0
|
|
54
|
+
persist-credentials: false
|
|
55
|
+
|
|
56
|
+
- name: Install uv
|
|
57
|
+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
58
|
+
with:
|
|
59
|
+
version: ${{ env.UV_VERSION }}
|
|
60
|
+
python-version: 3.12
|
|
61
|
+
# This is a release build, so resolve against upstream rather than a
|
|
62
|
+
# warm cache that a less-trusted ref could have poisoned.
|
|
63
|
+
enable-cache: 'false'
|
|
64
|
+
|
|
65
|
+
# cellme is pure Python, so a single build produces the sdist and one
|
|
66
|
+
# universal py3-none-any wheel. No per-Python or per-platform matrix.
|
|
67
|
+
- name: Build sdist and wheel
|
|
68
|
+
run: uv build --sdist --wheel
|
|
69
|
+
|
|
70
|
+
- name: Verify package metadata
|
|
71
|
+
run: uv run --with twine twine check --strict dist/*
|
|
72
|
+
|
|
73
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
74
|
+
with:
|
|
75
|
+
name: dist
|
|
76
|
+
path: dist/
|
|
77
|
+
if-no-files-found: error
|
|
78
|
+
|
|
79
|
+
publish-to-pypi:
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
needs: build
|
|
82
|
+
environment: pypi
|
|
83
|
+
permissions:
|
|
84
|
+
id-token: write
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
87
|
+
with:
|
|
88
|
+
name: dist
|
|
89
|
+
path: dist/
|
|
90
|
+
|
|
91
|
+
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
92
|
+
with:
|
|
93
|
+
skip-existing: true
|
|
94
|
+
print-hash: true
|
|
95
|
+
verbose: true
|
|
96
|
+
|
|
97
|
+
make-changelog:
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
needs: publish-to-pypi
|
|
100
|
+
outputs:
|
|
101
|
+
release_body: ${{ steps.git-cliff.outputs.content }}
|
|
102
|
+
steps:
|
|
103
|
+
- name: Checkout the Repository at the Tagged Commit
|
|
104
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
105
|
+
with:
|
|
106
|
+
fetch-depth: 0
|
|
107
|
+
ref: ${{ github.ref_name }}
|
|
108
|
+
persist-credentials: false
|
|
109
|
+
|
|
110
|
+
- name: Generate a Changelog
|
|
111
|
+
uses: orhun/git-cliff-action@f50e11560dce63f7c33227798f90b924471a88b5 # v4.8.0
|
|
112
|
+
id: git-cliff
|
|
113
|
+
with:
|
|
114
|
+
config: pyproject.toml
|
|
115
|
+
args: --latest --verbose
|
|
116
|
+
env:
|
|
117
|
+
GITHUB_REPO: ${{ github.repository }}
|
|
118
|
+
|
|
119
|
+
make-github-release:
|
|
120
|
+
runs-on: ubuntu-latest
|
|
121
|
+
needs: make-changelog
|
|
122
|
+
permissions:
|
|
123
|
+
contents: write
|
|
124
|
+
steps:
|
|
125
|
+
- name: Download the built distributions
|
|
126
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
127
|
+
with:
|
|
128
|
+
name: dist
|
|
129
|
+
path: dist/
|
|
130
|
+
|
|
131
|
+
- name: Create GitHub Release
|
|
132
|
+
id: create_release
|
|
133
|
+
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
|
|
134
|
+
with:
|
|
135
|
+
name: ${{ github.ref_name }}
|
|
136
|
+
body: ${{ needs.make-changelog.outputs.release_body }}
|
|
137
|
+
draft: false
|
|
138
|
+
prerelease: false
|
|
139
|
+
files: "dist/*"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Code checks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
workflow_call:
|
|
6
|
+
|
|
7
|
+
env:
|
|
8
|
+
UV_VERSION: 0.12.0
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
Tests:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
PYTHON_VERSION: ["3.12", "3.13", "3.14"]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
21
|
+
with:
|
|
22
|
+
persist-credentials: false
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
26
|
+
with:
|
|
27
|
+
version: ${{ env.UV_VERSION }}
|
|
28
|
+
python-version: ${{ matrix.PYTHON_VERSION }}
|
|
29
|
+
enable-cache: 'true'
|
|
30
|
+
cache-suffix: ${{ matrix.PYTHON_VERSION }}
|
|
31
|
+
|
|
32
|
+
- name: Test the library
|
|
33
|
+
run: |
|
|
34
|
+
uv run --locked poe check-all
|
|
35
|
+
|
cellme-1.0.0/.gitignore
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
.vscode/
|
|
2
|
+
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*$py.class
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
build/
|
|
14
|
+
develop-eggs/
|
|
15
|
+
dist/
|
|
16
|
+
downloads/
|
|
17
|
+
eggs/
|
|
18
|
+
.eggs/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
#Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# poetry
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
103
|
+
#poetry.lock
|
|
104
|
+
|
|
105
|
+
# pdm
|
|
106
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
107
|
+
#pdm.lock
|
|
108
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
109
|
+
# in version control.
|
|
110
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
111
|
+
.pdm.toml
|
|
112
|
+
|
|
113
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
114
|
+
__pypackages__/
|
|
115
|
+
|
|
116
|
+
# Celery stuff
|
|
117
|
+
celerybeat-schedule
|
|
118
|
+
celerybeat.pid
|
|
119
|
+
|
|
120
|
+
# SageMath parsed files
|
|
121
|
+
*.sage.py
|
|
122
|
+
|
|
123
|
+
# Environments
|
|
124
|
+
.env
|
|
125
|
+
.venv
|
|
126
|
+
venv/
|
|
127
|
+
env.bak/
|
|
128
|
+
venv.bak/
|
|
129
|
+
|
|
130
|
+
# Spyder project settings
|
|
131
|
+
.spyderproject
|
|
132
|
+
.spyproject
|
|
133
|
+
|
|
134
|
+
# Rope project settings
|
|
135
|
+
.ropeproject
|
|
136
|
+
|
|
137
|
+
# mkdocs documentation
|
|
138
|
+
/site
|
|
139
|
+
|
|
140
|
+
# mypy
|
|
141
|
+
.mypy_cache/
|
|
142
|
+
.dmypy.json
|
|
143
|
+
dmypy.json
|
|
144
|
+
|
|
145
|
+
# Pyre type checker
|
|
146
|
+
.pyre/
|
|
147
|
+
|
|
148
|
+
# pytype static type analyzer
|
|
149
|
+
.pytype/
|
|
150
|
+
|
|
151
|
+
# Cython debug symbols
|
|
152
|
+
cython_debug/
|
|
153
|
+
|
|
154
|
+
# PyCharm
|
|
155
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
156
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
157
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
158
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
159
|
+
.idea/
|
cellme-1.0.0/CLAUDE.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
## Template Setup
|
|
4
|
+
|
|
5
|
+
**On first interaction in a new project:** If this section is present, the project
|
|
6
|
+
has not yet been initialized.
|
|
7
|
+
|
|
8
|
+
Run `/init`, then replace this entire section with its output. Keep the rest of
|
|
9
|
+
this CLAUDE.md intact below it.
|
|
10
|
+
|
|
11
|
+
## Git Workflow
|
|
12
|
+
|
|
13
|
+
### Commit Granularity
|
|
14
|
+
|
|
15
|
+
Commit after completing one of:
|
|
16
|
+
- A single function/method implementation
|
|
17
|
+
- One refactoring step (rename, extract, move)
|
|
18
|
+
- A bug fix with its regression test
|
|
19
|
+
- A documentation update
|
|
20
|
+
|
|
21
|
+
**Size guidelines:**
|
|
22
|
+
- Per commit: 100–300 lines preferred, 400 max
|
|
23
|
+
- Per PR: No hard limit, but consider splitting if >800 lines or >5 unrelated files
|
|
24
|
+
|
|
25
|
+
**Good commit scope examples:**
|
|
26
|
+
- `Add FastaIndex.validate() method`
|
|
27
|
+
- `Rename species_map → species_to_ref_fasta_map`
|
|
28
|
+
- `Fix off-by-one in BED coordinate parsing`
|
|
29
|
+
|
|
30
|
+
### Commit Messages
|
|
31
|
+
|
|
32
|
+
Use [Conventional Commits](https://www.conventionalcommits.org/) for commit messages and PR
|
|
33
|
+
titles+bodies. Common types: `feat`, `fix`, `chore`, `docs`, `refactor`, `test`.
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
<type>: <imperative description> (<72 chars total)
|
|
37
|
+
|
|
38
|
+
Detailed body explaining:
|
|
39
|
+
- What changed
|
|
40
|
+
- Why (link issues with "Closes #123" or "Related to #456")
|
|
41
|
+
- Any non-obvious implementation choices
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Commit Rules
|
|
45
|
+
- Run `uv run poe fix-and-check-all` before each commit; all checks must pass
|
|
46
|
+
- No merge commits
|
|
47
|
+
- Do not rebase without explicit user approval
|
|
48
|
+
- **Never mix formatting and functional changes.** If unavoidable, isolate formatting into separate commits at start or end of branch.
|
|
49
|
+
|
|
50
|
+
### Branch Hygiene
|
|
51
|
+
- Use `.gitignore` liberally
|
|
52
|
+
- Never commit: IDE files, personal test files, local debug data, commented-out code
|
|
53
|
+
|
|
54
|
+
## Coding Conventions
|
|
55
|
+
|
|
56
|
+
### Organization
|
|
57
|
+
- Extract logic into small–medium functions with clear inputs/outputs
|
|
58
|
+
- Scope variables tightly; limit visibility to where needed
|
|
59
|
+
- Use block comments for visual separation when function extraction isn't practical
|
|
60
|
+
|
|
61
|
+
### Naming
|
|
62
|
+
- Meaningful names, even if long: `species_to_ref_fasta_map` not `species_map`
|
|
63
|
+
- Short names only for tight scope (loop indices, single-line lambdas)
|
|
64
|
+
- Signal behavior in function names: `to_y()`, `is_valid()` → returns value; `update_x()` → side effect
|
|
65
|
+
|
|
66
|
+
## Testing
|
|
67
|
+
|
|
68
|
+
### Principles
|
|
69
|
+
- Generate test data programmatically; avoid committing test data files
|
|
70
|
+
- Test behavior, not implementation—tests should survive refactoring
|
|
71
|
+
- Cover: expected behavior, error conditions, boundary cases
|
|
72
|
+
- Scale rigor to code longevity: thorough for shared code, lighter for one-off scripts
|
|
73
|
+
|
|
74
|
+
### Coverage Expectations
|
|
75
|
+
- New public functions: at least one happy-path test + one error case
|
|
76
|
+
- Bug fixes: add a regression test that would have caught the bug
|
|
77
|
+
- Performance-critical code: include benchmark or explain in PR why not needed
|
|
78
|
+
|
|
79
|
+
## Documentation Maintenance
|
|
80
|
+
|
|
81
|
+
When modifying code, update as needed:
|
|
82
|
+
- [ ] Docstrings (if signature or behavior changed)
|
|
83
|
+
- [ ] README.md (if usage patterns changed)
|
|
84
|
+
- [ ] Migration notes (if breaking change)
|
|
85
|
+
|
|
86
|
+
## Python-Specific
|
|
87
|
+
|
|
88
|
+
### Pragmatism
|
|
89
|
+
- Balance functional, OOP, and imperative—use what's clearest
|
|
90
|
+
- When in doubt, prefer pure functions and immutable data
|
|
91
|
+
- Know your utility libraries; contribute upstream rather than writing one-offs
|
|
92
|
+
|
|
93
|
+
### Style
|
|
94
|
+
- Heavier use of classes and type annotations than typical Python
|
|
95
|
+
- Prefer `@dataclass(frozen=True)` and Pydantic models with `frozen=True`
|
|
96
|
+
|
|
97
|
+
### Functions
|
|
98
|
+
- Functions should have **either** returns **or** side effects, not both
|
|
99
|
+
- Exceptions: logging, caching (where side effect is performance-only)
|
|
100
|
+
|
|
101
|
+
### Documentation
|
|
102
|
+
- Google-style docstrings with `Args:`, `Returns:`, `Yields:`, and `Raises:` blocks
|
|
103
|
+
- Docstrings are required on all public functions/classes
|
|
104
|
+
- Code comments should explain non-obvious choices and complex logic
|
|
105
|
+
|
|
106
|
+
### Typing
|
|
107
|
+
- **Required:** Type annotations on all function parameters and returns
|
|
108
|
+
- **Parameters:** Accept the most general type practical (e.g., `Iterable` over `List`)
|
|
109
|
+
- **Returns:** Return the most specific type without exposing implementation details
|
|
110
|
+
- Annotate locals when: they become return values, or called function lacks hints
|
|
111
|
+
- Use type aliases or `NewType` for complex structures
|
|
112
|
+
- Avoid `Any`—prefer type alias or `TypeVar`
|
|
113
|
+
- Avoid `cast()` and `type: ignore`—prefer alternatives, but when unavoidable (e.g., incorrect upstream stubs), document the reason inline.
|
|
114
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Development and Testing
|
|
2
|
+
|
|
3
|
+
## Primary Development Commands
|
|
4
|
+
|
|
5
|
+
To check and resolve linting issues in the codebase, run:
|
|
6
|
+
|
|
7
|
+
```console
|
|
8
|
+
uv run ruff check --fix
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
To check and resolve formatting issues in the codebase, run:
|
|
12
|
+
|
|
13
|
+
```console
|
|
14
|
+
uv run ruff format
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
To check the unit tests in the codebase, run:
|
|
18
|
+
|
|
19
|
+
```console
|
|
20
|
+
uv run pytest
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
To check the typing in the codebase, run:
|
|
24
|
+
|
|
25
|
+
```console
|
|
26
|
+
uv run mypy
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
To generate a code coverage report after testing locally, run:
|
|
30
|
+
|
|
31
|
+
```console
|
|
32
|
+
uv run coverage html
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
To check the lock file is up to date:
|
|
36
|
+
|
|
37
|
+
```console
|
|
38
|
+
uv lock --check
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Shortcut Task Commands
|
|
42
|
+
|
|
43
|
+
###### For Running Individual Checks
|
|
44
|
+
|
|
45
|
+
```console
|
|
46
|
+
uv run poe check-format
|
|
47
|
+
uv run poe check-lint
|
|
48
|
+
uv run poe check-tests
|
|
49
|
+
uv run poe check-typing
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
###### For Running All Checks
|
|
53
|
+
|
|
54
|
+
```console
|
|
55
|
+
uv run poe check-all
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
###### For Running Individual Fixes
|
|
59
|
+
|
|
60
|
+
```console
|
|
61
|
+
uv run poe fix-format
|
|
62
|
+
uv run poe fix-lint
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
###### For Running All Fixes
|
|
66
|
+
|
|
67
|
+
```console
|
|
68
|
+
uv run poe fix-all
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
###### For Running All Fixes and Checks
|
|
72
|
+
|
|
73
|
+
```console
|
|
74
|
+
uv run poe fix-and-check-all
|
|
75
|
+
```
|
cellme-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright © 2026 Fulcrum Genomics LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|