Skip to main content

A fundamental scientific toolbox for computational psychiatry and psychology.

Project description

cpm

the toolbox logo

PyPI - Version

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.

Installation and Usage

To install the package, run the following command:

pip install cpm-toolbox

Once the package is installed, you can import it in your Python code:

import cpm

Install from GitHub for Nightly Builds

In order to install the package from GitHub, run the following command:

pip install git+https://github.com/DevComPsy/cpm.git

Documentation

The documentation can be viewed here: link.

Development of documentation

The documentation is written in docstrings and markdown files. The markdown files are located in the docs directory. The documentation is built using mkdocs.

Vieweing developmental versions of the documentation

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.

Building the documentation

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

Development process

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.

Branch naming convention

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 feature
  • bugfix is for fixing a bug
  • hotfix 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.

Commit message conventions

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.

Pull request conventions

When creating a pull request, make sure to follow these conventions: link

Compiling the package

To compile the package, run the following command in the root directory:

python setup.py sdist bdist_wheel

Uploading the package to PyPi

To upload the package to PyPi, run the following command in the root directory:

twine upload dist/*

Development tools we use

  • black linter for python code formatting
  • numpy-style docstrings for documentation
  • mkdocs for documentation generation
  • pytest for testing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpm_toolbox-0.25.6.tar.gz (362.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cpm_toolbox-0.25.6-py2.py3-none-any.whl (395.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file cpm_toolbox-0.25.6.tar.gz.

File metadata

  • Download URL: cpm_toolbox-0.25.6.tar.gz
  • Upload date:
  • Size: 362.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for cpm_toolbox-0.25.6.tar.gz
Algorithm Hash digest
SHA256 3fd9b2023ae8f9dbcd85ea6bf283b515dfb5f95536ac14a2e49ccc46dbfed131
MD5 461cccfdaa0c203b16de1b0cd5dc3e9e
BLAKE2b-256 a6e079fba30f523c7b75015f7765fe41c028546facb7258644defe2e7cb2b2f9

See more details on using hashes here.

File details

Details for the file cpm_toolbox-0.25.6-py2.py3-none-any.whl.

File metadata

  • Download URL: cpm_toolbox-0.25.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 395.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for cpm_toolbox-0.25.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e66ea80f147dc1d2ae47b7ebccdbb64bbe1a400dcca66e5332c33d1c1299add3
MD5 556a8cbc1b568222e421bf84690d1565
BLAKE2b-256 d2e9ed96be8ef5124e591bbf950671cfbe9b4798d38ef5cb30bc97759d9dac8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page