Skip to content

Commit

Permalink
Remove an unused nesting level
Browse files Browse the repository at this point in the history
  • Loading branch information
jlorieau committed Aug 5, 2023
1 parent b15ef3b commit e4b76ea
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 81 deletions.
83 changes: 40 additions & 43 deletions .geomancy.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,42 @@
checks:
desc: Check for the local development environment
Executables:
Python3:
desc: Python version >=3.11 needed (https://www.python.org)
checkExec: python3 >= 3.11
Task:
desc: Task runner and build tool (Taskfile.yaml)
checkExec: task >= 3
Sphinx:
desc: Documentation building tool (https://www.sphinx-doc.org/en/master/)
checkExec: sphinx-build >= 6.2
Towncrier:
desc: Changelog building tool (https://pypi.org/project/towncrier/)
checkExec: towncrier >= 23
Twine:
desc: Build and upload packages on PyPI (https://pypi.org/project/twine/)
checkExec: twine >= 4
Pytest:
desc: Test python packages (https://github.com/pytest-dev/pytest)
checkExec: pytest >= 7
Black:
desc: Python code formatter (https://github.com/psf/black)
checkExec: black >= 23

Executables:
Python3:
desc: Python version >=3.11 needed (https://www.python.org)
checkExec: python3 >= 3.11
Task:
desc: Task runner and build tool (Taskfile.yaml)
checkExec: task >= 3
Sphinx:
desc: Documentation building tool (https://www.sphinx-doc.org/en/master/)
checkExec: sphinx-build >= 6.2
Towncrier:
desc: Changelog building tool (https://pypi.org/project/towncrier/)
checkExec: towncrier >= 23
Twine:
desc: Build and upload packages on PyPI (https://pypi.org/project/twine/)
checkExec: twine >= 4
Pytest:
desc: Test python packages (https://github.com/pytest-dev/pytest)
checkExec: pytest >= 7
Black:
desc: Python code formatter (https://github.com/psf/black)
checkExec: black >= 23
Paths:
GeomancyYaml:
desc: Check development requirements
checkPath: .geomancy.yaml
type: file

Paths:
GeomancyYaml:
desc: Check development requirements
checkPath: .geomancy.yaml
type: file

PythonPackages: # This section is redundant with pyproject.toml
PyYaml:
desc: YAML parser for Python (https://pypi.org/project/PyYAML/)
checkPythonPkg: pyyaml >= 6.0
Click:
desc: Command-line interface tool (https://pypi.org/project/click/)
checkPythonPkg: click >= 8.1
ClickDefaultGroup:
desc: Allow default commands for click (https://pypi.org/project/click-default-group/)
checkPythonPkg: click-default-group
Rich:
desc: CLI terminal renderer (https://pypi.org/project/rich/)
checkPythonPkg: rich >= 13
PythonPackages: # This section is redundant with pyproject.toml
PyYaml:
desc: YAML parser for Python (https://pypi.org/project/PyYAML/)
checkPythonPkg: pyyaml >= 6.0
Click:
desc: Command-line interface tool (https://pypi.org/project/click/)
checkPythonPkg: click >= 8.1
ClickDefaultGroup:
desc: Allow default commands for click (https://pypi.org/project/click-default-group/)
checkPythonPkg: click-default-group
Rich:
desc: CLI terminal renderer (https://pypi.org/project/rich/)
checkPythonPkg: rich >= 13
74 changes: 36 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,49 +355,47 @@ AWS:
for an example of all checks.
```yaml
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
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
```
2. Use ``geo`` to run the checks.
```shell
[✔] test.yaml...passed
[✔] checks...passed
[✔] Environment...passed
[✔] Check environment variable '$USER'...passed
[✔] Paths...passed
[✔] Check path 'examples/geomancy.toml'...passed
[✔] Check path 'examples/pyproject.toml'...passed
[✔] Executables...passed
[✔] Check executable 'python3>=3.11'...passed
================================= 9 passed in 0.51s ==================================
[✔] test.yaml...passed
[✔] Environment...passed
[✔] Check environment variable '$USER'...passed
[✔] Paths...passed
[✔] Check path 'examples/geomancy.toml'...passed
[✔] Check path 'examples/pyproject.toml'...passed
[✔] Executables...passed
[✔] Check executable 'python3>=3.11'...passed
================================= 8 passed in 0.50s ==================================
```

(By default, ``geomancy`` will search ``.geomancy.y[a]ml``, ``geomancy.y[a]ml``
Expand Down

0 comments on commit e4b76ea

Please sign in to comment.