Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/incognito/python-architecture-linter-demo
Demo of python-architecture-linter using a definition and CLI
https://github.com/incognito/python-architecture-linter-demo
Last synced: 9 days ago
JSON representation
Demo of python-architecture-linter using a definition and CLI
- Host: GitHub
- URL: https://github.com/incognito/python-architecture-linter-demo
- Owner: Incognito
- License: mit
- Created: 2021-07-04T15:29:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-08T00:00:08.000Z (over 1 year ago)
- Last Synced: 2023-03-11T22:37:40.993Z (over 1 year ago)
- Language: Python
- Size: 55.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Example of how to integrate an architecture definition with the
python-architecture-linter CLI in a demo project.For the Python Architecture Linter's core repo, CLI, and the architecture definition used, please check the monorepo https://github.com/Incognito/python-architecture-linter
# Relevant information
For people who want to learn how to use this tool-chain
`cli.py`, `pyproject.toml`, and `.github/workflows/main.yml` show you everything you need to run the command:
1. How to run the tooling in a CI system
2. How to install project dependencies
3. How to create the command-line for your project.You can ignore everything inside the `demo_project` folder, it's just so the CLI tool has something to inspect.
# Example output
It is integrated into the CI pipeline of this project so you can always see a build under the `demo-linter-usage` job on github actions.
https://github.com/Incognito/python-architecture-linter-demo/actions/workflows/main.yml
This is the original example (may be somewhat outdated, this project receives automatic updates via dependabot):
https://github.com/Incognito/python-architecture-linter-demo/runs/2984073903?check_suite_focus=true
```
Run poetry run python cli.py . --show-success=1
poetry run python cli.py . --show-success=1
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.9.5/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.5/x64/lib
must_only_have_provider_in_module_root
.
No issues foundpython_architecture_linter.ast_validators.nodeng_validator.validate_node_children_exclusive_allow_list
/home/runner/work/python-architecture-linter-demo/python-architecture-linter-demo/demo_project/module_runtime/provider.py:0
No issues foundpython_architecture_linter.ast_validators.class_validators.class_name_suffix_validator
/home/runner/work/python-architecture-linter-demo/python-architecture-linter-demo/demo_project/module_runtime/provider.py:9
No issues foundpython_architecture_linter.ast_validators.function_validators.method_name_prefix_validator
/home/runner/work/python-architecture-linter-demo/python-architecture-linter-demo/demo_project/module_runtime/provider.py:10
No issues found...
```