Skip to content

Commit

Permalink
Enable SalishSeaTools editable install in dev env (#119)
Browse files Browse the repository at this point in the history
Updated `environment-dev.yaml` to include editable installation of
SalishSeaTools during environment creation. Adjusted installation and
development documentation to reflect this change and clarify the benefits of
editable mode for synchronized package updates.
  • Loading branch information
douglatornell authored Dec 24, 2024
1 parent e1dafa6 commit 3f81db7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
10 changes: 7 additions & 3 deletions SalishSeaTools/docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ Development Environment

Setting up an isolated development environment using `Conda`_ is recommended.
Assuming that you have `Miniconda`_ installed,
you can create and activate an environment called :kbd:`salishsea-tools` that will have all of the Python packages necessary for development,
you can create and activate an environment called :kbd:`salishsea-tools` that will have
all of the Python packages necessary for development,
testing,
and building the documentation with the commands:

Expand All @@ -71,10 +72,13 @@ and building the documentation with the commands:
$ cd tools
$ conda env create -f SalishSeaTools/envs/environment-dev.yaml
$ conda activate salishsea-tools
(salishsea-tools)$ pip install --editable SalishSeaTools
The :kbd:`--editable` option in the :command:`pip install` commands above installs the :kbd:`SalishSeaTools` from the cloned repo via symlinks so that it will be automatically updated as the repos evolve.
:kbd:`SalishSeaTools` is installed in `editable install mode`_ as part of the conda environment
creation process.
That means that the package is installed from the cloned repo via symlinks so that
it will be automatically updated as the repo evolves.

.. _editable install mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
To deactivate the environment use:

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion SalishSeaTools/docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To install the :kbd:`SalishSeaTools` package in your :kbd:`root` Anaconda or Min
.. code-block:: bash
$ cd tools
$ pip install --editable SalishSeaTools
$ python -m pip install --editable SalishSeaTools
The :kbd:`--editable` option in the :command:`pip install` commands installs the packages via symlinks so that changes in the package modules will be automatically available in your working environment as the repo evolves.

Expand Down
4 changes: 3 additions & 1 deletion SalishSeaTools/envs/environment-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# $ cd tools
# $ conda env create -f SalishSeaTools/envs/environment-dev.yaml
# $ conda activate salishsea-tools
# (salishsea-tools)$ python -m pip install --editable SalishSeaTools
#
# See the envs/requirements.txt file for an exhaustive list of all the
# packages installed in the environment and their versions used in
Expand Down Expand Up @@ -58,3 +57,6 @@ dependencies:

- pip:
- angles

# Install the SalishSeaTools packages in editable mode
- --editable ../

0 comments on commit 3f81db7

Please sign in to comment.