Skip to content

Developer Guide

ssinchak edited this page Jun 14, 2024 · 4 revisions

Building Package

For creating your own package, the cookie cutter package available from The Molecular Sciences Software Institute (MolSSI) can be used. This repository is available at their GitHub repository. The repository provides an in depth description for using the cookiecutter, but the necessary steps will be provided below. The cookiecutter creates the supporting files for a python package with placeholder files for user made modules.

The general steps are outlined in the list below, but click the links corresponding with your operating system (Mac/Linux / Windows) for the command line prompt commands.

  1. Open a python environment with conda
  2. Install git and cookiecutter
  3. Use cookiecutter to create package framework
  4. Enter in metadata

Publishing Package to TestPyPi

Once it has been confirmed that the required files, desired modules, and necessary tests have been included in the files, then the packaged can be uploaded to TestPyPi using the command line. The necessary tests required can be defined as a test for ensuring that the package can be imported with all its dependencies along with tests for functionality based on the included modules. A test is successful when an error does not occur during runtime. The required files for a package are included within the cookie cutter package provided by molSSI labs. The desired modules are added by the developer. Now that it is confirmed that the requirements have been met, the package can be uploaded to TestPyPi via the command line. The following steps must be followed.

  1. Create a conda environment within the file directory of the repository
  2. Make sure that twine, verstioningit, git, and pip are installed within the environment
  3. Check the status of the package to make sure that the local repository matches the corresponding repository on GitHub.
  4. Tag the version according to semantic versioning conventions
  5. Build the package using pip by creating tar.br and .whl files
  6. Create TestPyPi account and API code
  7. Use twine and passcode to upload package to TestPyPi
  8. The provided link is where your package is available for distribution

However, this process is different depending on the operating system that is installed on your laptop. Click below to see the commands required depending on your operating system.

Clone this wiki locally