Skip to content

Commit

Permalink
Merge pull request #109 from zargham-ahmad/issue105
Browse files Browse the repository at this point in the history
updated to poetry
  • Loading branch information
hechth authored Dec 4, 2023
2 parents 4e6ac04 + 20b2ad2 commit 4492dfe
Show file tree
Hide file tree
Showing 13 changed files with 68 additions and 278 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/anaconda.yml

This file was deleted.

22 changes: 6 additions & 16 deletions .github/workflows/publish_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,11 @@ on:
workflow_dispatch:

jobs:
publish:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v3
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
37 changes: 0 additions & 37 deletions .github/workflows/python-package-conda.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: [3.7, 3.8, 3.9]
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
Expand All @@ -25,8 +25,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
pip install --user -r requirements.txt
python -m pip install flake8 pytest poetry
poetry install --no-root
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -35,4 +35,4 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with coverage
run: |
pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml
poetry run pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Hecht et al., (2022). RIAssigner: A package for gas chromatographic retention in
```
git clone https://github.com/RECETOX/RIAssigner.git
cd RIAssigner
python -m pip install -e .
poetry install
```
(2) Install via [bioconda](https://anaconda.org/bioconda/riassigner) in your existing evironment.
```
Expand Down Expand Up @@ -115,3 +115,10 @@ classDiagram

### Testing
All functionality is tested with the [pytest](https://docs.pytest.org/en/6.2.x/contents.html) framework. Make sure to run your IDE in the `riassigner-dev` conda environment (or make sure to use the respective python interpreter when developing) to follow formatting guidelines and to be able to execute the tests.

For testing, install the package dependencies as follows:
```
git clone https://github.com/RECETOX/RIAssigner.git
cd RIAssigner
poetry install --no-root
```
8 changes: 0 additions & 8 deletions conda/environment-build.yml

This file was deleted.

22 changes: 0 additions & 22 deletions conda/environment-dev.yml

This file was deleted.

12 changes: 0 additions & 12 deletions conda/environment.yml

This file was deleted.

58 changes: 0 additions & 58 deletions conda/meta.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[virtualenvs]
create = false
prefer-active-python = true
47 changes: 47 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[tool.poetry]
name = "RIAssigner"
version = '0.3.3'
description = "Python library for retention index calculation."
authors = ["Helge Hecht <[email protected]>", "Maksym Skoryk <[email protected]>"]

license = "MIT License"
readme = "README.md"
repository = "https://github.com/RECETOX/RIAssigner"
keywords=[
"gas chromatography",
"mass spectrometry",
"retention index"
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8"
]

packages = [
{ include = "RIAssigner" },
]

[tool.poetry.dependencies]
python = "^3.8"
matchms = "^0.14.0, <0.18.0"
numpy = "*"
pandas = "*"
pint = "^0.17, <0.20"
scipy = "*"

[tool.poetry.group.dev.dependencies]
pytest = "*"
pytest-cov = "*"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry_bumpversion.file."RIAssigner/__version__.py"]
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

62 changes: 0 additions & 62 deletions setup.py

This file was deleted.

0 comments on commit 4492dfe

Please sign in to comment.