cpm is a fundamental package for Computational Psychiatry. It is designed to provide a set of tools for researchers and clinicians to analyze and model data in the field of Computational Psychiatry.
In order to install the package from GitHub, run the following command:
pip install git+https://github.com/DevComPsy/cpm.git
The documentation can be viewed here: link.
The documentation is written in docstrings and markdown files. The markdown files are located in the docs
directory. The documentation is built using mkdocs.
First, install all requirements:
pip install -r docs/requirements.txt
In the root directory, run the following commands:
mkdocs build
mkdocs serve
Then open a browser and go to http://127.0.0.1:8000/
Depending on the version you have, you might need to add Jupyter to PATH, see this link for more information.
To build the documentation, run the following command in the root directory:
mkdocs build
To deploy the documentation to GitHub pages, run the following command in the root directory:
mkdocs gh-deploy
To work on the toolbox, create a new branch from the main
branch. Then, create a pull request to merge the new feature into the main
branch. Once the pull request is approved, merge the new feature into the main
branch.
A git branch should start with a category. Pick one of these: feature, bugfix, hotfix, or test.
feature
is for adding, refactoring or removing a featurebugfix
is for fixing a bughotfix
is for changing code with a temporary solution and/or without following the usual process (usually because of an emergency)test
is for experimenting outside of an issue/ticket
See this link for some great description of the naming convention.
Please follow the Conventional Commits guidelines for commit messages. Feel free to use gitmoji for commit messages, but insert them at the end of the problem description. See this link for more information.
When creating a pull request, make sure to follow these conventions: link
To compile the package, run the following command in the root directory:
python setup.py sdist bdist_wheel
To upload the package to PyPi, run the following command in the root directory:
twine upload dist/*
black linter
for python code formattingnumpy
-style docstrings for documentationmkdocs
for documentation generationpytest
for testing