Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move from setuptools setup.py -> project.toml #58

Merged
merged 6 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install flake8 pytest
pip install poetry
poetry build
pip install dist/*.whl
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install flake8 pytest
pip install poetry
poetry build
pip install dist/*.whl
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
python -m pip install flake8 pytest
pip install poetry
poetry build
pip install dist/*.whl
- name: Build package
run: python -m build
- name: Publish package
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Install with setup.py:
```bash
$ git clone https://github.com/PRIDE-Archive/pridepy
$ cd pridepy
$ python setup.py sdist bdist_wheel
$ poetry build
$ pip install dist/pridepy-{version}.tar.gz
```

Expand Down
109 changes: 109 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
[tool.poetry]
name = "pridepy"
version = "0.0.7"
description = "Python Client library for PRIDE Rest API"
authors = [
"PRIDE Team <[email protected]>",
]
maintainers = [
"PRIDE Team <[email protected]>",
]
readme = "README.md"
license = "Apache-2.0"
keywords = [
"PRIDE",
"proteomics",
"mass-spectrometry",
"API",
"big data",
"bioinformatics",
"data science",
]
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Development Status :: 5 - Production/Stable"
]
packages = [
{ include = "pridepy" }
]
include = [
"LICENSE",
"README.md",
"**/*.txt",
"**/*.md",
"aspera/**/*"
]

[tool.poetry.dependencies]
python = "^3.7"
requests = "^2.31.0"
ratelimit = "^2.2.1"
click = "^8.1.7"
plotly = "^5.18.0"
tqdm = "^4.66.1"
boto3 = "^1.34.0"
botocore = "^1.34.0"
httpx = "^0.27.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
black = "^24.1.0"
isort = "^5.13.0"
pytest-cov = "^4.1.0"
mypy = "^1.8.0"

[tool.poetry.urls]
PyPI = "https://pypi.org/project/pridepy/"
PRIDE = "https://www.ebi.ac.uk/pride/archive/"
Documentation = "https://github.com/PRIDE-Archive/pridepy#readme"
Repository = "https://github.com/PRIDE-Archive/pridepy"
License = "https://github.com/PRIDE-Archive/pridepy/LICENSE"

[tool.poetry.scripts]
pridepy = "pridepy:main"

[tool.black]
line-length = 99
target-version = ["py39"]
include = '\.pyi?$'
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
^/tests/
'''

[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 99
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true

[tool.mypy]
python_version = "3.9"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true

[build-system]
requires = ["poetry-core>=1.2.0"]
build-backend = "poetry.core.masonry.api"
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ requirements:
host:
- python >=3.9
- pip
- setuptools
- poetry-core >=1.2.0
run:
- requests~=2.31.0
- ratelimit~=2.2.1
Expand Down
40 changes: 0 additions & 40 deletions setup.py

This file was deleted.

Loading