Skip to content

Commit b17e137

Browse files
committed
Use pyproject.toml
1 parent e0e6788 commit b17e137

File tree

13 files changed

+167
-2490
lines changed

13 files changed

+167
-2490
lines changed

.git_archival.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
4+
ref-names: $Format:%D$

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
hdmf_docutils/_version.py export-subst
1+
.git_archival.txt export-subst

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ docs/_build
5050
# IDE junk
5151
.idea/*
5252
*.swp
53+
54+
# Add Hatch
55+
.hatch/
56+
.venv/

MAINTAINERS.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
Maintainers: How to make a new release ?
22
----------------------------------------
33

4+
0. Create a GitHub release and the `publish_pypi.yml` workflow will automatically upload the packages to PyPI.
5+
6+
How to make a manual release?
7+
-----------------------------
8+
49
*Fixed font text area below list commands expected to be entered in a bash shell*
510

6-
1. Configure ``~/.pypirc`` as described `here <https://packaging.python.org/distributing/#uploading-your-project-to-pypi>`_.
11+
1. Configure ``~/.pypirc`` as described `here <https://packaging.python.org/en/latest/tutorials/packaging-projects/#uploading-your-project-to-pypi>`_.
712

813
2. Make sure the cli and module work as expected.
914

@@ -27,7 +32,8 @@ Maintainers: How to make a new release ?
2732
::
2833

2934
rm -rf dist/
30-
python setup.py sdist bdist_wheel
35+
python -m pip install build
36+
python -m build
3137

3238
6. Upload the packages to the testing PyPI instance:
3339

MANIFEST.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.rst

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,39 @@ HDMF Documentation Utilities
55
*This project is under active development. Its content, API and behavior may change at any time. We mean it.*
66

77
.. image:: https://img.shields.io/pypi/l/hdmf-docutils.svg
8-
:target: https://github.com/hdmf-dev/hdmf-docutils/blob/master/license.txt
8+
:target: https://github.com/hdmf-dev/hdmf-docutils/blob/main/license.txt
99
:alt: PyPI - License
1010

1111
.. image:: https://img.shields.io/pypi/v/hdmf-docutils.svg
1212
:target: https://pypi.org/project/hdmf-docutils/
1313
:alt: PyPI
1414

15-
.. image:: https://dev.azure.com/hdmf-dev/hdmf-docutils/_apis/build/status/hdmf-dev.hdmf-docutils?branchName=master
16-
:target: https://dev.azure.com/hdmf-dev/hdmf-docutils/_build/latest?definitionId=1&branchName=master
17-
:alt: Build Status
15+
.. image:: https://github.com/hdmf-dev/hdmf-docutils/actions/workflows/codespell.yml/badge.svg
16+
:target: https://github.com/hdmf-dev/hdmf-docutils/actions/workflows/codespell.yml
17+
:alt: Codespell
18+
19+
.. image:: https://github.com/hdmf-dev/hdmf-docutils/actions/workflows/doc_builds.yml/badge.svg
20+
:target: https://github.com/hdmf-dev/hdmf-docutils/actions/workflows/doc_builds.yml
21+
:alt: Doc Builds
22+
23+
.. image:: https://github.com/hdmf-dev/hdmf-docutils/actions/workflows/publish_pypi.yml/badge.svg
24+
:target: https://github.com/hdmf-dev/hdmf-docutils/actions/workflows/publish_pypi.yml
25+
:alt: Publish to PyPI
26+
27+
.. image:: https://github.com/hdmf-dev/hdmf-docutils/actions/workflows/ruff.yml/badge.svg
28+
:target: https://github.com/hdmf-dev/hdmf-docutils/actions/workflows/ruff.yml
29+
:alt: Ruff
30+
31+
.. image:: https://github.com/hdmf-dev/hdmf-docutils/actions/workflows/run_all_tests.yml/badge.svg
32+
:target: https://github.com/hdmf-dev/hdmf-docutils/actions/workflows/run_all_tests.yml
33+
:alt: Run all tests
1834

1935
Overview
2036
--------
2137

2238
This project is a collection of CLIs, scripts and modules useful to generate the HDMF documentation.
2339

24-
Using hdmf-docutils to generate documentation for an extension: http://pynwb.readthedocs.io/en/latest/extensions.html#documenting-extensions
40+
Using hdmf-docutils to generate documentation for an extension: https://nwb-overview.readthedocs.io/en/latest/extensions_tutorial/6_documenting_extension.html
2541

2642
To cite this tool use: (HDMF Documentation Utilities, RRID:SCR_021341)
2743

hdmf_docutils/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
other utility functions.
44
"""
55

6-
from ._version import get_versions
6+
try:
7+
# see https://effigies.gitlab.io/posts/python-packaging-2023/
8+
from ._version import __version__
9+
except ImportError: # pragma: no cover
10+
# this is a relatively slower method for getting the version string
11+
from importlib.metadata import version # noqa: E402
712

8-
__version__ = get_versions()['version']
9-
del get_versions
13+
__version__ = version("hdmf_docutils")
14+
del version

0 commit comments

Comments
 (0)