Development
If you are developing or want to contribute to Solosis, please read this page.
Log-in to Farm
If you haven’t already, create a directory for your Git repository in your home directory.
Ensure you are in your home directory
pwd
/nfs/users/nfs_l/<USER>
Then create the directory
mkdir repos
cd repos/
Clone the solosis git repository
git clone git@github.com:haniffalab/solosis.git
cd solosis
Export environment variables
export export LSB_DEFAULT_USERGROUP=<USERGROUP>
export TEAM_DATA_DIR=/lustre/scratch126/cellgen/team298/data
export TEAM_LOGS_DIR=/lustre/scratch126/cellgen/team298/logs
Set-up new git branch
Check which branch you’re currently in
git status
On branch dev
Your branch is up-to-date with 'origin/dev'.
Move to dev branch
git checkout dev
Create a new branch (off dev branch) to begin contributing. More info here
git checkout -b <new-branch>
For information on Naming nomenclature of git branches view this page
Executing solosis commands
Executing solosis commands while developing need to solosis-cli to be as follows:
./solosis-cli
Committing changes to dev branch
Run the following commands:
git add .
git commit -m "ADD MESSAGE HERE"
git push
Once changes are complete, create Pull Request to merge changes to dev.
pytest
Create and activate the virtual environment
python -m venv .venv
source .venv/bin/activate
Install dev dependencies and install pre-commit hooks
pip install --upgrade pip
python -m pip install -r envs/requirements.txt
python -m pip install -r envs/dev-requirements.txt
python -m pip install -r envs/doc-requirements.txt
pre-commit install
Run Solosis in development mode
python -m solosis.cli
The pre-commit config includes black
formatting and isort
are implemented.
You can manually check black
formatting and isort
as follows:
black path/to/file.py
isort path/to/file.py
Python testing
Set the PYTHONPATH
environment variable to the bin
directory where the scripts are stored, and then run the following command:
python -m pytest -q tests/test_cli.py