Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
118 lines (108 loc) · 3.66 KB
/
Copy pathsetup.py
File metadata and controls
118 lines (108 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/usr/bin/env python
"""The setup script."""
import re
from pathlib import Path
from setuptools import find_packages, setup
with open("README.rst") as readme_file:
readme = readme_file.read()
# Single source of truth for the version: RiboMetric/__init__.py
_init = Path(__file__).parent / "RiboMetric" / "__init__.py"
version = re.search(r'^__version__\s*=\s*["\']([^"\']+)["\']', _init.read_text(), re.M).group(1)
# Core dependencies needed to run RiboMetric
requirements = [
"biopython>=1.81",
"gffpandas>=1.2.0",
"Jinja2>=3.0",
# Prefer newer Kaleido (>=1.0.0) to avoid deprecations and get wheels
"kaleido>=1.0.0", # Required for plotly image export
# numpy<2 / pandas<2.3: upper caps reflect the tested-compatible range with
# oxbow/pyarrow. Revisit once validated against numpy 2.x.
"numpy>=1.24,<2",
"oxbow>=0.3.0",
"pandas>=2.0,<2.3",
"plotly>=5.14",
"pyarrow>=10.0.0",
"pysam>=0.21.0",
"PyYAML>=6.0",
"rich>=13.3.3", # Required by textual
"scipy>=1.10",
"textual>=0.47.0",
]
# Optional PDF export dependencies
pdf_requirements = [
"xhtml2pdf>=0.2.11",
]
# Test dependencies
test_requirements = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-mock>=3.10.0",
"pytest-xdist>=3.0.0",
"coverage>=7.0.0",
]
# Development dependencies (linting, formatting, docs)
# ruff replaces flake8 *and* isort (REPO_CONTRACT §4b); do not add either back.
dev_requirements = test_requirements + [
"ruff>=0.6",
"black>=24.0",
"sphinx>=5.0.0",
"myst-parser>=2.0", # Markdown docs in the Sphinx toctree
"mypy>=1.0.0",
"types-PyYAML>=6.0.12",
"build>=1.2",
"twine>=5.0",
"bump2version>=1.0",
]
setup(
author="Jack Tierney",
author_email="jackcurragh@gmail.com",
# Align supported versions with CI and container images
python_requires=">=3.10,<3.13",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
description="A python command-line utility for the generation of comprehensive reports on the quality of ribosome profiling (Ribo-Seq) datasets",
entry_points={
"console_scripts": [
"RiboMetric=RiboMetric.cli:main",
"ribometric=RiboMetric.cli:main",
],
},
install_requires=requirements,
extras_require={
"pdf": pdf_requirements,
"test": test_requirements,
"dev": dev_requirements,
},
license="MIT license",
long_description=readme,
long_description_content_type="text/x-rst",
include_package_data=True,
keywords="RiboMetric",
# Lowercase deliberately (REPO_CONTRACT §5.3). PyPI rejects a wheel whose
# filename is not the normalised project name, with a 400 at upload that
# `twine check` does not catch -- three TranslonScorer releases died on
# exactly this. Declaring the name lowercase makes the built filenames
# `ribometric-*` regardless of the setuptools version; the CI build job
# asserts it as well. The import package stays `RiboMetric`, and both
# console scripts are unchanged.
name="ribometric",
packages=find_packages(
include=["RiboMetric", "RiboMetric.*"],
exclude=[
"sample_data/*",
],
),
test_suite="tests",
tests_require=test_requirements,
url="https://github.com/JackCurragh/RiboMetric",
version=version,
zip_safe=False,
)