diff --git a/environment.yml b/environment.yml index e298423..dcd5a5b 100644 --- a/environment.yml +++ b/environment.yml @@ -21,4 +21,5 @@ dependencies: - pip - pip: - pyscaffold - - sphinx_rtd_theme # to build docs locally + - sphinx_rtd_theme # to build docs locally + - -e .[testing] # install git checkout of PyScaffold in editable mode diff --git a/src/pyscaffoldext/dsproject/templates/environment_yml.template b/src/pyscaffoldext/dsproject/templates/environment_yml.template index c739228..cc09463 100644 --- a/src/pyscaffoldext/dsproject/templates/environment_yml.template +++ b/src/pyscaffoldext/dsproject/templates/environment_yml.template @@ -21,8 +21,10 @@ dependencies: - pytorch - yellowbrick - pip: + - -e .[testing] # install git checkout of ${name} in editable mode # add here only pip-packages that are not available in conda/conda-forge! E.g.: - optuna + # for development only (could also be kept in a separate environment file) - jupyterlab - pytest diff --git a/src/pyscaffoldext/dsproject/templates/readme_md.template b/src/pyscaffoldext/dsproject/templates/readme_md.template index b148887..0a6275e 100644 --- a/src/pyscaffoldext/dsproject/templates/readme_md.template +++ b/src/pyscaffoldext/dsproject/templates/readme_md.template @@ -18,23 +18,23 @@ In order to set up the necessary environment: ``` conda activate ${name} ``` -3. install `${name}` with: - ``` - python setup.py install # or `develop` - ``` + +> **_NOTE:_** The conda environment will have ${name} installed in editable mode. +> Some changes, e.g. in `setup.cfg`, might require you to run `pip install -e .` again. + Optional and needed only once after `git clone`: -4. install several [pre-commit] git hooks with: - ``` +3. install several [pre-commit] git hooks with: + ```bash pre-commit install # You might also want to run `pre-commit autoupdate` ``` and checkout the configuration under `.pre-commit-config.yaml`. The `-n, --no-verify` flag of `git commit` can be used to deactivate pre-commit hooks temporarily. -5. install [nbstripout] git hooks to remove the output cells of committed notebooks with: - ``` +4. install [nbstripout] git hooks to remove the output cells of committed notebooks with: + ```bash nbstripout --install --attributes notebooks/.gitattributes ``` This is useful to avoid large diffs due to plots in your notebooks. @@ -49,12 +49,12 @@ Then take a look into the `scripts` and `notebooks` folders. in `setup.cfg` if you want to ship and install your package via `pip` later on. 2. Create concrete dependencies as `environment.lock.yml` for the exact reproduction of your environment with: - ``` + ```bash conda env export -n ${name} -f environment.lock.yml ``` For multi-OS development, consider using `--no-builds` during the export. 3. Update your current environment with respect to a new `environment.lock.yml` using: - ``` + ```bash conda env update -f environment.lock.yml --prune ``` ## Project Organization