-
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.
Merge pull request #6 from ebi-jdispatcher/dev
Dev
- Loading branch information
Showing
21 changed files
with
1,284 additions
and
344 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,14 @@ | ||
name: Publishing to PyPI | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} |
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,58 @@ | ||
name: Python package | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
#---------------------------------------------- | ||
# check-out repo and set-up python | ||
#---------------------------------------------- | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Set up python | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
#---------------------------------------------- | ||
# ----- install & configure poetry ----- | ||
#---------------------------------------------- | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
virtualenvs-path: .venv | ||
installer-parallel: true | ||
#---------------------------------------------- | ||
# load cached venv if cache exists | ||
#---------------------------------------------- | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
#---------------------------------------------- | ||
# install your root project, if required | ||
#---------------------------------------------- | ||
- name: Install project | ||
run: poetry install --no-interaction | ||
#---------------------------------------------- | ||
# run test suite | ||
#---------------------------------------------- | ||
- name: Test with pytest | ||
run: | | ||
source .venv/bin/activate | ||
pytest tests/test_*.py | ||
#---------------------------------------------- | ||
# packaging with poetry | ||
#---------------------------------------------- | ||
- name: Build packages with Poetry | ||
run: poetry build |
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 |
---|---|---|
|
@@ -128,4 +128,10 @@ dmypy.json | |
# Pyre type checker | ||
.pyre/ | ||
|
||
# IDE | ||
.vscode/* | ||
!.vscode/settings.json | ||
.idea | ||
.history | ||
|
||
testdata/tree* |
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,22 +1,28 @@ | ||
# Author: Fábio Madeira <[email protected]>, 2020 | ||
# test/run locally with | ||
# gitlab-runner exec docker test_pytest | ||
|
||
image: python:3.9 | ||
--- | ||
default: | ||
image: python:3.11 | ||
tags: | ||
- k8s-agent-runner | ||
|
||
before_script: | ||
- pip install --no-cache-dir -r requirements.txt | ||
- pip install poetry | ||
|
||
stages: | ||
# Unit tests | ||
- test_pytest | ||
# Install Module | ||
- setup_install | ||
- poetry_install | ||
- poetry_build | ||
|
||
test_pytest: | ||
stage: test_pytest | ||
script: pytest | ||
|
||
setup_install: | ||
stage: setup_install | ||
script: python setup.py install | ||
poetry_install: | ||
stage: poetry_install | ||
script: poetry install --no-interaction --no-root | ||
|
||
poetry_build: | ||
stage: poetry_build | ||
script: poetry build |
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 @@ | ||
{ | ||
"python.testing.pytestArgs": [ | ||
"tests" | ||
], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.formatOnType": true, | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports.ruff": "explicit" | ||
} | ||
}, | ||
} |
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
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[tool.poetry] | ||
name = "taxonomy-resolver" | ||
version = "0.2.1" | ||
description = "Taxonomy Resolver builds NCBI Taxonomy Trees and lists of Taxonomy Identifiers (TaxIDs) based on the NCBI Taxonomy Database" | ||
authors = ["Fábio Madeira <[email protected]>"] | ||
readme = "README.rst" | ||
include = ["CHANGELOG.rst"] | ||
license = "Apache-2.0" | ||
packages = [{include = "taxonresolver"}] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Natural Language :: English", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Topic :: Internet", | ||
"Topic :: Scientific/Engineering :: Bio-Informatics", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"License :: OSI Approved :: Apache Software License", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
click = ">=8.1.7" | ||
requests = ">=2.32.2" | ||
pytest = ">=8.2.1" | ||
pandas = ">=2.2.2" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
click | ||
requests | ||
pytest | ||
pandas | ||
click>=8.1.7 | ||
requests>=2.32.2 | ||
pytest>=8.2.1 | ||
pandas>=2.2.2 |
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 |
---|---|---|
|
@@ -4,13 +4,13 @@ | |
""" | ||
Taxonomy Resolver | ||
:copyright: (c) 2020-2021. | ||
:copyright: (c) 2020-2024. | ||
:license: Apache 2.0, see LICENSE for more details. | ||
""" | ||
|
||
__author__ = 'Fábio Madeira' | ||
__email__ = '[email protected]' | ||
__version__ = '0.2.1' | ||
__contributors__ = [u'Fábio Madeira', u'Adrian Tivey'] | ||
__author__ = "Fábio Madeira" | ||
__email__ = "[email protected]" | ||
__version__ = "0.2.1" | ||
__contributors__ = ["Fábio Madeira"] | ||
|
||
from taxonresolver.tree import TaxonResolver |
Oops, something went wrong.