Skip to content

Commit 934d55b

Browse files
authored
Add changes needed to make tests and src_install non-optional (#159)
1 parent 16bf5e2 commit 934d55b

File tree

5 files changed

+40
-51
lines changed

5 files changed

+40
-51
lines changed

README.rst

-13
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,6 @@ this repository and adding a new `metadata`_ file within it's own
3737
respective directory under `mdakits`.
3838

3939

40-
Workflow
41-
========
42-
43-
Shown below is the MDAKit framework workflow.
44-
45-
46-
.. image:: https://github.com/MDAnalysis/MDAKits/blob/main/assets/MDAKitFramework.png
47-
:alt: The MDAKit Framework
48-
:align: center
49-
50-
51-
For more details see the `MDAKit Whitepaper`_.
52-
5340
License
5441
=======
5542

docs/source/about.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ requirements**:
2727
#. Minimal documentation is provided (what your code does, how to install it,
2828
and how to use it)
2929
#. At least minimal regression tests are present; continuous integration is encouraged
30+
#. The code is installable as a standard package
3031

3132
It is also highly encouraged that the MDAKit also satisfies:
3233

33-
#. The code is installable as a standard package
3434
#. Information on bug reporting, user discussions, and community guidelines is made available
35+
#. The code is made available on a package distribution platform (e.g. PyPi or conda-forge).
3536

3637
Registered MDAKits are then `listed here`_ with the intention of providing a centralised
3738
place where the community can find out more about them. Where possible, the MDAKits are

docs/source/makingakit.rst

+8-7
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ In order to be accepted, there are several :ref:`requirements <requirements>` th
1515
#. Minimal documentation is provided (what your code does, how to install it,
1616
and how to use it)
1717
#. At least minimal regression tests are present; continuous integration is encouraged
18+
#. The source code is installable as a standard package
1819

1920
It is also highly encouraged that the MDAKit also satisfies:
2021

21-
#. Code is installable as a standard package
2222
#. Information on bug reporting, user discussions, and community guidelines is made available
23+
#. The code is made available on a package distribution platform (e.g. PyPi or conda-forge).
2324

2425
These requirements ensure that registered packages are FAIR-compliant and hold up to an ideal scientific standard.
2526
Without prior experience, some of the requirements listed above can be daunting.
@@ -31,7 +32,7 @@ Building from the cookiecutter
3132
The MDAKits cookiecutter template (using the `Cookiecutter tool <https://cookiecutter.readthedocs.io/en/stable/>`_) can be used to rapidly develop a FAIR-compliant MDAKit by generating placeholder code for documentation, testing, and installation.
3233
While its usage is outlined in detail in the `MDAKit cookiecutter <https://cookiecutter-mdakit.readthedocs.io/en/latest/>`_ documentation, here we provide a full walk-through for creating an RMSF analysis kit, recreating the functionality of the `RMSF analysis class <https://docs.mdanalysis.org/stable/documentation_pages/analysis/rms.html#MDAnalysis.analysis.rms.RMSF>`_ in the core library.
3334

34-
Starting from an environment with Python 3.9+ and the `Cookiecutter tool <https://cookiecutter.readthedocs.io/en/stable/>`_, the MDAKit template is generated using
35+
Starting from an environment with Python 3.10+ and the `Cookiecutter tool <https://cookiecutter.readthedocs.io/en/stable/>`_, the MDAKit template is generated using
3536

3637
.. code-block::
3738
@@ -639,13 +640,13 @@ The contents of ``metadata.yaml`` for ``rmsfkit`` are:
639640
license: GPL-2.0-or-later
640641
project_home: https://github.com/yourusername/rmsfkit
641642
documentation_home: https://rmsfkit.readthedocs.io/en/latest/
642-
documentation_type: API
643+
documentation_type: API
644+
src_install:
645+
- git clone https://github.com/yourusername/rmsfkit.git
646+
- cd rmsfkit/
647+
- pip install .
643648
644649
## Optional entries
645-
src_install:
646-
- git clone https://github.com/yourusername/rmsfkit.git
647-
- cd rmsfkit/
648-
- pip install .
649650
python_requires: ">=3.9"
650651
mdanalysis_requires: ">=2.0.0"
651652
run_tests:

docs/source/reviewersguide.rst

+18-18
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,24 @@ is failing
190190
encourage them to do so!)
191191

192192

193+
``src_install``: a list of commands to install the Kit from the source code. This is a *list of strings*
194+
(*AUTOMATIC CHECK*).
195+
196+
197+
``run_tests``: a list of commands to run the Kit’s tests. This is a *list of strings* (*AUTOMATIC CHECK*).
198+
199+
- *note*: while (minimal) tests are one of the requirements of an MDAKit, we recognize that there might
200+
be testing frameworks that we do not support yet. In those cases please exercise flexibility when
201+
reviewing.
202+
- **RECOMMEND**: While a MDAKit may be registered with only minimal tests, encourage the contributor
203+
to continue improving their tests in the future.
204+
205+
206+
``test_dependencies``: a list of commands for installing any dependencies required by the MDAKit’s tests.
207+
This is a *list of strings* (*AUTOMATIC CHECK*).
208+
209+
210+
193211
*Optional* entries
194212
~~~~~~~~~~~~~~~~~~
195213

@@ -203,10 +221,6 @@ CI is passing.
203221
encourage the contributor to make a release on conda-forge or PyPI.
204222

205223

206-
``src_install``: a list of commands to install the Kit from the source code. This is a *list of strings*
207-
(*AUTOMATIC CHECK*).
208-
209-
210224
``import_name``: the package name, used to import the Kit in Python. This is a *string* (*AUTOMATIC CHECK*).
211225

212226

@@ -224,20 +238,6 @@ is a *string* (*AUTOMATIC CHECK*).
224238
old version is given, enquire why, and recommend updating the Kit to work with a current version.
225239

226240

227-
``run_tests``: a list of commands to run the Kit’s tests. This is a *list of strings* (*AUTOMATIC CHECK*).
228-
229-
- *note*: while (minimal) tests are one of the requirements of an MDAKit, providing instructions on how to run
230-
tests in the metadata file is currently optional, in order to allow greater flexibility in
231-
what format tests take and so lower the entry barrier for new contributors. However, it is *highly
232-
recommended* here to provide this metadata.
233-
- **RECOMMEND**: While a MDAKit may be registered with only minimal tests, encourage the contributor
234-
to continue improving their tests in the future.
235-
236-
237-
``test_dependencies``: a list of commands for installing any dependencies required by the MDAKit’s tests.
238-
This is a *list of strings* (*AUTOMATIC CHECK*).
239-
240-
241241
``project_org``: the account under which the code is found - this may be an individual user account, or an
242242
organisation like MDAnalysis. This is a *string*.
243243

mdakits/template/metadata.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,6 @@ documentation_home: https://MYPROJECT.readthedocs.io
5252
## str: the type of documentation available [UserGuide, API, README]
5353
documentation_type: UserGuide + API
5454

55-
#------------------------------------------------------------
56-
# Optional entries
57-
#------------------------------------------------------------
58-
## List(str): a list of commands to use when installing the latest
59-
## release of the code. Note: only one installation method can currently
60-
## be defined. We suggest using mamba where possible (e.g.
61-
## mamba -c conda-forge install MYPROJECT
62-
## for a conda package installation).
63-
## Here we use a simple PyPi installation:
64-
install:
65-
- pip install MYPROJECT
66-
6755
## List(str): a list of commands to use when installing the mdakit from its
6856
## source code.
6957
src_install:
@@ -102,6 +90,18 @@ test_dependencies:
10290
## str: the organisation name the MDAKit falls under
10391
project_org: GH_HOST_ACCOUNT
10492

93+
#------------------------------------------------------------
94+
# Optional entries
95+
#------------------------------------------------------------
96+
## List(str): a list of commands to use when installing the latest
97+
## release of the code. Note: only one installation method can currently
98+
## be defined. We suggest using mamba where possible (e.g.
99+
## mamba -c conda-forge install MYPROJECT
100+
## for a conda package installation).
101+
## Here we use a simple PyPi installation:
102+
install:
103+
- pip install MYPROJECT
104+
105105
## str: the development status of the MDAKit
106106
## See https://pypi.org/classifiers/ for development status classifiers.
107107
development_status: Production/Stable

0 commit comments

Comments
 (0)