Update CoastSeg¶
Use this guide to update CoastSeg in the environment you already use:
- Conda install
- Pip install
- Pixi install
- Local git clone
If you are not sure which method you used, check the commands you normally run to start CoastSeg:
conda activate coastsegusually means a Conda environmentpip install coastsegusually means a pip environmentpixi shellmeans a Pixi environment backed by your local git clone
Note
Pixi installs CoastSeg from your local git clone. If you use Pixi, updating the git clone is part of updating CoastSeg.
Before You Start¶
- Open a terminal.
- If you use Conda or Miniforge, make sure Conda is available in that terminal.
- Decide what you want to update:
- Only the installed CoastSeg package
- Your local CoastSeg git clone
- Both the package and the git clone
Choose Your Update Path¶
| If you installed CoastSeg with... | Update this way | Also update your git clone? |
|---|---|---|
conda install coastseg |
Update a Conda Environment | Only if you also work from a local clone |
pip install coastseg |
Update a Pip Environment | Only if you also work from a local clone |
pixi shell |
Update a Pixi Environment | Yes. Pixi uses your local clone |
git clone ...CoastSeg.git |
Update a Git Clone | Yes |
Update a Git Clone¶
Use this section if you want the latest notebooks, scripts, docs, or source code from GitHub.
This is required for Pixi installs and optional for Conda or pip installs.
Go to your CoastSeg clone
1 | |
Check that origin points to the CoastSeg repository
1 | |
You should see something like:
1 2 | |
If origin is missing, add it:
1 | |
Check for local changes
1 | |
If Git says your working tree is clean, pull the latest changes:
1 | |
If git pull fails because you changed local files
If you want to keep your local changes, stash them first:
1 2 | |
(OPTIONAL) If you want to keep your local changes, stash them first, then retrieve them from the stash.
1 | |
🎉 You're done!
Last resort: force your clone to match GitHub
Only use this if you want to discard local changes in the clone.
Warning
This will discard local changes in the clone. If you want to keep anything, copy it somewhere safe first. This is especially important for files like certifications.json or any notebooks, scripts, or settings you edited locally.
1 2 | |
Update a Conda Environment¶
Use this section if you installed CoastSeg from Conda or conda-forge.
Activate the environment
1 | |
Update to the latest CoastSeg version
1 | |
Install a specific CoastSeg version
Replace <version> with the version you want, for example 1.2.3.
1 | |
Verify the update
1 | |
Update a Pip Environment¶
Use this section if you installed CoastSeg with pip install coastseg.
Activate the environment
If you use Conda to manage the Python environment, activate it first:
1 | |
If you use a virtual environment instead, activate that environment before running pip.
Update to the latest CoastSeg version
1 | |
Install a specific CoastSeg version
Replace <version> with the version you want, for example 1.1.26.
1 | |
About pip dependency warnings
You may see a message like this during the update:
1 | |
This warning is common in older Python environments. If CoastSeg imports correctly after the update, the installation may still be usable.
Verify the update
1 | |
Update a Pixi Environment¶
Use this section if you start CoastSeg with pixi shell.
Warning
Do not run pip install or conda install inside a Pixi environment.
- Pixi installs CoastSeg from your local git clone
- Updating the clone is part of updating CoastSeg
- Pixi environments should be updated with
git pull,pixi install, andpixi shell
Go to your CoastSeg clone
1 | |
Make sure this folder contains pyproject.toml and pixi.lock.
Pull the latest code
1 | |
If your clone uses a different default branch, replace main with that branch name.
Refresh the Pixi environment
For the default environment:
1 2 | |
If you use the zoo workflow or another named Pixi environment, activate that environment after the install:
1 2 | |
Verify the update
1 | |
If the Pixi environment looks broken
If you previously ran pip install or conda install inside the Pixi environment and now get import errors, rebuild it from the repo root:
1 2 | |
If that still does not fix the issue, remove the .pixi folder and recreate the environment:
1 | |
Recommended Update Workflows¶
I installed CoastSeg with Conda
1 2 3 | |
I installed CoastSeg with pip
1 2 3 | |
I installed CoastSeg with Pixi
1 2 3 4 5 | |
I only want the latest notebooks and source code from GitHub
1 2 | |
Verify Everything Worked¶
These checks are usually enough:
1 2 | |
Expected git output after a successful clone update:
1 2 | |
If you still have update problems after following the matching section above, re-check that you updated the same environment you actually use to run CoastSeg.