rammappy 0.1.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.
@@ -0,0 +1,31 @@
1
+ name: Build Wheels
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+
9
+ jobs:
10
+ build_wheels:
11
+ name: Build wheels on ${{ matrix.os }}
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ matrix:
15
+ os: [ubuntu-latest, windows-latest, macos-latest]
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v3
20
+ with:
21
+ enable-cache: true
22
+ - name: Install Rust
23
+ uses: actions-rust-lang/setup-rust-toolchain@v1
24
+ - name: Install just
25
+ uses: extractions/setup-just@v2
26
+ - name: Build wheels
27
+ run: just build-wheels
28
+ - uses: actions/upload-artifact@v4
29
+ with:
30
+ name: wheels-${{ matrix.os }}
31
+ path: target/wheels/*.whl
@@ -0,0 +1,59 @@
1
+ name: Deploy docs to GitHub Pages
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ concurrency:
14
+ group: "pages"
15
+ cancel-in-progress: false
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v4
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v5
26
+ with:
27
+ enable-cache: true
28
+ cache-dependency-glob: "pyproject.toml"
29
+
30
+ - name: Set up Rust
31
+ uses: dtolnay/rust-toolchain@stable
32
+
33
+ - name: Install just
34
+ uses: extractions/setup-just@v2
35
+
36
+ - name: Install package and dependencies
37
+ run: just install
38
+
39
+ - name: Build docs
40
+ run: just docs-build
41
+
42
+ - name: Setup Pages
43
+ uses: actions/configure-pages@v4
44
+
45
+ - name: Upload artifact
46
+ uses: actions/upload-pages-artifact@v3
47
+ with:
48
+ path: 'site'
49
+
50
+ deploy:
51
+ environment:
52
+ name: github-pages
53
+ url: ${{ steps.deployment.outputs.page_url }}
54
+ runs-on: ubuntu-latest
55
+ needs: build
56
+ steps:
57
+ - name: Deploy to GitHub Pages
58
+ id: deployment
59
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,57 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ build_wheels:
10
+ name: Build wheels on ${{ matrix.os }}
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ matrix:
14
+ os: [ubuntu-latest, windows-latest, macos-latest]
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v3
19
+ with:
20
+ enable-cache: true
21
+ - name: Install Rust
22
+ uses: actions-rust-lang/setup-rust-toolchain@v1
23
+ with:
24
+ components: rustfmt, clippy, rust-src
25
+ - name: Install just
26
+ uses: extractions/setup-just@v2
27
+ - name: Set Version from Tag
28
+ run: just set-version ${{ github.ref_name }}
29
+ - name: Build wheels
30
+ run: just build-wheels
31
+ - name: Build sdist
32
+ if: matrix.os == 'ubuntu-latest'
33
+ run: uvx maturin sdist -o target/wheels
34
+ - uses: actions/upload-artifact@v4
35
+ with:
36
+ name: wheels-${{ matrix.os }}
37
+ path: target/wheels/*
38
+
39
+ publish:
40
+ name: Publish to PyPI
41
+ needs: [build_wheels]
42
+ runs-on: ubuntu-latest
43
+ environment:
44
+ name: pypi
45
+ url: https://pypi.org/p/rammappy
46
+ permissions:
47
+ id-token: write
48
+ steps:
49
+ - uses: actions/download-artifact@v4
50
+ with:
51
+ pattern: wheels-*
52
+ path: dist
53
+ merge-multiple: true
54
+ - name: Remove unsupported linux wheels
55
+ run: find dist -name "*-linux_*.whl" -delete
56
+ - name: Publish to PyPI
57
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,28 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+
9
+ jobs:
10
+ test:
11
+ name: Run tests and linters
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Install uv
16
+ uses: astral-sh/setup-uv@v3
17
+ with:
18
+ enable-cache: true
19
+ - name: Install Rust
20
+ uses: actions-rust-lang/setup-rust-toolchain@v1
21
+ with:
22
+ components: rustfmt, clippy, rust-src
23
+ - name: Install just
24
+ uses: extractions/setup-just@v2
25
+ - name: Install project
26
+ run: just install
27
+ - name: Run CI
28
+ run: just ci
@@ -0,0 +1,245 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ debug
4
+ target
5
+
6
+ # These are backup files generated by rustfmt
7
+ **/*.rs.bk
8
+
9
+ # MSVC Windows builds of rustc generate these, which store debugging information
10
+ *.pdb
11
+
12
+ # Generated by cargo mutants
13
+ # Contains mutation testing data
14
+ **/mutants.out*/
15
+
16
+ # RustRover
17
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
18
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
19
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
20
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
21
+ #.idea/
22
+ # Byte-compiled / optimized / DLL files
23
+ __pycache__/
24
+ *.py[codz]
25
+ *$py.class
26
+
27
+ # C extensions
28
+ *.so
29
+
30
+ # Distribution / packaging
31
+ .Python
32
+ build/
33
+ develop-eggs/
34
+ dist/
35
+ downloads/
36
+ eggs/
37
+ .eggs/
38
+ lib/
39
+ lib64/
40
+ parts/
41
+ sdist/
42
+ var/
43
+ wheels/
44
+ share/python-wheels/
45
+ *.egg-info/
46
+ .installed.cfg
47
+ *.egg
48
+ MANIFEST
49
+
50
+ # PyInstaller
51
+ # Usually these files are written by a python script from a template
52
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
53
+ *.manifest
54
+ *.spec
55
+
56
+ # Installer logs
57
+ pip-log.txt
58
+ pip-delete-this-directory.txt
59
+
60
+ # Unit test / coverage reports
61
+ htmlcov/
62
+ .tox/
63
+ .nox/
64
+ .coverage
65
+ .coverage.*
66
+ .cache
67
+ nosetests.xml
68
+ coverage.xml
69
+ *.cover
70
+ *.py.cover
71
+ .hypothesis/
72
+ .pytest_cache/
73
+ cover/
74
+
75
+ # Translations
76
+ *.mo
77
+ *.pot
78
+
79
+ # Django stuff:
80
+ *.log
81
+ local_settings.py
82
+ db.sqlite3
83
+ db.sqlite3-journal
84
+
85
+ # Flask stuff:
86
+ instance/
87
+ .webassets-cache
88
+
89
+ # Scrapy stuff:
90
+ .scrapy
91
+
92
+ # Sphinx documentation
93
+ docs/_build/
94
+
95
+ # PyBuilder
96
+ .pybuilder/
97
+ target/
98
+
99
+ # Jupyter Notebook
100
+ .ipynb_checkpoints
101
+
102
+ # IPython
103
+ profile_default/
104
+ ipython_config.py
105
+
106
+ # pyenv
107
+ # For a library or package, you might want to ignore these files since the code is
108
+ # intended to run in multiple environments; otherwise, check them in:
109
+ # .python-version
110
+
111
+ # pipenv
112
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
113
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
114
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
115
+ # install all needed dependencies.
116
+ # Pipfile.lock
117
+
118
+ # UV
119
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
120
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
121
+ # commonly ignored for libraries.
122
+ # uv.lock
123
+
124
+ # poetry
125
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
126
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
127
+ # commonly ignored for libraries.
128
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
129
+ # poetry.lock
130
+ # poetry.toml
131
+
132
+ # pdm
133
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
134
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
135
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
136
+ # pdm.lock
137
+ # pdm.toml
138
+ .pdm-python
139
+ .pdm-build/
140
+
141
+ # pixi
142
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
143
+ # pixi.lock
144
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
145
+ # in the .venv directory. It is recommended not to include this directory in version control.
146
+ .pixi
147
+
148
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
149
+ __pypackages__/
150
+
151
+ # Celery stuff
152
+ celerybeat-schedule
153
+ celerybeat.pid
154
+
155
+ # Redis
156
+ *.rdb
157
+ *.aof
158
+ *.pid
159
+
160
+ # RabbitMQ
161
+ mnesia/
162
+ rabbitmq/
163
+ rabbitmq-data/
164
+
165
+ # ActiveMQ
166
+ activemq-data/
167
+
168
+ # SageMath parsed files
169
+ *.sage.py
170
+
171
+ # Environments
172
+ .env
173
+ .envrc
174
+ .venv
175
+ env/
176
+ venv/
177
+ ENV/
178
+ env.bak/
179
+ venv.bak/
180
+
181
+ # Spyder project settings
182
+ .spyderproject
183
+ .spyproject
184
+
185
+ # Rope project settings
186
+ .ropeproject
187
+
188
+ # mkdocs documentation
189
+ /site
190
+
191
+ # mypy
192
+ .mypy_cache/
193
+ .dmypy.json
194
+ dmypy.json
195
+
196
+ # Pyre type checker
197
+ .pyre/
198
+
199
+ # pytype static type analyzer
200
+ .pytype/
201
+
202
+ # Cython debug symbols
203
+ cython_debug/
204
+
205
+ # PyCharm
206
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
207
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
208
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
209
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
210
+ # .idea/
211
+
212
+ # Abstra
213
+ # Abstra is an AI-powered process automation framework.
214
+ # Ignore directories containing user credentials, local state, and settings.
215
+ # Learn more at https://abstra.io/docs
216
+ .abstra/
217
+
218
+ # Visual Studio Code
219
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
220
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
221
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
222
+ # you could uncomment the following to ignore the entire vscode folder
223
+ # .vscode/
224
+ # Temporary file for partial code execution
225
+ tempCodeRunnerFile.py
226
+
227
+ # Ruff stuff:
228
+ .ruff_cache/
229
+
230
+ # PyPI configuration file
231
+ .pypirc
232
+
233
+ # Marimo
234
+ marimo/_static/
235
+ marimo/_lsp/
236
+ __marimo__/
237
+
238
+ # Streamlit
239
+ .streamlit/secrets.toml
240
+
241
+
242
+ rammap-core/
243
+ .cargo/
244
+ docs/index.md
245
+ docs/contributing.md
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ tomdstanton@gmail.com.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
@@ -0,0 +1,117 @@
1
+ # Contributing to `rammappy`
2
+
3
+ First off, thank you for considering contributing to `rammappy`! It's people like you that make open-source bioinformatics
4
+ tools better for the entire community.
5
+
6
+ Whether you are fixing a bug, improving alignment performance, adding a new feature, or simply correcting
7
+ a typo in the documentation, your help is welcome.
8
+
9
+ ## Table of Contents
10
+ 1. [Where to Start](#where-to-start)
11
+ 2. [Reporting Bugs & Requesting Features](#reporting-bugs-requesting-features)
12
+ 3. [Local Development Setup](#local-development-setup)
13
+ 4. [Testing and Benchmarks](#testing-and-benchmarks)
14
+ 5. [Building the Documentation](#building-the-documentation)
15
+ 6. [Submitting a Pull Request](#submitting-a-pull-request)
16
+
17
+ ***
18
+
19
+ ## Where to Start
20
+
21
+ If you are looking for a way to contribute, check out our [GitHub Issues](https://github.com/tomdstanton/rammappy/issues).
22
+ Look for issues tagged with `good first issue` or `help wanted`.
23
+
24
+ If you plan to work on a major feature or a significant architectural change to the Rust bindings, please open an issue
25
+ first to discuss it with the maintainers so we can ensure it aligns with the project's roadmap.
26
+
27
+ ## Reporting Bugs & Requesting Features
28
+
29
+ We use GitHub Issues to track bugs and feature requests.
30
+
31
+ * **Bugs:** Please provide a clear description of the issue, the expected behavior, and ideally, a minimal reproducible
32
+ example (including a small sample FASTA file if applicable).
33
+
34
+ * **Features:** Explain the feature, why it would be useful for sequence mapping workflows, and how it should work.
35
+
36
+ ## Local Development Setup
37
+
38
+ `rammappy` is a hybrid project relying on Python and a Rust backend via PyO3. We use `uv` as our blazing-fast package and
39
+ project manager.
40
+
41
+ ### Prerequisites
42
+
43
+ 1. Install [Rust](https://www.rust-lang.org/tools/install) (`cargo`).
44
+ 2. Install [uv](https://docs.astral.sh/uv/getting-started/installation/).
45
+
46
+ ### Getting Started
47
+
48
+ 1. Fork the repository on GitHub and clone your fork locally:
49
+
50
+ ```console
51
+ git clone https://github.com/tomdstanton/rammappy.git
52
+ cd rammappy
53
+ ```
54
+
55
+ Create a new branch for your feature or bugfix:
56
+
57
+ ```console
58
+ git checkout -b feature/my-new-feature
59
+ ```
60
+
61
+ Use our `just` task runner to install the project in editable mode, compile the Rust extensions, build Python stubs, and set up your virtual environment:
62
+
63
+ ```console
64
+ just install
65
+ ```
66
+
67
+ (Note: Whenever you make changes to the `.rs` files in the `src/` directory, you will need to re-run the `just install`
68
+ command to recompile the PyO3 bindings and regenerate the stubs).
69
+
70
+ ## Testing and Benchmarks
71
+
72
+ We use pytest for our test suite. It is crucial that any new features are covered by unit tests and do not break the
73
+ existing alignment logic.
74
+
75
+ To run the standard test suite, use the `just` task runner:
76
+
77
+ ```console
78
+ just test
79
+ ```
80
+
81
+ ## Building the Documentation
82
+
83
+ Our documentation is built using Zensical. The site is automatically deployed via GitHub Actions, but you should
84
+ preview your changes locally before submitting a PR.
85
+
86
+ Make your changes to the `README.md` or `CONTRIBUTING.md` files in the root directory (they will be copied to `docs/` automatically during the build), or update the Python docstrings.
87
+
88
+ Start the local live-reloading server:
89
+
90
+ ```console
91
+ just docs
92
+ ```
93
+
94
+ Open http://localhost:8000 in your browser.
95
+
96
+ (Note: Do not commit the `site/`, `docs/index.md`, or `docs/contributing.md` files to version control as they are generated dynamically).
97
+
98
+ ## Submitting a Pull Request
99
+ When you are ready to share your code:
100
+
101
+ Ensure your code is formatted correctly and passes all tests.
102
+
103
+ Push your branch to your GitHub fork:
104
+
105
+ ```console
106
+ git push origin feature/my-new-feature
107
+ ```
108
+
109
+ Open a Pull Request against the main branch of the upstream rammappy repository.
110
+
111
+ Fill out the provided PR template, describing your changes and linking to any relevant issues.
112
+
113
+ A maintainer will review your code. We may request some changes, but don't worry—we are here to help!
114
+
115
+ ***
116
+
117
+ **Thank you for helping make `rammappy` faster and more robust you superstar you!** ✨