Installation¶
Requirements¶
- Python 3.11 or newer (3.12 recommended with PySpark 3.5).
- Git.
- For PySpark projects: Java 17 and PySpark (local runs and tests; the cluster has its own).
Install archvow¶
archvow is distributed as a wheel. Publish it once on your internal package index; then everyone installs it like any package:
python3 -m pip install archvow==1.23.0 # from your internal index
python3 -m pip install archvow-1.23.0-py3-none-any.whl # or from the wheel file itself
archvow --version # archvow 1.23.0
Use python3 -m pip (or python3.12 -m pip) rather than a bare pip, so archvow is
installed for the Python you actually use.
From the source (archvow developers)¶
git clone <archvow repository> && cd archvow
python3 -m pip install -e ".[dev]" # archvow + pytest, ruff, hypothesis, pyspark (spark-submit)
python3 -m pytest -q # all tests (about 7 minutes; the Spark scenario needs Java 11 or 17 and the venv's bin on PATH)
python3 -m pip wheel . --no-deps -w dist # builds dist/archvow-<version>-py3-none-any.whl
Tab completion (zsh, bash, PowerShell)¶
Once, in the shell you use:
archvow completion zsh --install # zsh, the macOS default
archvow completion bash --install # bash (Linux; on macOS it goes to ~/.bash_profile)
archvow completion powershell --install # PowerShell (Windows, macOS, Linux)
It writes the script to one file in your home folder (~/.archvow-completion.zsh, .bash or
.ps1) and adds one line that loads it to the shell's startup file (~/.zshrc, ~/.bashrc or
~/.bash_profile, $PROFILE), once - run it again, nothing changes. The file keeps working when
archvow is installed in a virtual environment that is not active yet when the shell starts: Tab
then runs the archvow of the Python that installed it. archvow completion zsh without
--install only prints the script.
Open a new terminal; then Tab completes commands (archvow sp -> specify), options, and the
project's own names - its components, then their hazards H1 and invariants INV1, R1, open questions (decision make
clean_sales <Tab>), safety questions and severities, columns, kinds (-k), briefs and their
sections (--from), and init answers (-a mode=<Tab>).
In ~/.zshrc the line works anywhere, before or after compinit (oh-my-zsh included): it
registers again at the first prompt, once the file has run.
Windows¶
archvow runs on Windows 10 and 11, with the python.org Python, in PowerShell, Windows Terminal
or cmd. Where these pages say python3, Windows says py (py -m pip install ...).
- Colours: shown when the console accepts them (Windows 10 and later), otherwise plain text.
- Typing an answer: the console edits the line itself (arrows, Home/End, Up for earlier
lines). Enter takes the suggestion; Tab does not put it in the line (that needs
readline, which Windows has not). - Files: archvow writes every file in UTF-8 with LF line endings, like on Linux and macOS, so a Windows developer and a Linux one get the same vows, byte for byte.
- Scripts:
initadds a.gitattributesthat keeps*.shand.githooks/*in LF even with Git'score.autocrlf, and stages them as executable, so CI and the cluster (Linux) can run them. - The Git hook runs with Git for Windows' own
sh: nothing to install. ./entrypoint.shandmake: run them in Git Bash or WSL. The cluster runs them on Linux.
In a project¶
A project created by archvow pins the version that created it, in its development
requirements (requirements.txt: archvow==1.23.0) and in its CI. Developers install the
project's tools in one command:
python3 -m pip install -r requirements.txt # or: make install
git config core.hooksPath .githooks # once per clone: the checks before each commit
archvow doctor # checks the setup, with the fix for each problem
archvow doctor checks Python, the archvow command and its version (the one the project
pins), Git and the hook, the project's template, and the template's own tools (for PySpark:
Java, PySpark, ruff, pytest, Hypothesis). Each problem comes with the command that fixes it.
The pin makes every engine upgrade a deliberate, reviewed change (see Project management).
Critical projects: no public sources¶
archvow check makes no network call. The generated files can be made equally closed:
init answer |
Effect |
|---|---|
-a git_hooks=githooks (default) |
a plain Git hook script: no extra tool, nothing downloaded |
-a ci_image=registry.acme.local/data/python-spark:3.12 |
CI runs in your internal image (Python, Java 17, git): no public image, no apt-get |
-a pip_index_url=https://nexus.acme.local/repository/pypi/simple |
CI installs from your internal index only |
Without them, the generated CI file starts with a warning naming the public sources it uses. A company template sets these once for every project.
Uninstall¶
python3 -m pip uninstall archvow
Nothing else is installed on the machine. A project keeps its .archvow/ folder and its
generated files: they are plain files, committed in Git.
If something goes wrong (archvow: command not found, ModuleNotFoundError), run
archvow doctor (or python3 -m archvow doctor), then see
Troubleshooting.