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.

  1. Initial requirements: to use the Cookiecutter, you will need a GitHub account, and an environment with Python 3.10+ and the Cookiecutter tool installed.

  2. 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 and CONTRIBUTING.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

  1. Uses MDAnalysis

  2. ✓ 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.

  3. 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.

  4. ✓ 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.

  5. (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.

  6. (At least) minimal regression tests

  7. ✓ Installable as a standard package – the configuration file pyproject.toml and the file structure set up in rmsfkit/ will allow this.

  8. ✓ (Recommended) community information available – provided with CODE_OF_CONDUCT.md and CONTRIBUTING.md. Adjust these files to suit your needs.

  9. (Recommended) on a package distribution platform