Skip to content

Commit 44d0aba

Browse files
authored
Prep 0.7.7 (#639)
* Move generated docs to generated directory * Switch to pep-621/631 project metadata * Add back 3.6 classifier * Update release notes * Update cleaning of doc builds (also remove cached autodoc files) * Hide experimental module from doc builds
1 parent 63d40ff commit 44d0aba

File tree

10 files changed

+108
-180
lines changed

10 files changed

+108
-180
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ __pycache__/
1818
test.h5ad
1919

2020
# docs
21-
/docs/anndata.*
21+
/docs/generated/
2222
/docs/_build/
2323

2424
# IDEs

anndata/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Annotated multivariate observation data."""
22

3-
from ._metadata import __version__, __author__, __email__, within_flit
3+
from ._metadata import __version__, within_flit
44

55
if not within_flit():
66
del within_flit

anndata/_core/merge.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ def concat(
612612
) -> AnnData:
613613
"""Concatenates AnnData objects along an axis.
614614
615-
See the :doc:`concatenation` section in the docs for a more in-depth description.
615+
See the :doc:`concatenation <../concatenation>` section in the docs for a more in-depth description.
616616
617617
.. warning::
618618
@@ -629,7 +629,8 @@ def concat(
629629
Which axis to concatenate along.
630630
join
631631
How to align values when concatenating. If "outer", the union of the other axis
632-
is taken. If "inner", the intersection. See :doc:`concatenation` for more.
632+
is taken. If "inner", the intersection. See :doc:`concatenation <../concatenation>`
633+
for more.
633634
merge
634635
How elements not aligned to the axis being concatenated along are selected.
635636
Currently implemented strategies include:

anndata/_metadata.py

-8
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,9 @@ def refresh_entry_points():
2323

2424
try:
2525
from setuptools_scm import get_version
26-
import pytoml
27-
28-
proj = pytoml.loads((here.parent / "pyproject.toml").read_text())
29-
metadata = proj["tool"]["flit"]["metadata"]
3026

3127
refresh_entry_points()
3228
__version__ = get_version(root="..", relative_to=__file__)
33-
__author__ = metadata["author"]
34-
__email__ = metadata["author-email"]
3529
except (ImportError, LookupError, FileNotFoundError):
3630
try:
3731
from importlib.metadata import metadata
@@ -40,8 +34,6 @@ def refresh_entry_points():
4034

4135
meta = metadata(here.name)
4236
__version__ = meta["Version"]
43-
__author__ = meta["Author"]
44-
__email__ = meta["Author-email"]
4537

4638

4739
def within_flit():

docs/Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ help:
1414

1515
.PHONY: help Makefile
1616

17+
clean:
18+
rm -r "$(BUILDDIR)"
19+
rm -r "generated"
20+
find . -name scanpy.*.rst -delete
21+
1722
# Catch-all target: route all unknown targets to Sphinx using the new
1823
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1924
%: Makefile

docs/api.rst

+7-22
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ API
66
The central class:
77

88
.. autosummary::
9-
:toctree: .
9+
:toctree: generated/
1010

1111
AnnData
1212

@@ -16,7 +16,7 @@ Combining
1616
Combining AnnData objects. See also the section on concatenation.
1717

1818
.. autosummary::
19-
:toctree: .
19+
:toctree: generated/
2020

2121
concat
2222

@@ -26,14 +26,14 @@ Reading
2626
Reading anndata’s native file format `.h5ad`.
2727

2828
.. autosummary::
29-
:toctree: .
29+
:toctree: generated/
3030

3131
read_h5ad
3232

3333
Reading other file formats.
3434

3535
.. autosummary::
36-
:toctree: .
36+
:toctree: generated/
3737

3838
read_csv
3939
read_excel
@@ -51,39 +51,24 @@ Writing
5151
Writing to anndata’s native file format `.h5ad`.
5252

5353
.. autosummary::
54-
:toctree: .
54+
:toctree: generated/
5555

5656
AnnData.write
5757

5858
Writing to other formats.
5959

6060
.. autosummary::
61-
:toctree: .
61+
:toctree: generated/
6262

6363
AnnData.write_csvs
6464
AnnData.write_loom
6565
AnnData.write_zarr
6666

6767

68-
Experimental API
69-
----------------
70-
71-
.. warning::
72-
73-
API's in the experimenal module are currently in development and subject to change at any time.
74-
75-
Two classes for working with batched access to collections of many `AnnData` objects or `h5ad` files. In paritcular, for pytorch-based models.
76-
77-
.. autosummary::
78-
:toctree: .
79-
80-
experimental.AnnCollection
81-
experimental.AnnLoader
82-
8368
Errors and warnings
8469
-------------------
8570

8671
.. autosummary::
87-
:toctree: .
72+
:toctree: generated/
8873

8974
ImplicitModificationWarning

docs/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
# General information
2525
project = "anndata"
26-
author = anndata.__author__
27-
copyright = f"{datetime.now():%Y}, {author}."
26+
author = "AnnData development team"
27+
copyright = f"{datetime.now():%Y}, the AnnData development team."
2828
version = anndata.__version__.replace(".dirty", "")
2929
release = version
3030

docs/release-latest.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. role:: small
22
.. role:: smaller
33

4-
On `master` :small:`the future`
4+
0.7.7 :small:`9 November, 2021`
55
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66

77
.. rubric:: Bug fixes
@@ -11,6 +11,9 @@ On `master` :small:`the future`
1111
- Fixed out-of-bounds integer indices not raising :class:`IndexError` :pr:`630` :smaller:`M Klein`
1212
- Fixed backed `SparseDataset` indexing with scipy 1.7.2 :pr:`638` :smaller:`I Virshup`
1313

14+
.. rubric:: Development processes
15+
16+
- Use PEPs 621 (standardized project metadata), 631 (standardized dependencies), and 660 (standardized editable installs) :pr:`639` :smaller:`I Virshup`
1417

1518
0.7.6 :small:`11 April, 2021`
1619
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

pyproject.toml

+85-70
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,116 @@
11
[build-system]
2-
build-backend = 'flit_core.buildapi'
2+
build-backend = "flit_core.buildapi"
33
requires = [
4-
'flit_core >=3.1,<4',
5-
'setuptools_scm',
6-
'pytoml',
7-
'importlib_metadata>=0.7; python_version < "3.8"',
4+
"flit_core >=3.4,<4",
5+
"setuptools_scm",
6+
"importlib_metadata>=0.7; python_version < '3.8'",
87
]
98

10-
[tool.flit.metadata]
11-
module = 'anndata'
12-
author = 'Philipp Angerer, Alex Wolf, Isaac Virshup, Sergei Rybakov'
13-
# We don’t need all emails, the main authors are sufficient.
14-
15-
description-file = 'README.rst'
16-
home-page = 'http://github.com/theislab/anndata'
17-
urls = { Documentation = 'https://anndata.readthedocs.io/' }
9+
[project]
10+
name = "anndata"
11+
description = "Annotated data."
12+
requires-python = ">=3.6"
13+
license = {file = "LICENSE"}
14+
authors = [
15+
{name = "Philipp Angerer"},
16+
{name = "Alex Wolf"},
17+
{name = "Isaac Virshup"},
18+
{name = "Sergei Rybakov"},
19+
]
20+
maintainers = [
21+
{name = "Isaac Virshup", email = "[email protected]"},
22+
{name = "Philipp Angerer", email = "[email protected]"},
23+
{name = "Alex Wolf", email = "[email protected]"},
24+
]
25+
readme = {file = "README.rst", content-type="text/x-rst"}
1826
classifiers = [
19-
'License :: OSI Approved :: BSD License',
20-
'Environment :: Console',
21-
'Framework :: Jupyter',
22-
'Intended Audience :: Developers',
23-
'Intended Audience :: Science/Research',
24-
'Natural Language :: English',
25-
'Operating System :: MacOS :: MacOS X',
26-
'Operating System :: Microsoft :: Windows',
27-
'Operating System :: POSIX :: Linux',
28-
'Programming Language :: Python :: 3',
29-
'Programming Language :: Python :: 3.6',
30-
'Programming Language :: Python :: 3.7',
31-
'Topic :: Scientific/Engineering :: Bio-Informatics',
32-
'Topic :: Scientific/Engineering :: Visualization',
27+
"License :: OSI Approved :: BSD License",
28+
"Environment :: Console",
29+
"Framework :: Jupyter",
30+
"Intended Audience :: Developers",
31+
"Intended Audience :: Science/Research",
32+
"Natural Language :: English",
33+
"Operating System :: MacOS :: MacOS X",
34+
"Operating System :: Microsoft :: Windows",
35+
"Operating System :: POSIX :: Linux",
36+
"Programming Language :: Python :: 3",
37+
"Programming Language :: Python :: 3.6",
38+
"Programming Language :: Python :: 3.7",
39+
"Programming Language :: Python :: 3.8",
40+
"Programming Language :: Python :: 3.9",
41+
"Topic :: Scientific/Engineering :: Bio-Informatics",
42+
"Topic :: Scientific/Engineering :: Visualization",
3343
]
34-
requires-python = '>=3.6'
35-
requires = [
36-
'pandas>=1.1.1', # pandas <1.1.1 has pandas/issues/35446
37-
'numpy>=1.16.5', # required by pandas 1.x
38-
'scipy>1.4',
39-
'h5py',
40-
'natsort',
41-
'packaging>=20',
42-
'xlrd<2.0', # xlsx format not support anymore from v2.0, see pandas/issues/38524
44+
dependencies = [
45+
"pandas>=1.1.1", # pandas <1.1.1 has pandas/issues/35446
46+
"numpy>=1.16.5", # required by pandas 1.x
47+
"scipy>1.4",
48+
"h5py",
49+
"natsort",
50+
"packaging>=20",
51+
"xlrd<2.0", # xlsx format not support anymore from v2.0, see pandas/issues/38524
4352
# for getting the stable version
44-
'importlib_metadata>=0.7; python_version < "3.8"',
53+
"importlib_metadata>=0.7; python_version < '3.8'",
4554
]
55+
dynamic = ["version"]
56+
57+
[project.urls]
58+
Documentation = "https://anndata.readthedocs.io/"
59+
Source = "https://github.com/theislab/anndata"
60+
Home-page = "https://github.com/theislab/anndata"
61+
4662

47-
[tool.flit.metadata.requires-extra]
63+
[project.optional-dependencies]
4864
dev = [
4965
# dev version generation
50-
'setuptools_scm',
51-
'pytoml',
66+
"setuptools_scm",
5267
# static checking
53-
'black>=20.8b1',
54-
'docutils',
68+
"black>=20.8b1",
69+
"docutils",
5570
]
5671
doc = [
57-
'sphinx>=4.1,<4.2',
58-
'sphinx-rtd-theme',
59-
'sphinx-autodoc-typehints>=1.11.0',
60-
'sphinx_issues',
61-
'scanpydoc>=0.7.3',
62-
'typing_extensions; python_version < "3.8"',
72+
"sphinx>=4.1,<4.2",
73+
"sphinx-rtd-theme",
74+
"sphinx-autodoc-typehints>=1.11.0",
75+
"sphinx_issues",
76+
"scanpydoc>=0.7.3",
77+
"typing_extensions; python_version < '3.8'",
6378
]
6479
test = [
65-
'loompy>=3.0.5',
66-
'pytest>=6.0',
67-
'pytest-cov>=2.10',
68-
'zarr',
69-
'matplotlib',
70-
'sklearn',
71-
'openpyxl',
72-
'joblib',
73-
'boltons',
74-
'scanpy',
80+
"loompy>=3.0.5",
81+
"pytest>=6.0",
82+
"pytest-cov>=2.10",
83+
"zarr",
84+
"matplotlib",
85+
"sklearn",
86+
"openpyxl",
87+
"joblib",
88+
"boltons",
89+
"scanpy",
7590
]
7691

7792
[tool.flit.sdist]
7893
exclude = [
79-
'anndata/tests',
80-
'setup.py',
94+
"anndata/tests",
95+
"setup.py",
8196
]
8297

8398
[tool.coverage.run]
84-
source = ['anndata']
99+
source = ["anndata"]
85100
omit = [
86-
'setup.py',
87-
'versioneer.py',
88-
'anndata/_version.py',
89-
'**/test_*.py',
101+
"setup.py",
102+
"versioneer.py",
103+
"anndata/_version.py",
104+
"**/test_*.py",
90105
]
91106

92107
[tool.pytest.ini_options]
93-
addopts = '--doctest-modules'
94-
python_files = 'test_*.py'
95-
testpaths = ['anndata', 'docs/concatenation.rst']
108+
addopts = "--doctest-modules"
109+
python_files = "test_*.py"
110+
testpaths = ["anndata", "docs/concatenation.rst"]
96111
xfail_strict = true
97112

98113
[tool.black]
99114
line-length = 88
100-
target-version = ['py36']
101-
exclude = '^/build/.*$'
115+
target-version = ["py36"]
116+
exclude = "^/build/.*$"

0 commit comments

Comments
 (0)