Part 1: Using the MDAKit cookicutter
See our YouTube tutorial for a video demonstration of this section.
The MDAKits cookiecutter (a Cookiecutter tool) can be used to rapidly develop a FAIR-compliant MDAKit by generating placeholder code for documentation, testing and installation.
More information on its usage is can be found in the
MDAKit cookiecutter documentation, but in short using the cookiecutter
involved running a command line prompt and then responding to a series of
subsequent prompts. Below, we demonstrate this process for creating an
rmsfkit
project.
Initial requirements: to use the Cookiecutter, you will need a GitHub account, and an environment with Python 3.10+ and the Cookiecutter tool installed.
The following command and responses will create a template for an
rmsfkit
project. Note that some prompts have been left blank, accepting the default response.$ cookiecutter gh:MDAnalysis/cookiecutter-mdakit project_name (ProjectName): rmsfkit repo_name (rmsfkit): package_name (rmsfkit): description (A short description of the project.): A package to perform RMSF analysis on molecular dynamics data. github_username (Your personal GitHub username): myusername github_host_account (GitHub account for hosting rmsfkit (e.g. myusername or an organization account). Press Enter to use myusername): author_name (Your name (or your organization/company/team)): Firstname Lastname author_email (Your email (or your organization/company/team)): [email protected] Select dependency_source: 1 - Prefer conda-forge over the default anaconda channel with pip fallback 2 - Prefer default anaconda channel with pip fallback 3 - Dependencies from pip only (no conda) Choose from [1/2/3] (1): Select include_ReadTheDocs: 1 - y 2 - n Choose from [1/2] (1): template_analysis_class (Class name to template (e.g. Rmsfkit ). Press Enter to skip including analysis templates):
Details on these options can be found on the MDAKit cookiecutter documentation here. For
rmsfkit
, we have opted to ‘include ReadTheDocs’ (so that we can use it to host our documentation later), and ‘not create a template Analysis class’ for our code (since we will be copying the existing MDAnalysis RMSF code).
A new git repository named rmsfkit
has been generated. Navigating into this
directory, we find a number of files and subdirectories. The cookiecutter
documentation provides more information on these, but some
to take note of now:
LICENSE
– a text file containing the license information (GLPv2+ by default).AUTHORS.md
– a template text file for listing code authors as each new contribution is made. Auto-populated with your name as the initial project creator.README.md
– a text file containing the project description and other useful information. This will be the landing page content rendered on GitHub.pyproject.toml
– a configuration file with information for packaging (and other tools).rmsfkit/
– folder containing template files for a python package. This is where the source code (and tests) will live.CODE_OF_CONDUCT.md
andCONTRIBUTING.md
– text files containing sample community guidelines and autogenerated instructions for reporting issues, contributing, etc (once the code is on GitHub).docs/
– folder containing documentation templates and configuration files for building the documentation.
We’ll address some further files as they become relevant.
Progress: MDAKit requirements
Uses MDAnalysis
✓ Open source + OSI license – the default GPLv2 license falls under OSI. If you wish to choose another license, you can replace the default
LICENSE
file with another; see Licensing for more information.Versioned + on a version-controlled repository – the cookiecutter has set up versioning with git; in a later step, we’ll add it to GitHub to complete this requirement.
✓ Designated authors and maintainers – in the autogenerated
AUTHORS.md
file, assuming that the maintained and author are the same person. Future authors will also be added here.(At least) minimal documentation – the autogenerated
README.md
does contain the Kit description, which is a start. We will be adding more formal documentation in a later step.(At least) minimal regression tests
✓ Installable as a standard package – the configuration file
pyproject.toml
and the file structure set up inrmsfkit/
will allow this.✓ (Recommended) community information available – provided with
CODE_OF_CONDUCT.md
andCONTRIBUTING.md
. Adjust these files to suit your needs.(Recommended) on a package distribution platform