| 1 |
.. _software_process: |
| 2 |
|
| 3 |
================ |
| 4 |
Software Process |
| 5 |
================ |
| 6 |
|
| 7 |
---------------------- |
| 8 |
Continuous Integration |
| 9 |
---------------------- |
| 10 |
|
| 11 |
HDMF is tested against Ubuntu, macOS, and Windows operating systems. |
| 12 |
The project has both unit and integration tests. |
| 13 |
Tests run on `GitHub Actions`_. |
| 14 |
|
| 15 |
Each time a PR is created or updated, the project is built, packaged, and tested on all supported operating systems |
| 16 |
and python distributions. That way, as a contributor, you know if you introduced regressions or coding style |
| 17 |
inconsistencies. |
| 18 |
|
| 19 |
There are badges in the README_ file which shows the current condition of the dev branch. |
| 20 |
|
| 21 |
.. _GitHub Actions: https://github.com/hdmf-dev/hdmf/actions |
| 22 |
.. _README: https://github.com/hdmf-dev/hdmf/blob/dev/README.rst |
| 23 |
|
| 24 |
|
| 25 |
-------- |
| 26 |
Coverage |
| 27 |
-------- |
| 28 |
|
| 29 |
Code coverage is computed and reported using the coverage_ tool. There are two coverage-related badges in the README_ |
| 30 |
file. One shows the status of the `GitHub Action workflow`_ which runs the coverage_ tool and uploads the report to |
| 31 |
codecov_, and the other badge shows the percentage coverage reported from codecov_. A detailed report can be found on |
| 32 |
codecov_, which shows line by line which lines are covered by the tests. |
| 33 |
|
| 34 |
.. _coverage: https://coverage.readthedocs.io |
| 35 |
.. _GitHub Action workflow: https://github.com/hdmf-dev/hdmf/actions?query=workflow%3A%22Run+coverage%22 |
| 36 |
.. _codecov: https://app.codecov.io/gh/hdmf-dev/hdmf/tree/dev/src/hdmf |
| 37 |
|
| 38 |
.. _software_process_requirement_specifications: |
| 39 |
|
| 40 |
------------------------- |
| 41 |
Installation Requirements |
| 42 |
------------------------- |
| 43 |
|
| 44 |
pyproject.toml_ contains a list of package dependencies and their version ranges allowed for |
| 45 |
running HDMF. As a library, upper bound version constraints create more harm than good in the long term (see this |
| 46 |
`blog post`_) so we avoid setting upper bounds on requirements. |
| 47 |
|
| 48 |
If some of the packages are outdated, see :ref:`update_requirements_files`. |
| 49 |
|
| 50 |
.. _pyproject.toml: https://github.com/hdmf-dev/hdmf/blob/dev/pyproject.toml |
| 51 |
.. _blog post: https://iscinumpy.dev/post/bound-version-constraints/ |
| 52 |
|
| 53 |
-------------------- |
| 54 |
Testing Requirements |
| 55 |
-------------------- |
| 56 |
|
| 57 |
There are several kinds of requirements files used for testing PyNWB. |
| 58 |
|
| 59 |
The first one is requirements-min.txt_, which lists the package dependencies and their minimum versions for |
| 60 |
installing HDMF. |
| 61 |
|
| 62 |
The second one is requirements.txt_, which lists the pinned (concrete) dependencies to reproduce |
| 63 |
an entire development environment to use HDMF. |
| 64 |
|
| 65 |
The third one is requirements-dev.txt_, which list the pinned (concrete) dependencies to reproduce |
| 66 |
an entire development environment to use HDMF, run HDMF tests, check code style, compute coverage, and create test |
| 67 |
environments. |
| 68 |
|
| 69 |
The fourth one is requirements-opt.txt_, which lists the pinned (concrete) optional dependencies to use all |
| 70 |
available features in HDMF. |
| 71 |
|
| 72 |
The final one is environment-ros3.yml_, which lists the dependencies used to |
| 73 |
test ROS3 streaming in HDMF. |
| 74 |
|
| 75 |
.. _requirements-min.txt: https://github.com/hdmf-dev/hdmf/blob/dev/requirements-min.txt |
| 76 |
.. _requirements.txt: https://github.com/hdmf-dev/hdmf/blob/dev/requirements.txt |
| 77 |
.. _requirements-dev.txt: https://github.com/hdmf-dev/hdmf/blob/dev/requirements-dev.txt |
| 78 |
.. _requirements-opt.txt: https://github.com/hdmf-dev/hdmf/blob/dev/requirements-opt.txt |
| 79 |
.. _environment-ros3.yml: https://github.com/hdmf-dev/hdmf/blob/dev/environment-ros3.yml |
| 80 |
|
| 81 |
-------------------------- |
| 82 |
Documentation Requirements |
| 83 |
-------------------------- |
| 84 |
|
| 85 |
requirements-doc.txt_ lists the dependencies to generate the documentation for HDMF. |
| 86 |
Both this file and `requirements.txt` are used by ReadTheDocs_ to initialize the local environment for Sphinx to run. |
| 87 |
|
| 88 |
.. _requirements-doc.txt: https://github.com/hdmf-dev/hdmf/blob/dev/requirements-doc.txt |
| 89 |
.. _ReadTheDocs: https://readthedocs.org/projects/hdmf/ |
| 90 |
|
| 91 |
------------------------- |
| 92 |
Versioning and Releasing |
| 93 |
------------------------- |
| 94 |
|
| 95 |
HDMF uses setuptools_scm_ for versioning source and wheel distributions. `setuptools_scm` creates a semi-unique release |
| 96 |
name for the wheels that are created based on git tags. |
| 97 |
After all the tests pass, the "Deploy release" GitHub Actions workflow |
| 98 |
creates both a wheel (``\*.whl``) and source distribution (``\*.tar.gz``) for Python 3 |
| 99 |
and uploads them back to GitHub as a release_. |
| 100 |
|
| 101 |
It is important to note that GitHub automatically generates source code archives in ``.zip`` and ``.tar.gz`` formats and |
| 102 |
attaches those files to all releases as an asset. These files currently do not contain the submodules within HDMF and |
| 103 |
thus do not serve as a complete installation. For a complete source code archive, use the source distribution generated |
| 104 |
by GitHub Actions, typically named ``hdmf-{version}.tar.gz``. |
| 105 |
|
| 106 |
.. _setuptools_scm: https://github.com/pypa/setuptools_scm |
| 107 |
.. _release: https://github.com/hdmf-dev/hdmf/releases |