-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use pyproject.toml * dev env yml * bump version * placeholder test * Init actions * use scm versioning * ruff format * remove rU and remove .ix * Add blast * Style fixes by Ruff --------- Co-authored-by: Adamtaranto <[email protected]>
- Loading branch information
1 parent
b00ee59
commit 051c537
Showing
23 changed files
with
1,943 additions
and
1,364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Check out the code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install Hatch | ||
run: pip install hatch | ||
|
||
- name: Build the package with Hatch | ||
run: hatch build | ||
|
||
- name: Publish to PyPI | ||
env: | ||
HATCH_INDEX_USER: __token__ | ||
HATCH_INDEX_AUTH: ${{ secrets.TIRMITE_PYPI_TOKEN }} | ||
run: hatch publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
name: Python Tests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] # Test with Python 3.8 to the latest available version | ||
|
||
steps: | ||
# Checkout the latest commit associated with the PR | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Debug matrix value | ||
run: echo "Python version is ${{ matrix.python-version }}" | ||
|
||
# Set up Python based on the matrix version | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Install dependencies, including test dependencies from pyproject.toml | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install '.[tests]' # Install all dependencies, including test-specific ones | ||
# Run pytest on the specified directory | ||
- name: Run tests | ||
run: pytest tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Ruff Formatting | ||
on: [pull_request] | ||
jobs: | ||
ruff: | ||
if: ${{ github.actor != 'dependabot[bot]' }} # Do not run on commits created by dependabot | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Give the default GITHUB_TOKEN write permission to commit and push the changed files. | ||
contents: write # Allows reading and writing repository contents (e.g., commits) | ||
pull-requests: write # Allows reading and writing pull requests | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.sha }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: chartboost/ruff-action@v1 | ||
with: | ||
src: './src/tirmite' | ||
args: 'format --target-version py310' | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
id: auto-commit-action | ||
with: | ||
commit_message: 'Style fixes by Ruff' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: tirmite | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- python 3.12 | ||
- "pymummer>=0.10.3" | ||
- hmmer | ||
- blast | ||
- pip | ||
- pip: | ||
- "biopython>=1.70" | ||
- "pandas>=0.20.3" | ||
- hatch | ||
- pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[build-system] | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "tirmite" | ||
description = "Map TIR-pHMM models to genomic sequences for annotation of MITES and complete DNA-Transposons." | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = { text = "MIT" } | ||
authors = [ | ||
{ name = "Adam Taranto", email = "[email protected]" } | ||
] | ||
|
||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering :: Bio-Informatics", | ||
"License :: OSI Approved :: MIT License", | ||
] | ||
|
||
dependencies = ["pandas>=0.20.3", 'biopython>=1.70', "pymummer>=0.10.3",] | ||
|
||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
homepage = "https://github.com/adamtaranto/TIRmite" | ||
documentation = "https://github.com/adamtaranto/TIRmite" | ||
repository = "https://github.com/adamtaranto/TIRmite" | ||
|
||
[project.scripts] | ||
tirmite="tirmite.cmd_tirmite:main" | ||
tsplit-LTR="tirmite.cmd_LTR:main" | ||
tsplit-TIR="tirmite.cmd_TIR:main" | ||
|
||
[tool.hatch.build] | ||
source = "src" | ||
|
||
exclude = [ | ||
"environment.yml", | ||
".github", | ||
".vscode", | ||
] | ||
|
||
[tool.hatch.version] | ||
source = "vcs" | ||
|
||
[tool.hatch.version.vcs] | ||
tag-pattern = "v*" # Git tags starting with 'v' will be used for versioning | ||
fallback-version = "0.0.0" | ||
|
||
[tool.hatch.build.hooks.vcs] | ||
version-file = "src/tirmite/_version.py" | ||
|
||
[project.optional-dependencies] | ||
tests = ["pytest"] |
Oops, something went wrong.