Skip to main content

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.

Documentation

If you want to download it directly, here is the link :

Download

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 .py extension.
  • architecture : Checks folder and file placement consistency.
  • format : Directly modifies file formatting.
  • files_content : Inspects file contents.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

norminette_prune-1.0.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

norminette_prune-1.0.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

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

Hashes for norminette_prune-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8a7da2c92d1cb05a5f80f36c35d291484288a130bfb14be1d8f9b10c1c481cc6
MD5 6d053d4ecb0d564d18c656cbf0f9f001
BLAKE2b-256 e02f0308292a43de72ca89dfe36b3be5ba8bad89df623a94baad84a58b8f6b8b

See more details on using hashes here.

File details

Details for the file norminette_prune-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for norminette_prune-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c3a16293531c63f1d3de1bc13fc881461a2c9497d269fdfa6a2ca02c27be870
MD5 29d6dcc359af67d36bb7a670cd9fe93c
BLAKE2b-256 9a3a3c38c8d48ec97c77c284cf22826648d2840956521212d6ad7fa1d5e8b1bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page