Geomancy validates deployment and development environments
Project description
The geomancy
tool makes it easy to check and validate environments, such
as development, testing and production.
Environment checks and tests are helpful for testing the correct setting of environment variables, the installation and versions of installed executables, the state of external dependencies, like LaTeX packages, or cloud resources, or for checking environments that use the 12-factor principles.
Quickstart
-
Create a
.geomancy.yaml
file with checks.checks: Environment: desc: Check environment variables common to all development environments Username: desc: The current username checkEnv: "$USER" regex: "[a-z_][a-z0-9_-]*[$]?" Paths: desc: Checks the existence of needed files and directories subchecks: any # at least one of the files must be present Geomancy: desc: Check for the 'geomancy.toml' file checkPath: examples/geomancy.toml type: file Pyproject: desc: Check for 'pyproject.toml' file checkPath: examples/pyproject.toml type: file Executables: desc: Check the availability of commands and their versions Python: desc: Python interpreter ver 3.11 or higher checkExec: python3>=3.11
-
Use
geo
to run the checks.$ geo =============================== .geomancy.toml ================================ checks (9 checks) [✔] Environment (1 checks) [✔] Check environment variable '$USER'...passed [✔] Paths (2 checks) [✔] Check path 'examples/geomancy.toml'...passed [✔] Check path 'examples/pyproject.toml'...passed [✔] Executables (1 checks) [✔] Check executable 'python3>=3.11'...passed ========================== PASSED. 8 checks in 0.01s =========================
(By default,
geomancy
will search.geomancy.y[a]ml
,geomancy.y[a]ml
.geomancy.toml
,geomancy.toml
andpyproject.toml
.)
Features
Geomancy checks include:
- Environment variables are properly set and, optionally, check that they have valid values with regular expressions (checkEnv)
- Paths exist and whether they're files or directories (checkPath)
- Executables are available and, optionally, have the minimum or correct versions (checkExec)
- Python packages are available and, optionally, have the minimum or correct versions (checkPythonPkg)
- Group checks to nested groups of checks with conditional (all or any) pass criteria (groups of checks)
Additionally, geomancy can:
- Load environment files for checks or for running shell commands
- Substitute environment variables in check values e.g.:
checkPath: {HOME}/.geomancy.toml
- Load checks in multiple formats including yaml
(e.g.
.geomancy.yaml
) or in toml (e.g..geomancy.toml
orpyproject.toml
)
Documentation
For full documentation please see https://geomancy.readthedocs.io/en/latest.
Bugs or Requests
Please use the GitHub issue tracker to submit bugs or request features.
License
Copyright Justin Lorieau and others, 2023.
Distributed under the terms of the MIT license. geomancy is free and open source software.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.