-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from EBI-Metagenomics/feature/bioconda_package
Prepared repo for publication as bioconda package
- Loading branch information
Showing
6 changed files
with
137 additions
and
32 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,51 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
name: Build distribution 📦 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- name: Install pypa/build | ||
run: >- | ||
python3 -m | ||
pip install | ||
build | ||
--user | ||
- name: Build a binary wheel and a source tarball | ||
run: python3 -m build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
publish-to-pypi: | ||
name: >- | ||
Publish Python 🐍 distribution 📦 to PyPI | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/project/genomeuploader | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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,75 @@ | ||
name: Run pytest | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
pytest_38: | ||
name: Run pytest 3.8 | ||
runs-on: ubuntu-latest | ||
environment: pypi | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
- name: Install dependencies | ||
run: pip install .[test] | ||
- uses: pavelzw/pytest-action@v2 | ||
env: | ||
ENA_WEBIN: ${{ secrets.ENA_WEBIN }} | ||
ENA_WEBIN_PASSWORD: ${{ secrets.ENA_WEBIN_PASSWORD }} | ||
with: | ||
emoji: false | ||
verbose: true | ||
job-summary: true | ||
|
||
pytest_39: | ||
name: Run pytest 3.9 | ||
needs: | ||
- pytest_38 | ||
runs-on: ubuntu-latest | ||
environment: pypi | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- name: Install dependencies | ||
run: pip install .[test] | ||
- uses: pavelzw/pytest-action@v2 | ||
env: | ||
ENA_WEBIN: ${{ secrets.ENA_WEBIN }} | ||
ENA_WEBIN_PASSWORD: ${{ secrets.ENA_WEBIN_PASSWORD }} | ||
with: | ||
emoji: false | ||
verbose: true | ||
job-summary: true | ||
|
||
pytest_310: | ||
name: Run pytest 3.10 | ||
needs: | ||
- pytest_39 | ||
runs-on: ubuntu-latest | ||
environment: pypi | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: pip install .[test] | ||
- uses: pavelzw/pytest-action@v2 | ||
env: | ||
ENA_WEBIN: ${{ secrets.ENA_WEBIN }} | ||
ENA_WEBIN_PASSWORD: ${{ secrets.ENA_WEBIN_PASSWORD }} | ||
with: | ||
emoji: false | ||
verbose: true | ||
job-summary: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "2.0.0" | ||
__version__ = '2.1.0' |
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[project] | ||
name = "genomeuploader" | ||
name = "genome_uploader" | ||
version = "2.1.0" | ||
readme = "README.md" | ||
authors = [ | ||
{name = "MGnify team", email = "[email protected]"}, | ||
] | ||
license = {text = "Apache Software License 2.0"} | ||
keywords = ["bioinformatics", "tool", "metagenomics"] | ||
dynamic = ["version"] | ||
description = "Python script to upload bins and MAGs in fasta format to ENA (European Nucleotide Archive). This script generates xmls and manifests necessary for submission with webin-cli." | ||
requires-python = ">=3.8" | ||
classifiers = [ | ||
|
@@ -26,6 +26,10 @@ dependencies = [ | |
"python-dotenv==1.0.1" | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/EBI-Metagenomics/genome_uploader" | ||
Issues = "https://github.com/EBI-Metagenomics/genome_uploader/issues" | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
addopts = "-ra -q" | ||
|
@@ -43,7 +47,9 @@ dev = [ | |
"bump-my-version==0.9.2", | ||
] | ||
test = [ | ||
"pytest==7.1.2", | ||
"pytest==7.4.0", | ||
"pytest-md==0.2.0", | ||
"pytest-workflow==2.0.1", | ||
"pytest-cov==3.0.0", | ||
] | ||
|
||
|
@@ -54,9 +60,6 @@ build-backend = "setuptools.build_meta" | |
[tool.setuptools] | ||
packages = ["genomeuploader"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "genomeuploader.__version__"} | ||
|
||
[project.scripts] | ||
genome_upload = "genomeuploader.genome_upload:main" | ||
|
||
|
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[pytest] | ||
python_files = tests/*.py | ||
pythonpath = . | ||
testpaths = tests |