Development
uv venv && uv pip install -e '.[tui,server,dev]'
pytest
ruff check src tests
pytest runs a worker per core (pytest-xdist; pytest -n 0 is one
process), and a test that drives the terminal app through Textual's pilot
gets one more go if it fails, since those wait on the app's own timing
(tests/conftest.py). On GitHub the same suite runs on four workers, on
SQLite and on PostgreSQL, for every pull request, every push to main and
every tag; a branch is not tested on its own pushes.
Running the checkout
The cloudmorrow on your PATH is the installed client, in its own venv: it does
not change when the source does, only when there is a release and an update.
To run what you are working on instead, stand in the checkout and say so:
cd ~/Projects/cloudmorrow
cloudmorrow --dev # the TUI, from source
cloudmorrow --dev note list # any other command, the same way
It is the directory that decides — anywhere inside the checkout will do, and
anywhere else the flag says it has nothing to point at. The command is handed
to the checkout's own venv if it has one, with src ahead of whatever is
installed; nothing is copied and nothing is installed, so the next run is
whatever the files say then. The TUI wears a dev badge beside its name while
it is the checkout you are looking at, and cloudmorrow --dev version says where
it is running from.
It is still the real server: --dev changes which code runs, not which API it
talks to, and it reads the same config and token as usual. For a TUI change
that is the point — no deploy to wait for. Point it somewhere else when you
need to:
CLOUDMORROW_API_URL=http://localhost:8787 cloudmorrow --dev
CLOUDMORROW_CONFIG_DIR=~/.config/cloudmorrow-dev cloudmorrow --dev # its own login
A server of your own
# a server against a scratch directory
CLOUDMORROW_NOTES_DIR=/tmp/notes CLOUDMORROW_DATA_DIR=/tmp/cloudmorrow-data \
cloudmorrow-server user create dev
CLOUDMORROW_NOTES_DIR=/tmp/notes CLOUDMORROW_DATA_DIR=/tmp/cloudmorrow-data \
cloudmorrow-server serve --port 8787 --reload
From docs/MANUAL.md in the Cloudmorrow repository. Something wrong? A pull request there fixes it here.