OPERA Calibration for DISP, a SAS repository. Calibration workflows for OPERA DISP products.
Creates the science application software (SAS) using the Venti library.
- Download source code:
git clone https://github.com/opera-adt/venti.git
git clone https://github.com/opera-adt/cal-disp.git- Install dependencies, either to a new environment:
mamba env create --name my-cal-env --file cal-disp/conda-env.yml
conda activate my-cal-envor install within your existing env with mamba.
- Install
ventiandcal-dispvia pip in editable mode
python -m pip install --no-deps -e venti/ cal-disp/We use pre-commit to automatically run linting, formatting, and mypy type checking.
Additionally, we follow numpydoc conventions for docstrings.
To install pre-commit locally, run:
pre-commit installThis adds a pre-commit hooks so that linting/formatting is done automatically. If code does not pass the checks, you will be prompted to fix it before committing.
Remember to re-add any files you want to commit which have been altered by pre-commit. You can do this by re-running git add on the files.
Since we use black for formatting and flake8 for linting, it can be helpful to install these plugins into your editor so that code gets formatted and linted as you save.
After making functional changes and/or have added new tests, you should run pytest to check that everything is working as expected.
First, install the extra test dependencies:
python -m pip install --no-deps -e .[test]Then run the tests:
pytestTo build the docker image, run:
./docker/build-docker-image.sh --tag my-tagwhich will print out instructions for running the image.