Skip to content

Commit 614df23

Browse files
committed
modernize packaging
1 parent 2e01c1b commit 614df23

File tree

8 files changed

+123
-111
lines changed

8 files changed

+123
-111
lines changed

.github/workflows/docs.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and release docs
1+
name: Build and deploy docs
22

33
on:
44
push:
@@ -25,6 +25,7 @@ jobs:
2525
pip install sphinx nbsphinx sphinx-book-theme sphinx-autoapi
2626
- name: Build docs
2727
run: |
28+
cp NEWS.md docs/source
2829
cd docs && make html
2930
- name: Deploy
3031
uses: peaceiris/actions-gh-pages@v3

.github/workflows/pythonpackage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Python package
4+
name: Test and deploy
55

66
on:
77
push:

MANIFEST.in

-4
This file was deleted.

NEWS.md

+11
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ This includes a list of major changes for each minor version starting from 0.19.
55
For information on how to use `micom` please read the docs at
66
https://micom-dev.github.io/micom.
77

8+
### 0.22.3
9+
10+
Fixed a bug where incorrectly labeled biomass demand reactions were treated like an
11+
exchange.
12+
13+
### 0.22.2
14+
15+
Lowered the required version for pandas to re-enable compatibility with Python 3.6.
16+
17+
Docs are now built on all pushes.
18+
819
### 0.22.1
920

1021
`atol` and `rtol` are now consistently exposed.

docs/source/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Contents
5353
Knockouts <taxa_knockouts>
5454
Intervention studies <elasticities>
5555
Writing your own workflows <workflows>
56+
Release Notes <NEWS>
5657

5758

5859
Indices and tables

pyproject.toml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[build-system]
2+
requires = [
3+
'setuptools>=40.6.0',
4+
'wheel'
5+
]
6+
build-backend = "setuptools.build_meta"
7+
8+
[tool.black]
9+
line-length = 88
10+
target-version = ['py38']
11+
include = '\.pyi?$'
12+
exclude = '''
13+
14+
(
15+
/(
16+
\.eggs # exclude a few common directories in the
17+
| \.git # root of the project
18+
| \.hg
19+
| \.mypy_cache
20+
| \.tox
21+
| \.venv
22+
| _build
23+
| buck-out
24+
| build
25+
| dist
26+
)/
27+
)
28+
'''

setup.cfg

+75-18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,60 @@
1+
[metadata]
2+
name = micom
3+
description = Microbial community modeling based on cobrapy.
4+
long_description = file: README.rst
5+
long_description_content_type = text/x-rst
6+
url = https://github.com/micom-dev/micom
7+
author = Christian Diener
8+
author_email = mail@cdiener.com
9+
license = Apache License 2.0
10+
classifiers =
11+
Development Status :: 5 - Production/Stable
12+
Intended Audience :: Science/Research
13+
Topic :: Scientific/Engineering :: Bio-Informatics
14+
License :: OSI Approved :: Apache Software License
15+
Programming Language :: Python :: 3
16+
Programming Language :: Python :: 3.6
17+
Programming Language :: Python :: 3.7
18+
Programming Language :: Python :: 3.8
19+
Programming Language :: Python :: 3.9
20+
keywords =
21+
microbiome
22+
microbiota
23+
modeling
24+
metabolism
25+
community
26+
27+
[options]
28+
packages = find:
29+
zip_safe = True
30+
python_requires = >=3.6
31+
install_requires =
32+
cobra>=0.17.1
33+
depinfo>=1.7.0
34+
optlang>=1.4.7
35+
pandas>=1.0.0
36+
rich>=9.10.0
37+
jinja2>=2.10.0
38+
scikit-learn>=0.22.0
39+
scipy>=1.0.0
40+
symengine>=0.6.1
41+
tests_require =
42+
coverage
43+
pytest
44+
pytest-cov
45+
46+
[options.packages.find]
47+
exclude =
48+
docs
49+
tests
50+
51+
[option.package_data]
52+
micom =
53+
data/*.csv
54+
data/*.gz
55+
data/templates/*.*
56+
data/artifacts/*.*
57+
158
[bumpversion]
259
current_version = 0.22.3
360
commit = True
@@ -12,38 +69,38 @@ search = __version__ = "{current_version}"
1269
replace = __version__ = "{new_version}"
1370

1471
[tool:pytest]
15-
filterwarnings = ignore::DeprecationWarning
16-
ignore::FutureWarning
72+
filterwarnings =
73+
ignore::DeprecationWarning
74+
ignore::FutureWarning
1775

1876
[bdist_wheel]
1977
universal = 1
2078

2179
[coverage:run]
2280
source = micom
2381
branch = True
24-
omit = micom/_version.py
2582

2683
[coverage:report]
27-
exclude_lines =
28-
pragma: no cover
29-
30-
def __repr__
31-
if self\.debug
32-
33-
raise AssertionError
34-
raise NotImplementedError
35-
36-
if 0:
37-
if __name__ == .__main__.:
84+
exclude_lines =
85+
pragma: no cover
86+
87+
def __repr__
88+
if self\.debug
89+
90+
raise AssertionError
91+
raise NotImplementedError
92+
93+
if 0:
94+
if __name__ == .__main__.:
3895
ignore_errors = True
3996

4097
[flake8]
4198
exclude = tests/*, docs/*, versioneer.py, _version.py
4299
max-line-length = 88
43-
ignore =
44-
E203
45-
W503
46-
D202
100+
ignore =
101+
E203
102+
W503
103+
D202
47104

48105
[pydocstyle]
49106
convention = numpy

setup.py

+5-87
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,8 @@
1-
"""setup.py for micom."""
1+
"""setup.py for micom.
22
3-
from setuptools import setup, find_packages
3+
This is a shim left here for compatibility reasons.
4+
"""
45

5-
# To use a consistent encoding
6-
from codecs import open
7-
from os import path
6+
from setuptools import setup
87

9-
here = path.abspath(path.dirname(__file__))
10-
11-
# Get the long description from the README file
12-
with open(path.join(here, "README.rst"), encoding="utf-8") as f:
13-
long_description = f.read()
14-
15-
setup(
16-
name="micom",
17-
# Versions should comply with PEP440. For a discussion on single-sourcing
18-
# the version across setup.py and the project code, see
19-
# https://packaging.python.org/en/latest/single_source_version.html
20-
version="0.22.3",
21-
description="Microbial community modeling based on cobrapy.",
22-
long_description=long_description,
23-
# The project's main homepage.
24-
url="https://github.com/micom-dev/micom",
25-
# Author details
26-
author="Christian Diener",
27-
author_email="mail@cdiener.com",
28-
# Choose your license
29-
license="Apache License 2.0",
30-
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
31-
classifiers=[
32-
# How mature is this project? Common values are
33-
# 3 - Alpha
34-
# 4 - Beta
35-
# 5 - Production/Stable
36-
"Development Status :: 5 - Production/Stable",
37-
# Indicate who your project is intended for
38-
"Intended Audience :: Science/Research",
39-
"Topic :: Scientific/Engineering :: Bio-Informatics",
40-
# Pick your license as you wish (should match "license" above)
41-
"License :: OSI Approved :: Apache Software License",
42-
# Specify the Python versions you support here. In particular, ensure
43-
# that you indicate whether you support Python 2, Python 3 or both.
44-
"Programming Language :: Python :: 3",
45-
"Programming Language :: Python :: 3.6",
46-
"Programming Language :: Python :: 3.7",
47-
"Programming Language :: Python :: 3.8",
48-
"Programming Language :: Python :: 3.9",
49-
],
50-
# What does your project relate to?
51-
keywords="microbiota modeling metabolism community",
52-
# You can just specify the packages manually here if your project is
53-
# simple. Or you can use find_packages().
54-
packages=find_packages(exclude=["docs", "tests"]),
55-
package_data={
56-
"micom": [
57-
path.join("data", "*.csv"),
58-
path.join("data", "*.gz"),
59-
path.join("data", "templates", "*.*"),
60-
path.join("data", "artifacts", "*.*")
61-
]
62-
},
63-
# Alternatively, if you want to distribute just a my_module.py, uncomment
64-
# this:
65-
# py_modules=["my_module"],
66-
# List run-time dependencies here. These will be installed by pip when
67-
# your project is installed. For an analysis of "install_requires" vs pip's
68-
# requirements files see:
69-
# https://packaging.python.org/en/latest/requirements.html
70-
python_requires=">=3.6",
71-
install_requires=[
72-
"cobra>=0.17.1",
73-
"depinfo>=1.7.0",
74-
"optlang>=1.4.7",
75-
"pandas>=1.0.0",
76-
"rich>=9.10.0",
77-
"jinja2>=2.10.0",
78-
"scikit-learn>=0.22.0",
79-
"scipy>=1.0.0",
80-
"symengine>=0.6.1"
81-
],
82-
# List additional groups of dependencies here (e.g. development
83-
# dependencies). You can install these using the following syntax,
84-
# for example:
85-
# $ pip install -e .[dev,test]
86-
extras_require={
87-
"dev": [""],
88-
"test": ["coverage", "pytest", "pytest-cov"],
89-
},
90-
)
8+
setup(version="0.22.3")

0 commit comments

Comments
 (0)