fusor 0.0.31.dev0__tar.gz → 0.2.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.
Files changed (60) hide show
  1. fusor-0.2.0/.coveragerc +7 -0
  2. fusor-0.2.0/.github/ISSUE_TEMPLATE/bug-report.yaml +85 -0
  3. fusor-0.2.0/.github/ISSUE_TEMPLATE/feature-request.yaml +60 -0
  4. fusor-0.2.0/.github/workflows/checks.yaml +18 -0
  5. fusor-0.2.0/.github/workflows/pr-priority-label.yaml +23 -0
  6. fusor-0.2.0/.github/workflows/release.yml +50 -0
  7. fusor-0.2.0/.github/workflows/stale.yaml +27 -0
  8. fusor-0.2.0/.gitignore +162 -0
  9. fusor-0.2.0/.pre-commit-config.yaml +18 -0
  10. {fusor-0.0.31.dev0/src/fusor.egg-info → fusor-0.2.0}/PKG-INFO +8 -8
  11. {fusor-0.0.31.dev0 → fusor-0.2.0}/README.md +1 -0
  12. {fusor-0.0.31.dev0 → fusor-0.2.0}/pyproject.toml +30 -14
  13. fusor-0.2.0/src/fusor/__init__.py +15 -0
  14. fusor-0.2.0/src/fusor/examples/README.md +9 -0
  15. {fusor-0.0.31.dev0 → fusor-0.2.0}/src/fusor/examples/__init__.py +1 -0
  16. fusor-0.2.0/src/fusor/examples/alk.json +40 -0
  17. fusor-0.2.0/src/fusor/examples/bcr_abl1.json +94 -0
  18. fusor-0.2.0/src/fusor/examples/bcr_abl1_expanded.json +118 -0
  19. fusor-0.2.0/src/fusor/examples/ewsr1.json +27 -0
  20. {fusor-0.0.31.dev0 → fusor-0.2.0}/src/fusor/examples/ewsr1_elements_only.json +4 -5
  21. fusor-0.2.0/src/fusor/examples/ewsr1_no_assay.json +20 -0
  22. fusor-0.2.0/src/fusor/examples/ewsr1_no_causative_event.json +23 -0
  23. fusor-0.2.0/src/fusor/examples/igh_myc.json +23 -0
  24. fusor-0.2.0/src/fusor/examples/tpm3_ntrk1.json +60 -0
  25. fusor-0.2.0/src/fusor/examples/tpm3_pdgfrb.json +86 -0
  26. fusor-0.2.0/src/fusor/fusor.py +621 -0
  27. {fusor-0.0.31.dev0 → fusor-0.2.0}/src/fusor/models.py +198 -271
  28. {fusor-0.0.31.dev0 → fusor-0.2.0}/src/fusor/nomenclature.py +50 -51
  29. {fusor-0.0.31.dev0 → fusor-0.2.0}/src/fusor/tools.py +7 -6
  30. {fusor-0.0.31.dev0 → fusor-0.2.0/src/fusor.egg-info}/PKG-INFO +8 -8
  31. {fusor-0.0.31.dev0 → fusor-0.2.0}/src/fusor.egg-info/SOURCES.txt +16 -2
  32. fusor-0.2.0/src/fusor.egg-info/requires.txt +17 -0
  33. fusor-0.2.0/tests/conftest.py +947 -0
  34. fusor-0.2.0/tests/data/dynamodb_local_latest/dynamodb_build.bash +5 -0
  35. fusor-0.2.0/tests/data/dynamodb_local_latest/shared-local-instance.db +0 -0
  36. fusor-0.2.0/tests/data/seqrepo/latest/aliases.sqlite3 +0 -0
  37. fusor-0.2.0/tests/data/seqrepo/latest/sequences/db.sqlite3 +0 -0
  38. fusor-0.2.0/tests/test_fusor.py +809 -0
  39. {fusor-0.0.31.dev0 → fusor-0.2.0}/tests/test_models.py +307 -346
  40. {fusor-0.0.31.dev0 → fusor-0.2.0}/tests/test_nomenclature.py +96 -120
  41. {fusor-0.0.31.dev0 → fusor-0.2.0}/tests/test_tools.py +1 -0
  42. fusor-0.0.31.dev0/src/fusor/__init__.py +0 -6
  43. fusor-0.0.31.dev0/src/fusor/examples/alk.json +0 -50
  44. fusor-0.0.31.dev0/src/fusor/examples/bcr_abl1.json +0 -112
  45. fusor-0.0.31.dev0/src/fusor/examples/bcr_abl1_expanded.json +0 -159
  46. fusor-0.0.31.dev0/src/fusor/examples/ewsr1.json +0 -28
  47. fusor-0.0.31.dev0/src/fusor/examples/ewsr1_no_assay.json +0 -21
  48. fusor-0.0.31.dev0/src/fusor/examples/ewsr1_no_causative_event.json +0 -24
  49. fusor-0.0.31.dev0/src/fusor/examples/igh_myc.json +0 -25
  50. fusor-0.0.31.dev0/src/fusor/examples/tpm3_ntrk1.json +0 -80
  51. fusor-0.0.31.dev0/src/fusor/examples/tpm3_pdgfrb.json +0 -124
  52. fusor-0.0.31.dev0/src/fusor/fusor.py +0 -824
  53. fusor-0.0.31.dev0/src/fusor/version.py +0 -2
  54. fusor-0.0.31.dev0/src/fusor.egg-info/requires.txt +0 -18
  55. fusor-0.0.31.dev0/tests/test_fusor.py +0 -1073
  56. {fusor-0.0.31.dev0 → fusor-0.2.0}/LICENSE +0 -0
  57. {fusor-0.0.31.dev0 → fusor-0.2.0}/setup.cfg +0 -0
  58. {fusor-0.0.31.dev0 → fusor-0.2.0}/src/fusor/exceptions.py +0 -0
  59. {fusor-0.0.31.dev0 → fusor-0.2.0}/src/fusor.egg-info/dependency_links.txt +0 -0
  60. {fusor-0.0.31.dev0 → fusor-0.2.0}/src/fusor.egg-info/top_level.txt +0 -0
@@ -0,0 +1,7 @@
1
+ [run]
2
+ source =
3
+ fusor/
4
+ omit =
5
+ setup.py
6
+ fusor/version.py
7
+ tests/
@@ -0,0 +1,85 @@
1
+ name: Bug Report
2
+ description: Report a bug.
3
+ labels: ["bug"]
4
+ body:
5
+ - type: textarea
6
+ attributes:
7
+ label: Describe the bug
8
+ description: Provide a clear and concise description of what the bug is.
9
+ validations:
10
+ required: true
11
+ - type: textarea
12
+ attributes:
13
+ label: Steps to reproduce
14
+ description: Provide detailed steps to replicate the bug.
15
+ placeholder: |
16
+ 1. In this environment...
17
+ 2. With this config...
18
+ 3. Run '...'
19
+ 4. See error...
20
+ validations:
21
+ required: true
22
+ - type: textarea
23
+ attributes:
24
+ label: Expected behavior
25
+ description: What did you expect to happen?
26
+ validations:
27
+ required: true
28
+ - type: textarea
29
+ attributes:
30
+ label: Current behavior
31
+ description: |
32
+ What actually happened?
33
+
34
+ Include full errors, stack traces, and/or relevant logs.
35
+ validations:
36
+ required: true
37
+ - type: textarea
38
+ attributes:
39
+ label: Possible reason(s)
40
+ description: Provide any insights into what might be causing the issue.
41
+ validations:
42
+ required: false
43
+ - type: textarea
44
+ attributes:
45
+ label: Suggested fix
46
+ description: Provide any suggestions on how to resolve the bug.
47
+ validations:
48
+ required: false
49
+ - type: textarea
50
+ attributes:
51
+ label: Branch, commit, and/or version
52
+ description: Provide the branch, commit, and/or version you're using.
53
+ placeholder: |
54
+ branch: issue-1
55
+ commit: abc123d
56
+ validations:
57
+ required: true
58
+ - type: textarea
59
+ attributes:
60
+ label: Screenshots
61
+ description: If applicable, add screenshots with descriptions to help explain your problem.
62
+ validations:
63
+ required: false
64
+ - type: textarea
65
+ attributes:
66
+ label: Environment details
67
+ description: Provide environment details (OS name and version, etc).
68
+ validations:
69
+ required: true
70
+ - type: textarea
71
+ attributes:
72
+ label: Additional details
73
+ description: Provide any other additional details about the problem.
74
+ validations:
75
+ required: false
76
+ - type: dropdown
77
+ attributes:
78
+ label: Contribution
79
+ description: Can you contribute to the development of this feature?
80
+ options:
81
+ - "Yes, I can create a PR for this fix."
82
+ - "Yes, but I can only provide ideas and feedback."
83
+ - "No, I cannot contribute."
84
+ validations:
85
+ required: false
@@ -0,0 +1,60 @@
1
+ name: Feature Request
2
+ description: Suggest an idea for this project.
3
+ labels: ["enhancement"]
4
+ body:
5
+ - type: textarea
6
+ attributes:
7
+ label: Feature description
8
+ description: Provide a clear and concise description of what you want to happen.
9
+ validations:
10
+ required: true
11
+ - type: textarea
12
+ attributes:
13
+ label: Use case
14
+ description: |
15
+ Why do you need this feature? For example: "I'm always frustrated when..."
16
+ validations:
17
+ required: true
18
+ - type: textarea
19
+ attributes:
20
+ label: Proposed solution
21
+ description: Provide proposed solution.
22
+ validations:
23
+ required: false
24
+ - type: textarea
25
+ attributes:
26
+ label: Alternatives considered
27
+ description: Describe any alternative solutions you've considered.
28
+ validations:
29
+ required: false
30
+ - type: textarea
31
+ attributes:
32
+ label: Implementation details
33
+ description: Provide any technical details on how the feature might be implemented.
34
+ validations:
35
+ required: false
36
+ - type: textarea
37
+ attributes:
38
+ label: Potential Impact
39
+ description: |
40
+ Discuss any potential impacts of this feature on existing functionality or performance, if known.
41
+ Will this feature cause breaking changes?
42
+ What challenges might arise?
43
+ validations:
44
+ required: false
45
+ - type: textarea
46
+ attributes:
47
+ label: Additional context
48
+ description: Provide any other context or screenshots about the feature.
49
+ validations:
50
+ required: false
51
+ - type: dropdown
52
+ attributes:
53
+ label: Contribution
54
+ description: Can you contribute to the development of this feature?
55
+ options:
56
+ - "Yes, I can create a PR for this feature."
57
+ - "Yes, but I can only provide ideas and feedback."
58
+ - "No, I cannot contribute."
59
+ validations:
60
+ required: false
@@ -0,0 +1,18 @@
1
+ name: run checks
2
+ on: [push, pull_request]
3
+ jobs:
4
+ lint:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v4
8
+
9
+ - name: Set up Python
10
+ uses: actions/setup-python@v5
11
+ with:
12
+ python-version: "3.11"
13
+
14
+ - name: Install dependencies
15
+ run: python3 -m pip install ".[dev]"
16
+
17
+ - name: Check style
18
+ run: python3 -m ruff check . && python3 -m ruff format --check .
@@ -0,0 +1,23 @@
1
+ name: Pull Request Has Priority Label
2
+ on:
3
+ pull_request:
4
+ types: [opened, labeled, unlabeled, synchronize]
5
+ jobs:
6
+ pr-priority-label:
7
+ runs-on: ubuntu-latest
8
+ permissions:
9
+ issues: write
10
+ pull-requests: write
11
+ outputs:
12
+ status: ${{ steps.check-labels.outputs.status }}
13
+ steps:
14
+ - id: check-labels
15
+ uses: mheap/github-action-required-labels@v5
16
+ with:
17
+ mode: exactly
18
+ count: 1
19
+ labels: "priority:*"
20
+ use_regex: true
21
+ add_comment: true
22
+ message: "PRs require a priority label. Please add one."
23
+ exit_type: failure
@@ -0,0 +1,50 @@
1
+ # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
2
+ name: Publish Python distribution to PyPI
3
+
4
+ on:
5
+ release:
6
+ types: [created]
7
+
8
+ jobs:
9
+ build:
10
+ name: Build distribution
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.x"
19
+ - name: Install pypa/build
20
+ run: >-
21
+ python3 -m
22
+ pip install
23
+ build
24
+ --user
25
+ - name: Build a binary wheel and a source tarball
26
+ run: python3 -m build
27
+ - name: Store the distribution packages
28
+ uses: actions/upload-artifact@v4
29
+ with:
30
+ name: python-package-distributions
31
+ path: dist/
32
+ publish-to-pypi:
33
+ name: >-
34
+ Publish Python distribution to PyPI
35
+ needs:
36
+ - build
37
+ runs-on: ubuntu-latest
38
+ environment:
39
+ name: pypi
40
+ url: https://pypi.org/p/fusor
41
+ permissions:
42
+ id-token: write # IMPORTANT: mandatory for trusted publishing
43
+ steps:
44
+ - name: Download all the dists
45
+ uses: actions/download-artifact@v4
46
+ with:
47
+ name: python-package-distributions
48
+ path: dist/
49
+ - name: Publish distribution to PyPI
50
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,27 @@
1
+ name: "Stalebot for issues and PRs"
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "30 13 * * 1-5"
6
+
7
+ jobs:
8
+ stale-high-priority:
9
+ uses: genomicmedlab/software-templates/.github/workflows/reusable-stale.yaml@main
10
+ with:
11
+ days-before-issue-stale: 90
12
+ days-before-pr-stale: 1
13
+ labels: priority:high
14
+
15
+ stale-medium-priority:
16
+ uses: genomicmedlab/software-templates/.github/workflows/reusable-stale.yaml@main
17
+ with:
18
+ days-before-issue-stale: 135
19
+ days-before-pr-stale: 3
20
+ labels: priority:medium
21
+
22
+ stale-low-priority:
23
+ uses: genomicmedlab/software-templates/.github/workflows/reusable-stale.yaml@main
24
+ with:
25
+ days-before-issue-stale: 180
26
+ days-before-pr-stale: 7
27
+ labels: priority:low
fusor-0.2.0/.gitignore ADDED
@@ -0,0 +1,162 @@
1
+ # Ignore xlsx temp file
2
+ \~*
3
+
4
+ # Ignore system files
5
+ .DS_Store
6
+
7
+ # Byte-compiled / optimized / DLL files
8
+ __pycache__/
9
+ *.py[cod]
10
+ *$py.class
11
+
12
+ # C extensions
13
+ *.so
14
+
15
+ # Distribution / packaging
16
+ .Python
17
+ build/
18
+ develop-eggs/
19
+ dist/
20
+ downloads/
21
+ eggs/
22
+ .eggs/
23
+ lib/
24
+ lib64/
25
+ parts/
26
+ sdist/
27
+ var/
28
+ wheels/
29
+ share/python-wheels/
30
+ *.egg-info/
31
+ .installed.cfg
32
+ *.egg
33
+ MANIFEST
34
+
35
+ # PyInstaller
36
+ # Usually these files are written by a python script from a template
37
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
38
+ *.manifest
39
+ *.spec
40
+
41
+ # Installer logs
42
+ pip-log.txt
43
+ pip-delete-this-directory.txt
44
+
45
+ # Unit test / coverage reports
46
+ htmlcov/
47
+ .tox/
48
+ .nox/
49
+ .coverage
50
+ .coverage.*
51
+ .cache
52
+ nosetests.xml
53
+ coverage.xml
54
+ *.cover
55
+ *.py,cover
56
+ .hypothesis/
57
+ .pytest_cache/
58
+ cover/
59
+
60
+ # Translations
61
+ *.mo
62
+ *.pot
63
+
64
+ # Django stuff:
65
+ *.log
66
+ local_settings.py
67
+ db.sqlite3-journal
68
+
69
+ # Flask stuff:
70
+ instance/
71
+ .webassets-cache
72
+
73
+ # Scrapy stuff:
74
+ .scrapy
75
+
76
+ # Sphinx documentation
77
+ docs/_build/
78
+
79
+ # PyBuilder
80
+ .pybuilder/
81
+ target/
82
+
83
+ # Jupyter Notebook
84
+ .ipynb_checkpoints
85
+
86
+ # IPython
87
+ profile_default/
88
+ ipython_config.py
89
+
90
+ # pyenv
91
+ # For a library or package, you might want to ignore these files since the code is
92
+ # intended to run in multiple environments; otherwise, check them in:
93
+ # .python-version
94
+
95
+ # pipenv
96
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
97
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
98
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
99
+ # install all needed dependencies.
100
+ #Pipfile.lock
101
+
102
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
103
+ __pypackages__/
104
+
105
+ # Celery stuff
106
+ celerybeat-schedule
107
+ celerybeat.pid
108
+
109
+ # SageMath parsed files
110
+ *.sage.py
111
+
112
+ # Environments
113
+ .env
114
+ .venv
115
+ env/
116
+ venv/
117
+ ENV/
118
+ env.bak/
119
+ venv.bak/
120
+
121
+ # Spyder project settings
122
+ .spyderproject
123
+ .spyproject
124
+
125
+ # Rope project settings
126
+ .ropeproject
127
+
128
+ # mkdocs documentation
129
+ /site
130
+
131
+ # mypy
132
+ .mypy_cache/
133
+ .dmypy.json
134
+ dmypy.json
135
+
136
+ # Pyre type checker
137
+ .pyre/
138
+
139
+ # pytype static type analyzer
140
+ .pytype/
141
+
142
+ # Cython debug symbols
143
+ cython_debug/
144
+
145
+ # allow pytest override with pytest.ini
146
+ pytest.ini
147
+
148
+ # ignore data dir
149
+ data/*
150
+ therapy/data/
151
+
152
+ # IDE stuff
153
+ .idea/
154
+ .vim/
155
+ *.swp
156
+ .vscode/
157
+
158
+ # DynamoDB Local
159
+ dynamodb_local_latest/*
160
+
161
+ # Build files
162
+ Pipfile.lock
@@ -0,0 +1,18 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.6.0 # pre-commit-hooks version
4
+ hooks:
5
+ - id: check-added-large-files
6
+ - id: detect-private-key
7
+ - id: trailing-whitespace
8
+ - id: end-of-file-fixer
9
+ - id: check-merge-conflict
10
+ - id: detect-aws-credentials
11
+ args: [ --allow-missing-credentials ]
12
+ - repo: https://github.com/astral-sh/ruff-pre-commit
13
+ rev: v0.5.0
14
+ hooks:
15
+ - id: ruff-format
16
+ - id: ruff
17
+ args: [--fix, --exit-non-zero-on-fix]
18
+ minimum_pre_commit_version: 3.7.1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fusor
3
- Version: 0.0.31.dev0
3
+ Version: 0.2.0
4
4
  Summary: Computable object representation and validation for gene fusions
5
5
  Author-email: Alex Wagner <alex.wagner@nationwidechildrens.org>, Kori Kuzma <kori.kuzma@nationwidechildrens.org>, James Stevenson <james.stevenson@nationwidechildrens.org>, Katie Stahl <kathryn.stahl@nationwidechildrens.org>, Jeremy Arbesfeld <jeremy.arbesfeld@nationwidechildrens.org>
6
6
  License:
@@ -45,22 +45,21 @@ Classifier: Programming Language :: Python :: 3.12
45
45
  Requires-Python: >=3.10
46
46
  Description-Content-Type: text/markdown
47
47
  License-File: LICENSE
48
- Requires-Dist: pydantic==2.*
49
- Requires-Dist: ga4gh.vrsatile.pydantic~=0.2.0
50
- Requires-Dist: ga4gh.vrs~=0.8.1
48
+ Requires-Dist: pydantic==2.4.2
49
+ Requires-Dist: ga4gh.vrs~=2.0.0a10
51
50
  Requires-Dist: biocommons.seqrepo
52
- Requires-Dist: gene-normalizer~=0.1.40-dev1
53
- Requires-Dist: cool-seq-tool~=0.3.0-dev1
51
+ Requires-Dist: gene-normalizer==0.4.0
52
+ Requires-Dist: cool-seq-tool~=0.5.1
54
53
  Provides-Extra: tests
55
54
  Requires-Dist: pytest; extra == "tests"
56
55
  Requires-Dist: pytest-cov; extra == "tests"
57
56
  Requires-Dist: pytest-asyncio; extra == "tests"
58
57
  Provides-Extra: dev
59
- Requires-Dist: pre-commit; extra == "dev"
58
+ Requires-Dist: pre-commit>=3.7.1; extra == "dev"
60
59
  Requires-Dist: pytest; extra == "dev"
61
60
  Requires-Dist: pytest-cov; extra == "dev"
62
61
  Requires-Dist: pytest-asyncio; extra == "dev"
63
- Requires-Dist: ruff==0.2.0; extra == "dev"
62
+ Requires-Dist: ruff==0.5.0; extra == "dev"
64
63
 
65
64
  # FUSOR
66
65
 
@@ -68,6 +67,7 @@ Requires-Dist: ruff==0.2.0; extra == "dev"
68
67
  [![image](https://img.shields.io/pypi/l/fusor.svg)](https://pypi.python.org/pypi/fusor)
69
68
  [![image](https://img.shields.io/pypi/pyversions/fusor.svg)](https://pypi.python.org/pypi/fusor)
70
69
  [![Actions status](https://github.com/cancervariants/fusor/actions/workflows/checks.yaml/badge.svg)](https://github.com/cancervariants/fusor/actions/checks.yaml)
70
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.12708252.svg)](https://doi.org/10.5281/zenodo.12708252)
71
71
 
72
72
  <!-- description -->
73
73
  FUSOR (**FUS**ion **O**bject **R**epresentation) provides modeling and validation tools for representing gene fusions in a flexible, computable structure.
@@ -4,6 +4,7 @@
4
4
  [![image](https://img.shields.io/pypi/l/fusor.svg)](https://pypi.python.org/pypi/fusor)
5
5
  [![image](https://img.shields.io/pypi/pyversions/fusor.svg)](https://pypi.python.org/pypi/fusor)
6
6
  [![Actions status](https://github.com/cancervariants/fusor/actions/workflows/checks.yaml/badge.svg)](https://github.com/cancervariants/fusor/actions/checks.yaml)
7
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.12708252.svg)](https://doi.org/10.5281/zenodo.12708252)
7
8
 
8
9
  <!-- description -->
9
10
  FUSOR (**FUS**ion **O**bject **R**epresentation) provides modeling and validation tools for representing gene fusions in a flexible, computable structure.
@@ -24,19 +24,19 @@ classifiers = [
24
24
  requires-python = ">=3.10"
25
25
  description = "Computable object representation and validation for gene fusions"
26
26
  license = {file = "LICENSE"}
27
+ # pydantic is pinned to 2.4.2 for now, since there is a change in later versions that causes a validation error for test_fusion in test_fusor.py
27
28
  dependencies = [
28
- "pydantic == 2.*",
29
- "ga4gh.vrsatile.pydantic ~=0.2.0",
30
- "ga4gh.vrs ~=0.8.1",
29
+ "pydantic ==2.4.2",
30
+ "ga4gh.vrs ~=2.0.0a10",
31
31
  "biocommons.seqrepo",
32
- "gene-normalizer ~=0.1.40-dev1",
33
- "cool-seq-tool ~=0.3.0-dev1",
32
+ "gene-normalizer ==0.4.0",
33
+ "cool-seq-tool ~=0.5.1",
34
34
  ]
35
35
  dynamic=["version"]
36
36
 
37
37
  [project.optional-dependencies]
38
38
  tests = ["pytest", "pytest-cov", "pytest-asyncio"]
39
- dev = ["pre-commit", "pytest", "pytest-cov", "pytest-asyncio", "ruff==0.2.0"]
39
+ dev = ["pre-commit>=3.7.1", "pytest", "pytest-cov", "pytest-asyncio", "ruff==0.5.0"]
40
40
 
41
41
  [project.urls]
42
42
  Homepage = "https://github.com/cancervariants/fusor"
@@ -46,11 +46,10 @@ Source = "https://github.com/cancervariants/fusor"
46
46
  "Bug Tracker" = "https://github.com/cancervariants/fusor/issues"
47
47
 
48
48
  [build-system]
49
- requires = ["setuptools>=64.0"]
49
+ requires = ["setuptools>=64", "setuptools_scm>=8"]
50
50
  build-backend = "setuptools.build_meta"
51
51
 
52
- [tool.setuptools.dynamic]
53
- version = {attr = "fusor.version.__version__"}
52
+ [tool.setuptools_scm]
54
53
 
55
54
  [tool.setuptools.packages.find]
56
55
  where = ["src"]
@@ -85,16 +84,22 @@ select = [
85
84
  "DTZ", # https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
86
85
  "T10", # https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
87
86
  "EM", # https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
87
+ "LOG", # https://docs.astral.sh/ruff/rules/#flake8-logging-log
88
88
  "G", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
89
+ "INP", # https://docs.astral.sh/ruff/rules/#flake8-no-pep420-inp
89
90
  "PIE", # https://docs.astral.sh/ruff/rules/#flake8-pie-pie
90
91
  "T20", # https://docs.astral.sh/ruff/rules/#flake8-print-t20
91
92
  "PT", # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
92
93
  "Q", # https://docs.astral.sh/ruff/rules/#flake8-quotes-q
93
94
  "RSE", # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
94
95
  "RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
96
+ "SLF", # https://docs.astral.sh/ruff/rules/#flake8-self-slf
95
97
  "SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
98
+ "ARG", # https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg
96
99
  "PTH", # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
97
100
  "PGH", # https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh
101
+ "PERF", # https://docs.astral.sh/ruff/rules/#perflint-perf
102
+ "FURB", # https://docs.astral.sh/ruff/rules/#refurb-furb
98
103
  "RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
99
104
  ]
100
105
  fixable = [
@@ -105,15 +110,19 @@ fixable = [
105
110
  "ANN",
106
111
  "B",
107
112
  "C4",
113
+ "LOG",
108
114
  "G",
109
115
  "PIE",
110
116
  "PT",
111
117
  "RSE",
112
118
  "SIM",
113
- "RUF"
119
+ "PERF",
120
+ "FURB",
121
+ "RUF",
114
122
  ]
115
- # ANN101 - missing-type-self
116
123
  # ANN003 - missing-type-kwargs
124
+ # ANN101 - missing-type-self
125
+ # ANN102 - missing-type-cls
117
126
  # D203 - one-blank-line-before-class
118
127
  # D205 - blank-line-after-summary
119
128
  # D206 - indent-with-spaces*
@@ -129,7 +138,7 @@ fixable = [
129
138
  # S321 - suspicious-ftp-lib-usage
130
139
  # *ignored for compatibility with formatter
131
140
  ignore = [
132
- "ANN101", "ANN003",
141
+ "ANN003", "ANN101", "ANN102",
133
142
  "D203", "D205", "D206", "D213", "D300", "D400", "D415",
134
143
  "E111", "E114", "E117", "E501",
135
144
  "W191",
@@ -144,6 +153,13 @@ ignore = [
144
153
  # ANN102 - missing-type-cls
145
154
  # S101 - assert
146
155
  # B011 - assert-false
156
+ # N803 - invalid-argument-name
147
157
  # N805 - invalid-first-argument-name-for-method
148
- "tests/*" = ["ANN001", "ANN2", "ANN102", "S101", "B011"]
149
- "src/fusor/models.py" = ["ANN201", "N805", "ANN001", "ANN2", "ANN102"]
158
+ # N815 - mixed-case-variable-in-class-scope
159
+ # INP001 - implicit-namespace-package
160
+ # SLF001 - private-member-access
161
+ "tests/*" = ["ANN001", "ANN2", "ANN102", "S101", "B011", "INP001", "SLF001"]
162
+ "src/fusor/models.py" = ["ANN201", "N803", "N805", "N815", "ANN001", "ANN2", "ANN102"]
163
+
164
+ [tool.ruff.format]
165
+ docstring-code-format = true
@@ -0,0 +1,15 @@
1
+ """Provide computable object representation and validation for gene fusions"""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ from fusor.fusor import FUSOR
6
+
7
+ __all__ = ["__version__", "FUSOR"]
8
+
9
+
10
+ try:
11
+ __version__ = version("cool_seq_tool")
12
+ except PackageNotFoundError:
13
+ __version__ = "unknown"
14
+ finally:
15
+ del version, PackageNotFoundError
@@ -0,0 +1,9 @@
1
+ # Examples
2
+
3
+ * `bcr_abl1.json`: Example BCR-ABL1 categorical fusion drawn from [COSF1780](https://cancer.sanger.ac.uk/cosmic/fusion/summary?id=1780). Demonstrates structure of junction components, a linker sequence segment, critical functional domains, and reading frame preservation. Represented in nomenclature as `NM_004327.3(BCR):e.2+182::ACTAAAGCG::NM_005157.5(ABL1):e.2-173`.
4
+ * `bcr_abl1_expanded.json`: Equivalent fusion to the above, but with expanded descriptions of genes, locations, and sequences provided by SeqRepo and the VICC Gene Normalizer.
5
+ * `alk.json`: Example of an ALK fusion, demonstrating use of a categorical "multiple possible gene" component, retrieved from a human-curated database like [CIViC](https://civicdb.org/variants/499/summary). Represented in nomenclature as `v::ALK(hgnc:427)`.
6
+ * `ewsr1.json`: An EWSR1 assayed fusion, demonstrating an assay description object and use of the "unknown gene" partner. Represented in nomenclature as `EWSR1(hgnc:3508)::?`.
7
+ * `tpm3_ntrk1.json`: Example TPM3-NTRK1 assayed fusion drawn from previous VICC Fusion Curation draft material. Represented in nomenclature as `NM_152263.3(TPM3):e.1_8::NM_002529.3(NTRK1):e.10_22`.
8
+ * `tpm3_pdgfrb.json`: Example TPM3-PDGFRB assayed fusion identified via RT-PCR. Represented in nomenclature as `NM_152263.3(TPM3):e.8::NM_002609.3(PDGFRB):e.11_22`.
9
+ * `igh_myc.json`: Example of an enhancer-driven IGH-MYC categorical fusion. Represented in nomenclature as `reg_e_EH38E3121735@IGH(hgnc:5477)::MYC(hgnc:7553)`.
@@ -1,4 +1,5 @@
1
1
  """Provide programmatic access to example objects."""
2
+
2
3
  import json
3
4
  from pathlib import Path
4
5