This is a monorepo housing all of the python open-gis tools.
./lib
and ./packages
Both ./lib
and ./packages
contain pep8-compliant python packages.
./lib
is for anything that can be shared between tools./packages
is for the tools themselves. They cannot depend on one another. If you find that your tools have code they need to share you can either pull it into the ./lib/commons
package or, if there's enough code, create a new ./lib/whatever
package.
We're pretty much using the Gitflow Workflow
dev
and not master
.master
... carefully and after lots of testing.Philip Bailey - 12 Jul 2023
The recommended Python setup involves a single .venv
in created in the repo root folder. This venv is shared among all the packages (RSContext, VBET etc).
Each package has its own workspace. And these "package workspaces" do not include the root folder that contains the .venv. Therefore, when working in a package workspace Visual Studio Code can't find the root .venv.
We overcome this (on OSX) by creating a sym link to the root .venv inside each package workspace using the following command.
ln -s ../../.venv .
Then inside the package workspace you can do the following to point the workspace at this sym link (which links back to the one and only root .venv):
This workflow needs to be repeated for each riverscapes tools package.
If you are working inside a Github codespace there is no need for any kind of bootstrapping or .venv
or even .env
files.
The data dir cor codespaces is set to /workspaces/data
. This folder is shared between all users of this codespace.
You can open a window to the data by typing code /workspaces/data/
.
From there files can be dragged into the vscode window to upload them to the codespace. To download files or folders right click on them and select "Download".
You may wish to use projects downloaded from the Riverscapes Warehouse. This codespace comes complete with rscli
installed.
To download projects you must know: The project id from the warehouse, the HUC and the project type.
rscli download --id XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX /workspaces/data/rs_context/17060304
A browser window should pop open to allow you to authenticate your Riverscapes Warehouse account. Once authenticated the project will be downloaded to the data folder.
Make sure you use the folder name that matches what this tool expects for the project type and huc number.