Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable SalishSeaTools editable install in dev env #119

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ../
Loading