snakesee 0.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.
- snakesee-0.1.0/.github/CODEOWNERS +1 -0
- snakesee-0.1.0/.github/pull_request_template.md +32 -0
- snakesee-0.1.0/.github/workflows/publish.yml +117 -0
- snakesee-0.1.0/.github/workflows/tests.yml +52 -0
- snakesee-0.1.0/.gitignore +137 -0
- snakesee-0.1.0/.pre-commit-config.yaml +7 -0
- snakesee-0.1.0/.readthedocs.yml +11 -0
- snakesee-0.1.0/CONTRIBUTING.md +156 -0
- snakesee-0.1.0/LICENSE +21 -0
- snakesee-0.1.0/PKG-INFO +373 -0
- snakesee-0.1.0/README.md +338 -0
- snakesee-0.1.0/RELEASE_STEPS.md +285 -0
- snakesee-0.1.0/codecov.yml +2 -0
- snakesee-0.1.0/docs/index.md +39 -0
- snakesee-0.1.0/docs/installation.md +78 -0
- snakesee-0.1.0/docs/scripts/gen_ref_pages.py +42 -0
- snakesee-0.1.0/docs/usage.md +196 -0
- snakesee-0.1.0/mkdocs.yml +51 -0
- snakesee-0.1.0/pixi.toml +20 -0
- snakesee-0.1.0/pyproject.toml +185 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/README.md +95 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/pyproject.toml +72 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/src/snakemake_logger_plugin_snakesee/__init__.py +14 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/src/snakemake_logger_plugin_snakesee/events.py +83 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/src/snakemake_logger_plugin_snakesee/handler.py +383 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/src/snakemake_logger_plugin_snakesee/py.typed +0 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/src/snakemake_logger_plugin_snakesee/settings.py +30 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/src/snakemake_logger_plugin_snakesee/writer.py +94 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/tests/__init__.py +1 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/tests/conftest.py +8 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/tests/test_events.py +151 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/tests/test_handler.py +285 -0
- snakesee-0.1.0/snakemake-logger-plugin-snakesee/tests/test_writer.py +146 -0
- snakesee-0.1.0/snakesee/__init__.py +33 -0
- snakesee-0.1.0/snakesee/assets/logo.png +0 -0
- snakesee-0.1.0/snakesee/cli.py +292 -0
- snakesee-0.1.0/snakesee/estimator.py +447 -0
- snakesee-0.1.0/snakesee/events.py +186 -0
- snakesee-0.1.0/snakesee/models.py +673 -0
- snakesee-0.1.0/snakesee/parser.py +1062 -0
- snakesee-0.1.0/snakesee/plugins/__init__.py +373 -0
- snakesee-0.1.0/snakesee/plugins/base.py +132 -0
- snakesee-0.1.0/snakesee/plugins/bwa.py +65 -0
- snakesee-0.1.0/snakesee/plugins/fastp.py +82 -0
- snakesee-0.1.0/snakesee/plugins/fgbio.py +129 -0
- snakesee-0.1.0/snakesee/plugins/samtools.py +79 -0
- snakesee-0.1.0/snakesee/plugins/star.py +69 -0
- snakesee-0.1.0/snakesee/profile.py +290 -0
- snakesee-0.1.0/snakesee/py.typed +0 -0
- snakesee-0.1.0/snakesee/tui.py +2001 -0
- snakesee-0.1.0/snakesee/validation.py +407 -0
- snakesee-0.1.0/tests/__init__.py +1 -0
- snakesee-0.1.0/tests/conftest.py +73 -0
- snakesee-0.1.0/tests/integration/__init__.py +1 -0
- snakesee-0.1.0/tests/integration/conftest.py +351 -0
- snakesee-0.1.0/tests/integration/test_workflows.py +632 -0
- snakesee-0.1.0/tests/integration/workflows/adjacent_wildcards/Snakefile +15 -0
- snakesee-0.1.0/tests/integration/workflows/checkpoint_workflow/Snakefile +34 -0
- snakesee-0.1.0/tests/integration/workflows/conditional_wildcards/Snakefile +38 -0
- snakesee-0.1.0/tests/integration/workflows/custom_resources/Snakefile +25 -0
- snakesee-0.1.0/tests/integration/workflows/deep_chain/Snakefile +79 -0
- snakesee-0.1.0/tests/integration/workflows/diamond/Snakefile +51 -0
- snakesee-0.1.0/tests/integration/workflows/failing_job/Snakefile +24 -0
- snakesee-0.1.0/tests/integration/workflows/failing_with_retry/Snakefile +38 -0
- snakesee-0.1.0/tests/integration/workflows/fan_out_fan_in/Snakefile +41 -0
- snakesee-0.1.0/tests/integration/workflows/group_jobs/Snakefile +18 -0
- snakesee-0.1.0/tests/integration/workflows/input_function/Snakefile +20 -0
- snakesee-0.1.0/tests/integration/workflows/keep_going_mixed/Snakefile +53 -0
- snakesee-0.1.0/tests/integration/workflows/localrules/Snakefile +23 -0
- snakesee-0.1.0/tests/integration/workflows/long_names/Snakefile +16 -0
- snakesee-0.1.0/tests/integration/workflows/many_wildcards/Snakefile +15 -0
- snakesee-0.1.0/tests/integration/workflows/missing_input_error/Snakefile +10 -0
- snakesee-0.1.0/tests/integration/workflows/mixed_duration/Snakefile +36 -0
- snakesee-0.1.0/tests/integration/workflows/module_workflow/Snakefile +23 -0
- snakesee-0.1.0/tests/integration/workflows/module_workflow/rules/processing.smk +11 -0
- snakesee-0.1.0/tests/integration/workflows/multi_output/Snakefile +22 -0
- snakesee-0.1.0/tests/integration/workflows/multiple_checkpoints/Snakefile +52 -0
- snakesee-0.1.0/tests/integration/workflows/multiple_failures/Snakefile +34 -0
- snakesee-0.1.0/tests/integration/workflows/nested_wildcards/Snakefile +27 -0
- snakesee-0.1.0/tests/integration/workflows/numeric_wildcards/Snakefile +13 -0
- snakesee-0.1.0/tests/integration/workflows/parallel_samples/Snakefile +18 -0
- snakesee-0.1.0/tests/integration/workflows/params_wildcards/Snakefile +23 -0
- snakesee-0.1.0/tests/integration/workflows/python_script_error/Snakefile +16 -0
- snakesee-0.1.0/tests/integration/workflows/quick_jobs/Snakefile +14 -0
- snakesee-0.1.0/tests/integration/workflows/resources/Snakefile +38 -0
- snakesee-0.1.0/tests/integration/workflows/retry_exhausted/Snakefile +15 -0
- snakesee-0.1.0/tests/integration/workflows/scatter_gather/Snakefile +64 -0
- snakesee-0.1.0/tests/integration/workflows/simple_linear/Snakefile +36 -0
- snakesee-0.1.0/tests/integration/workflows/special_wildcards/Snakefile +16 -0
- snakesee-0.1.0/tests/integration/workflows/temp_files/Snakefile +25 -0
- snakesee-0.1.0/tests/integration/workflows/threads_scaling/Snakefile +16 -0
- snakesee-0.1.0/tests/integration/workflows/wide_fanout/Snakefile +16 -0
- snakesee-0.1.0/tests/integration/workflows/wildcards_complex/Snakefile +22 -0
- snakesee-0.1.0/tests/integration/workflows/with_benchmark/Snakefile +17 -0
- snakesee-0.1.0/tests/integration/workflows/with_logs/Snakefile +19 -0
- snakesee-0.1.0/tests/test_cli.py +203 -0
- snakesee-0.1.0/tests/test_estimator.py +208 -0
- snakesee-0.1.0/tests/test_events.py +273 -0
- snakesee-0.1.0/tests/test_models.py +430 -0
- snakesee-0.1.0/tests/test_parser.py +794 -0
- snakesee-0.1.0/tests/test_plugins.py +437 -0
- snakesee-0.1.0/tests/test_profile.py +301 -0
- snakesee-0.1.0/tests/test_tui.py +365 -0
- snakesee-0.1.0/tests/test_validation.py +433 -0
- snakesee-0.1.0/uv.lock +1962 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @nh13
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
<!-- Briefly describe the changes in this PR -->
|
|
4
|
+
|
|
5
|
+
## Type of Change
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix
|
|
8
|
+
- [ ] New feature
|
|
9
|
+
- [ ] Documentation update
|
|
10
|
+
- [ ] CI/CD change
|
|
11
|
+
- [ ] Other (please describe):
|
|
12
|
+
|
|
13
|
+
## Checklist
|
|
14
|
+
|
|
15
|
+
- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) guidelines
|
|
16
|
+
- [ ] My code follows the project's style guidelines
|
|
17
|
+
- [ ] I have added tests that prove my fix/feature works
|
|
18
|
+
- [ ] New and existing tests pass locally
|
|
19
|
+
- [ ] I have updated documentation as needed
|
|
20
|
+
|
|
21
|
+
## Testing
|
|
22
|
+
|
|
23
|
+
<!-- Describe how you tested these changes -->
|
|
24
|
+
|
|
25
|
+
## Related Issues
|
|
26
|
+
|
|
27
|
+
<!-- Link to related issues if applicable -->
|
|
28
|
+
Closes #
|
|
29
|
+
|
|
30
|
+
## Additional Notes
|
|
31
|
+
|
|
32
|
+
<!-- Any additional information that reviewers should know -->
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '[0-9]+.[0-9]+.[0-9]+'
|
|
7
|
+
|
|
8
|
+
env:
|
|
9
|
+
UV_VERSION: 0.8.22
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
on-main-branch-check:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
outputs:
|
|
15
|
+
on_main: ${{ steps.contains_tag.outputs.retval }}
|
|
16
|
+
steps:
|
|
17
|
+
- name: git config --global remote.origin.followRemoteHEAD never
|
|
18
|
+
run: git config --global remote.origin.followRemoteHEAD never
|
|
19
|
+
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
|
|
24
|
+
- uses: rickstaa/action-contains-tag@v1
|
|
25
|
+
id: contains_tag
|
|
26
|
+
with:
|
|
27
|
+
reference: "main"
|
|
28
|
+
tag: "${{ github.ref_name }}"
|
|
29
|
+
|
|
30
|
+
tests:
|
|
31
|
+
name: tests
|
|
32
|
+
needs: on-main-branch-check
|
|
33
|
+
if: ${{ needs.on-main-branch-check.outputs.on_main == 'true' }}
|
|
34
|
+
uses: "./.github/workflows/tests.yml"
|
|
35
|
+
|
|
36
|
+
build-sdist:
|
|
37
|
+
name: build source distribution
|
|
38
|
+
needs: tests
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
with:
|
|
43
|
+
fetch-depth: 0
|
|
44
|
+
|
|
45
|
+
- name: Install uv
|
|
46
|
+
uses: astral-sh/setup-uv@v4
|
|
47
|
+
with:
|
|
48
|
+
version: "${{ env.UV_VERSION }}"
|
|
49
|
+
python-version: "3.12"
|
|
50
|
+
|
|
51
|
+
- name: Build package
|
|
52
|
+
run: uv build --sdist
|
|
53
|
+
|
|
54
|
+
- uses: actions/upload-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: snakesee-sdist
|
|
57
|
+
path: dist/*.tar.gz
|
|
58
|
+
|
|
59
|
+
publish-to-pypi:
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
needs: build-sdist
|
|
62
|
+
environment: pypi
|
|
63
|
+
permissions:
|
|
64
|
+
id-token: write
|
|
65
|
+
steps:
|
|
66
|
+
- uses: actions/download-artifact@v4
|
|
67
|
+
with:
|
|
68
|
+
path: packages
|
|
69
|
+
pattern: 'snakesee-*'
|
|
70
|
+
merge-multiple: true
|
|
71
|
+
|
|
72
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
73
|
+
with:
|
|
74
|
+
packages-dir: packages/
|
|
75
|
+
skip-existing: true
|
|
76
|
+
verbose: true
|
|
77
|
+
|
|
78
|
+
make-changelog:
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
needs: publish-to-pypi
|
|
81
|
+
outputs:
|
|
82
|
+
release_body: ${{ steps.git-cliff.outputs.content }}
|
|
83
|
+
steps:
|
|
84
|
+
- name: Checkout the Repository at the Tagged Commit
|
|
85
|
+
uses: actions/checkout@v4
|
|
86
|
+
with:
|
|
87
|
+
fetch-depth: 0
|
|
88
|
+
ref: ${{ github.ref_name }}
|
|
89
|
+
|
|
90
|
+
- name: Generate a Changelog
|
|
91
|
+
uses: orhun/git-cliff-action@v4
|
|
92
|
+
id: git-cliff
|
|
93
|
+
with:
|
|
94
|
+
config: pyproject.toml
|
|
95
|
+
args: --latest --verbose
|
|
96
|
+
env:
|
|
97
|
+
GITHUB_REPO: ${{ github.repository }}
|
|
98
|
+
|
|
99
|
+
make-github-release:
|
|
100
|
+
runs-on: ubuntu-latest
|
|
101
|
+
environment: github
|
|
102
|
+
permissions:
|
|
103
|
+
contents: write
|
|
104
|
+
pull-requests: read
|
|
105
|
+
needs: make-changelog
|
|
106
|
+
steps:
|
|
107
|
+
- name: Download the sdist
|
|
108
|
+
uses: actions/download-artifact@v4
|
|
109
|
+
|
|
110
|
+
- name: Create GitHub Release
|
|
111
|
+
id: create_release
|
|
112
|
+
uses: softprops/action-gh-release@v2
|
|
113
|
+
with:
|
|
114
|
+
name: ${{ github.ref_name }}
|
|
115
|
+
body: ${{ needs.make-changelog.outputs.release_body }}
|
|
116
|
+
draft: false
|
|
117
|
+
prerelease: false
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Static Analysis, Unit Tests, and Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- "**"
|
|
7
|
+
tags:
|
|
8
|
+
- "!**"
|
|
9
|
+
workflow_call:
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
UV_VERSION: 0.8.22
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
pull-requests: write
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
Tests:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
PYTHON_VERSION: ["3.11", "3.12", "3.13"]
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- name: Install uv
|
|
29
|
+
uses: astral-sh/setup-uv@v4
|
|
30
|
+
with:
|
|
31
|
+
version: "${{ env.UV_VERSION }}"
|
|
32
|
+
python-version: "${{ matrix.PYTHON_VERSION }}"
|
|
33
|
+
enable-cache: 'true'
|
|
34
|
+
cache-suffix: "${{ matrix.PYTHON_VERSION }}"
|
|
35
|
+
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: |
|
|
38
|
+
uv sync --group dev --group docs
|
|
39
|
+
|
|
40
|
+
- name: Test the library
|
|
41
|
+
run: |
|
|
42
|
+
uv run poe check-all
|
|
43
|
+
|
|
44
|
+
- name: Run docs
|
|
45
|
+
run: |
|
|
46
|
+
set -euo pipefail
|
|
47
|
+
uv run poe build-docs
|
|
48
|
+
|
|
49
|
+
- name: Upload code coverage
|
|
50
|
+
uses: codecov/codecov-action@v4
|
|
51
|
+
with:
|
|
52
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
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
|
+
pip-wheel-metadata/
|
|
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
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
|
|
123
|
+
# mypy
|
|
124
|
+
.mypy_cache/
|
|
125
|
+
.dmypy.json
|
|
126
|
+
dmypy.json
|
|
127
|
+
|
|
128
|
+
# Pyre type checker
|
|
129
|
+
.pyre/
|
|
130
|
+
|
|
131
|
+
# Random things
|
|
132
|
+
.DS_Store
|
|
133
|
+
.idea/
|
|
134
|
+
|
|
135
|
+
# pixi
|
|
136
|
+
.pixi/
|
|
137
|
+
pixi.lock
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Contributing to snakesee
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to snakesee!
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- Python 3.11 or later
|
|
10
|
+
- [pixi](https://pixi.sh/) (recommended) or uv
|
|
11
|
+
|
|
12
|
+
### Setup with pixi
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Clone the repository
|
|
16
|
+
git clone https://github.com/nh13/snakesee.git
|
|
17
|
+
cd snakesee
|
|
18
|
+
|
|
19
|
+
# Install development environment
|
|
20
|
+
pixi run install-dev
|
|
21
|
+
|
|
22
|
+
# Run all checks (lint, type check, tests)
|
|
23
|
+
pixi run check
|
|
24
|
+
|
|
25
|
+
# Run tests only
|
|
26
|
+
pixi run test
|
|
27
|
+
|
|
28
|
+
# Auto-fix linting issues
|
|
29
|
+
pixi run fix
|
|
30
|
+
|
|
31
|
+
# Build documentation
|
|
32
|
+
pixi run docs
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Setup with uv
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Clone the repository
|
|
39
|
+
git clone https://github.com/nh13/snakesee.git
|
|
40
|
+
cd snakesee
|
|
41
|
+
|
|
42
|
+
# Create virtual environment and install
|
|
43
|
+
uv sync --group dev --group docs
|
|
44
|
+
uv pip install -e '.[logo]'
|
|
45
|
+
|
|
46
|
+
# Run checks
|
|
47
|
+
uv run poe check-all
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Code Style
|
|
51
|
+
|
|
52
|
+
This project uses:
|
|
53
|
+
|
|
54
|
+
- **ruff** for linting and formatting
|
|
55
|
+
- **mypy** for type checking
|
|
56
|
+
- **pytest** for testing
|
|
57
|
+
|
|
58
|
+
All code should:
|
|
59
|
+
|
|
60
|
+
- Pass `ruff format` (formatting)
|
|
61
|
+
- Pass `ruff check` (linting)
|
|
62
|
+
- Pass `mypy` (type checking)
|
|
63
|
+
- Have tests with >65% coverage
|
|
64
|
+
|
|
65
|
+
## Running Checks
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Run all checks
|
|
69
|
+
pixi run check
|
|
70
|
+
# or
|
|
71
|
+
uv run poe check-all
|
|
72
|
+
|
|
73
|
+
# Auto-fix linting issues
|
|
74
|
+
pixi run fix
|
|
75
|
+
# or
|
|
76
|
+
uv run poe fix-all
|
|
77
|
+
|
|
78
|
+
# Run just tests
|
|
79
|
+
pixi run test
|
|
80
|
+
# or
|
|
81
|
+
uv run pytest
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Pull Request Process
|
|
85
|
+
|
|
86
|
+
1. Fork the repository and create a feature branch
|
|
87
|
+
2. Make your changes
|
|
88
|
+
3. Ensure all checks pass: `pixi run check`
|
|
89
|
+
4. Update documentation if needed
|
|
90
|
+
5. Submit a pull request
|
|
91
|
+
|
|
92
|
+
## Release Process
|
|
93
|
+
|
|
94
|
+
Releases are automated via GitHub Actions when a SemVer tag is pushed:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Ensure everything is committed and pushed
|
|
98
|
+
git push origin main
|
|
99
|
+
|
|
100
|
+
# Create and push a tag
|
|
101
|
+
git tag 0.2.0
|
|
102
|
+
git push origin 0.2.0
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The CI will automatically:
|
|
106
|
+
1. Run all tests
|
|
107
|
+
2. Build the source distribution
|
|
108
|
+
3. Publish to PyPI
|
|
109
|
+
4. Generate changelog with git-cliff
|
|
110
|
+
5. Create a GitHub release
|
|
111
|
+
|
|
112
|
+
## Commit Messages
|
|
113
|
+
|
|
114
|
+
We use [Conventional Commits](https://www.conventionalcommits.org/) for generating changelogs:
|
|
115
|
+
|
|
116
|
+
- `feat:` New features
|
|
117
|
+
- `fix:` Bug fixes
|
|
118
|
+
- `docs:` Documentation changes
|
|
119
|
+
- `test:` Test changes
|
|
120
|
+
- `refactor:` Code refactoring
|
|
121
|
+
- `style:` Code style changes
|
|
122
|
+
- `chore:` Maintenance tasks
|
|
123
|
+
|
|
124
|
+
Examples:
|
|
125
|
+
```
|
|
126
|
+
feat: add support for filtering by rule name
|
|
127
|
+
fix: handle missing log files gracefully
|
|
128
|
+
docs: update keyboard shortcuts table
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Logger Plugin Development
|
|
132
|
+
|
|
133
|
+
The repository includes an optional Snakemake logger plugin in `snakemake-logger-plugin-snakesee/`.
|
|
134
|
+
|
|
135
|
+
### Plugin Setup
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Install the plugin in development mode
|
|
139
|
+
cd snakemake-logger-plugin-snakesee
|
|
140
|
+
pip install -e .
|
|
141
|
+
|
|
142
|
+
# Run plugin tests
|
|
143
|
+
pytest tests/
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Plugin Structure
|
|
147
|
+
|
|
148
|
+
- `src/snakemake_logger_plugin_snakesee/handler.py` - Main LogHandler implementation
|
|
149
|
+
- `src/snakemake_logger_plugin_snakesee/events.py` - Event types and serialization
|
|
150
|
+
- `src/snakemake_logger_plugin_snakesee/writer.py` - JSONL event file writer
|
|
151
|
+
|
|
152
|
+
The plugin writes events to `.snakesee_events.jsonl` which snakesee reads via `snakesee/events.py`.
|
|
153
|
+
|
|
154
|
+
## Questions?
|
|
155
|
+
|
|
156
|
+
Open an issue at https://github.com/nh13/snakesee/issues
|
snakesee-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 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.
|