A tool to ensure that code adheres to Prune's coding standards.
Project description
Prune's Norminette
What is it for?
The norminette automatically checks the organization of files in a Django project as well as code rules. This allows for the same code standard between projects and makes it easier to navigate.
Prerequisites
- To be installed on a Prune Django project that uses poetry or UV
UV project
Installation
Run the following command in the console:
uv add norminette_prune
Running the norminette
To run the package, simply enter in the console :
norminette_prune
Updating the norminette
Don't hesitate to run uv sync --upgrade sometimes, the norminette evolves with time and our practices!
Poetry project
Installation
Run the following command :
poetry add norminette_prune
Running the norminette
poetry run norminette_prune
Updating the norminette
Don't hesitate to run poetry update sometimes, the norminette evolves with time and our practices!
Project architecture at Prune
To access the documentation, please go to the link where you can find documentation in English and French.
If you want to download it directly, here is the link :
Rules
| Id | Name | Description | Tags |
|---|---|---|---|
| 01 | name_view_function | Verify that the name of rendering functions for views ends with '_view'. | python_files files_content |
| 02 | verify_pages_folder | Verify if page.html files are inside the pages/ folder and ensure files in pages/ are named page (except in components, sections, and layouts folders). |
web_files architecture |
| 03 | verify_structure_templates_static | Verify that the static/ and templates/ folders contain only one subfolder named after the app. |
architecture |
| 04 | double_line | Remove double empty lines in HTML, JS, and CSS files. | format files_content web_files |
| 05 | space_tag | Normalize spaces in Django tags (with exactly one space between the tag and its content). | format web_files files_content |
| 06 | component_layout_emplacement | Verify that layout, component, and section files are correctly placed based on their include references. |
web_files architecture |
| 07 | include_svg | Ensure that SVG includes use absolute paths. | web_files files_content |
| 08 | svg | Verify that SVG files are inside the svg/ folder and use the .html extension. |
web_files architecture |
Tags
- web_files : HTML, JS, and CSS files.
- python_files : Python files with
.pyextension. - architecture : Checks folder and file placement consistency.
- format : Directly modifies file formatting.
- files_content : Inspects file contents.
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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file norminette_prune-1.0.0.tar.gz.
File metadata
- Download URL: norminette_prune-1.0.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.31
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a7da2c92d1cb05a5f80f36c35d291484288a130bfb14be1d8f9b10c1c481cc6
|
|
| MD5 |
6d053d4ecb0d564d18c656cbf0f9f001
|
|
| BLAKE2b-256 |
e02f0308292a43de72ca89dfe36b3be5ba8bad89df623a94baad84a58b8f6b8b
|
File details
Details for the file norminette_prune-1.0.0-py3-none-any.whl.
File metadata
- Download URL: norminette_prune-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.31
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c3a16293531c63f1d3de1bc13fc881461a2c9497d269fdfa6a2ca02c27be870
|
|
| MD5 |
29d6dcc359af67d36bb7a670cd9fe93c
|
|
| BLAKE2b-256 |
9a3a3c38c8d48ec97c77c284cf22826648d2840956521212d6ad7fa1d5e8b1bc
|