The Installation guide is intended to assist users with installing the library.
$ python3 -m pip install mentpy
Install from Source¶
To install from source, you can
git clone the repository and then use
pip to handle the installation. This method will also ensure that all necessary dependencies as specified in
pyproject.toml are installed.
$ git clone https://github.com/mentpy/mentpy $ cd mentpy # This will install the package in editable mode along with its dependencies $ python3 -m pip install -e .
Now, you can verify the installation by importing the
mentpy package and checking its version.
In : import mentpy as mp In : mp.__version__ Out: '0.0.0'
Developers who wish to contribute to
mentpy or use the development version can set up a development environment. This involves cloning the repository and installing the necessary dependencies, including those required for testing and documentation.
First, clone the repository:
$ git clone https://github.com/mentpy/mentpy $ cd mentpy
Install the project along with its regular and development dependencies:
# This will install the package in editable mode along with its regular and development dependencies $ python3 -m pip install -e '.[dev]'
This command installs
mentpy in an “editable” mode and also installs additional development dependencies specified under [dev-dependencies] in pyproject.toml. Now, you are set up to make changes, run tests, and build documentation.
Testing and Development¶
Before submitting changes, you can run the test suite to ensure everything is functioning correctly:
If you’re adding new features or fixing any bugs, it’s a good idea to include new tests that cover your changes.
Additionally, you can build the documentation locally to check for any errors and see how it looks before pushing changes:
$ cd docs $ make html
This process generates HTML documentation in docs/_build/html, which you can open in a web browser to review.
Contributors are encouraged to follow the contributing guidelines to submit their enhancements or bug fixes.