Development Workflow
Helpful resources
Psiexperiment leverages Enaml both for building the user-interface and for implementing a plugin-based system. Extending psiexperiment requires familiarity with the Enaml Workbench plugin framework.
Setting up your environment
The recommended way to develop psiexperiment is to use an editable install within a dedicated virtual environment.
1. Clone the repository
git clone https://github.com/bburan/psiexperiment
cd psiexperiment
2. Create a virtual environment
Using venv:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Using conda:
conda create -n psi-dev python=3.10
conda activate psi-dev
3. Install in editable mode
Install psiexperiment along with its development, documentation, and testing dependencies:
pip install -e .[dev,docs,test]
4. Configure your environment
Set the PSI_CONFIG environment variable to point to a local configuration file for development. This prevents your development work from interfering with any production installs.
# On Windows (PowerShell)
$env:PSI_CONFIG = "C:/path/to/your/dev/config.py"
# On Linux/macOS
export PSI_CONFIG="/path/to/your/dev/config.py"
Then, initialize your development folders:
psi-config create --base-directory ./dev_root
psi-config create-folders
Running Tests
Tests are written using pytest. To run the full test suite:
pytest tests
Building Documentation
Documentation is built using Sphinx. To generate the HTML version:
cd docs
make html
The output will be located in docs/build/html.
Updating API Documentation
To regenerate the API reference files from the source code:
cd docs
sphinx-apidoc ../psi -o source/api
Contributing
Branching: Create a new feature branch for your changes.
Coding Standards: Follow PEP 8 and ensure all new Enaml code follows the declarative patterns established in the core plugins.
Tests: Include new tests for any features or bug fixes.
Pull Requests: Submit a PR to the main repository for review.