This is a Kedro project for bioimage analysis, which was generated using Kedro 0.16.6
.
- install miniconda from https://docs.conda.io/en/latest/miniconda.html
- Create a new Python virtual environment, called kedro-environment, using conda
conda create --name kedro-bioimage python=3.7 -y
- This will create an isolated Python 3.7 environment. To activate it:
conda activate kedro-bioimage
- Install dependencies with pip (and install numpy with conda for Windows)
pip install -r src/requirements.txt --user conda install numpy
- Remove scopyon example directory
rm -rf src/scopyon/examples
In order to get the best out of the template:
- Don't remove any lines from the
.gitignore
file we provide - Make sure your results can be reproduced by following a data engineering convention
- Don't commit data to your repository
- Don't commit any credentials or your local configuration to your repository. Keep all your credentials and local configuration in
conf/local/
You can run your Kedro project with:
kedro run
Have a look at the file src/tests/test_run.py
for instructions on how to write your tests. You can run your tests as follows:
kedro test
To configure the coverage threshold, go to the .coveragerc
file.
If you'd like to update your project requirements, please update src/requirements.in
and re-run kedro build-reqs
.
DO NOT UPDATE src/requirements.txt
manually, if you do not understand what this will effect
kedro build-reqs
To install new added packages,
kedro install
Further information about project dependencies
Note: Using
kedro jupyter
orkedro ipython
to run your notebook provides these variables in scope:context
,catalog
, andstartup_error
.Jupyter, JupyterLab, and IPython are already included in the project requirements by default, so once you have run
kedro install
you will not need to take any extra steps before you use them.
You can start a local notebook server:
kedro jupyter notebook
You can also start JupyterLab:
kedro jupyter lab
And if you want to run an IPython session:
kedro ipython
You can move notebook code over into a Kedro project structure using a mixture of cell tagging and Kedro CLI commands.
By adding the node
tag to a cell and running the command below, the cell's source code will be copied over to a Python file within src/<package_name>/nodes/
:
kedro jupyter convert <filepath_to_my_notebook>
Note: The name of the Python file matches the name of the original notebook.
Alternatively, you may want to transform all your notebooks in one go. Run the following command to convert all notebook files found in the project root directory and under any of its sub-folders:
kedro jupyter convert --all
To automatically strip out all output cell contents before committing to git
, you can run kedro activate-nbstripout
. This will add a hook in .git/config
which will run nbstripout
before anything is committed to git
.
Note: Your output cells will be retained locally.
Further information about building project documentation and packaging your project