Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation] info sur le setup de pre-commit #972

Merged
merged 4 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@

Voici un tableau explicatif de la nomenclature utilisée dans le code (par rapport à l'application)

|Dans le métier|Dans le code|
|--------------|------------|
|Appel d'offres|Tender |
|Demande de devis|Quote |
|Sourcing |Project |
|Liste de favoris|Favorite list|
|Structure |Siae |
|Utilisateur |User|
|Réseau |Network|
|Demande de rattachement|User request|
|Prestation |Offer|
|Référence client|Client reference|
|Label & certification|Label|
|Secteur d'activité|Sector|
|Groupe de secteurs d'activité|Sector group|
|Périmètre|Perimeter|
|Dans le métier |Dans le code |
|-----------------------------|----------------|
|Appel d'offres |Tender |
|Demande de devis |Quote |
|Sourcing |Project |
|Liste de favoris |Favorite list |
|Structure |Siae |
|Utilisateur |User |
|Réseau |Network |
|Demande de rattachement |User request |
|Prestation |Offer |
|Référence client |Client reference|
|Label & certification |Label |
|Secteur d'activité |Sector |
|Groupe de secteurs d'activité|Sector group |
|Périmètre |Perimeter |

## Installation

Expand Down Expand Up @@ -103,7 +103,6 @@ Après création du fichier `env.docker.local` :

# Effacement complet des images dockers
> ./scripts/delete_docker.sh

```

#### Lancement Dockerfile
Expand Down Expand Up @@ -173,6 +172,13 @@ Le repo suit le workflow [par branche de fonctionnalité](https://www.atlassian.

### Qualité du code

Mettre en place le `pre-commit` :

```bash
poetry run pre-commit install
poetry run pre-commit run
```

Le projet utilise flake8, isort et black pour assurer la standardisation des écritures.
Poetry est configuré pour en faciliter l'utilisation.

Expand Down
1 change: 0 additions & 1 deletion lemarche/api/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand Down
1 change: 0 additions & 1 deletion lemarche/api/migrations/0002_auto_20210602_0928.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("api", "0001_initial"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/api/migrations/0003_alter_siae_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("api", "0002_auto_20210602_0928"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/api/migrations/0004_alter_siae_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("api", "0003_alter_siae_options"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/api/migrations/0005_siae_sectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("api", "0004_alter_siae_options"),
]
Expand Down
3 changes: 1 addition & 2 deletions lemarche/api/migrations/0006_auto_20210902_1724.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Generated by Django 3.2.4 on 2021-09-02 15:24

from django.db import migrations, models
import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("api", "0005_siae_sectors"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("api", "0006_auto_20210902_1724"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/api/migrations/0008_delete_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("api", "0007_migrate_siae_model_to_siae_app"),
("siaes", "0005_alter_siae_sectors"),
Expand Down
2 changes: 1 addition & 1 deletion lemarche/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def custom_preprocessing_hook(endpoints):
https://github.com/tfranzel/drf-spectacular/issues/655
"""
filtered = []
for (path, path_regex, method, callback) in endpoints:
for path, path_regex, method, callback in endpoints:
if path.startswith("/api/"):
filtered.append((path, path_regex, method, callback))
return filtered
Expand Down
1 change: 0 additions & 1 deletion lemarche/cms/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("cms", "0001_initial"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/cms/migrations/0003_advert.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("wagtailimages", "0025_alter_image_file_alter_rendition_file"),
("cms", "0002_articlepage_with_cta_tender"),
Expand Down
1 change: 0 additions & 1 deletion lemarche/cms/migrations/0004_homepage.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def create_homepage(apps, schema_editor):


class Migration(migrations.Migration):

dependencies = [
("wagtailcore", "0083_workflowcontenttype"),
("cms", "0003_advert"),
Expand Down
1 change: 0 additions & 1 deletion lemarche/cms/migrations/0005_alter_homepage_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
("cms", "0004_homepage"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/cms/migrations/0006_alter_homepage_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

dependencies = [
("cms", "0005_alter_homepage_content"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/cms/migrations/0007_alter_homepage_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

dependencies = [
("cms", "0006_alter_homepage_content"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/companies/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("companies", "0001_initial"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/conversations/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("conversations", "0002_conversation_kind_conversation_siae_and_more"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("conversations", "0003_alter_conversation_options_conversation_email_sender_and_more"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("conversations", "0005_remove_conversation_uuid"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/cpv/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand Down
1 change: 0 additions & 1 deletion lemarche/cpv/migrations/0002_code_sectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("sectors", "0003_sector_sectorgroup_ordering"),
("cpv", "0001_initial"),
Expand Down
1 change: 0 additions & 1 deletion lemarche/favorites/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand Down
1 change: 0 additions & 1 deletion lemarche/favorites/migrations/0002_favoriteitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
("siaes", "0038_siae_image_count"),
("favorites", "0001_initial"),
Expand Down
1 change: 0 additions & 1 deletion lemarche/favorites/migrations/0003_favoritelist_siaes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("siaes", "0038_siae_image_count"),
("favorites", "0002_favoriteitem"),
Expand Down
1 change: 0 additions & 1 deletion lemarche/labels/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand Down
1 change: 0 additions & 1 deletion lemarche/labels/migrations/0002_label_data_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("labels", "0001_initial"),
]
Expand Down
3 changes: 1 addition & 2 deletions lemarche/networks/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Generated by Django 3.2.4 on 2021-09-02 16:47

from django.db import migrations, models
import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

operations = [
Expand Down
1 change: 0 additions & 1 deletion lemarche/networks/migrations/0002_network_slug.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("networks", "0001_initial"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/networks/migrations/0003_auto_20210908_1632.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def slugify_name(apps, schema_editor):


class Migration(migrations.Migration):

dependencies = [
("networks", "0002_network_slug"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/networks/migrations/0004_alter_network_slug.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("networks", "0003_auto_20210908_1632"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/networks/migrations/0005_network_logo_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("networks", "0004_alter_network_slug"),
]
Expand Down
1 change: 0 additions & 1 deletion lemarche/notes/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand Down
1 change: 0 additions & 1 deletion lemarche/notes/migrations/0002_note_author.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("notes", "0001_initial"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("contenttypes", "0002_remove_content_type_name"),
("notes", "0002_note_author"),
Expand Down
1 change: 0 additions & 1 deletion lemarche/pages/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand Down
1 change: 0 additions & 1 deletion lemarche/pages/migrations/0002_pagefragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("pages", "0001_initial"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class Command(BaseCommand):
help = "Create a JSON file with all cities of France."

def handle(self, **options):

base_url = f"{settings.API_GEO_BASE_URL}/communes"
fields = "" # "?fields=nom,code,codesPostaux,codeDepartement,codeRegion,centre"
extra = "?format=json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class Command(BaseCommand):
help = "Create a JSON file with all departments of France."

def handle(self, **options):

url = f"{settings.API_GEO_BASE_URL}/departements"

r = requests.get(url)
Expand Down
Loading