Skip to content
Open
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
4 changes: 2 additions & 2 deletions erp/export/generate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def generate_schema(
table_schema = Schema.from_descriptor(base)

descriptor = table_schema.to_descriptor()
descriptor["path"] = repository + "schema.json"
descriptor["resources"][0]["path"] = repository + "exemple-valide.csv"
descriptor["path"] = repository + "base/schema_base.json"
descriptor["resources"][0]["path"] = repository + "base/base-valid-sample.csv"

field_types = []
for field_name in EtalabMapper.headers():
Expand Down
12 changes: 6 additions & 6 deletions erp/export/static/base-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"keywords": ["accessibilite", "access", "a11y"],
"countryCode": "FR",
"homepage": "https://github.com/MTES-MCT/acceslibre-schema",
"path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/schema.json",
"path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/schema_base.json",
"licenses": [
{
"title": "Etalab Licence Ouverte 2.0",
Expand All @@ -17,19 +17,19 @@
"resources": [
{
"title": "Fichier valide (CSV)",
"name": "exemple-valide-csv",
"path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/exemple-valide.csv"
"name": "base-valid-sample.csv",
"path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/base-valid-sample.csv"
},
{
"title": "Schéma au format XLS",
"name": "schema_format_xls",
"path": "https://github.com/MTES-MCT/acceslibre-schema/blob/v0.0.19/schema_format_excel.xls"
"name": "schema_data_base.xls",
"path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/schema_data_base.xls"
}
],
"sources": [],
"created": "2021-03-10",
"lastModified": "2025-12-23",
"version": "0.0.19",
"version": "0.0.20",
"contributors": [
{
"title": "Christophe Vanfrackem",
Expand Down
12 changes: 6 additions & 6 deletions erp/export/static/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2406,7 +2406,7 @@
"keywords": ["accessibilite", "access", "a11y"],
"countryCode": "FR",
"homepage": "https://github.com/MTES-MCT/acceslibre-schema",
"path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/schema.json",
"path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/schema_base.json",
"licenses": [
{
"title": "Etalab Licence Ouverte 2.0",
Expand All @@ -2417,19 +2417,19 @@
"resources": [
{
"title": "Fichier valide (CSV)",
"name": "exemple-valide-csv",
"path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/exemple-valide.csv"
"name": "base-valid-sample.csv",
"path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/base-valid-sample.csv"
},
{
"title": "Schéma au format XLS",
"name": "schema_format_xls",
"path": "https://github.com/MTES-MCT/acceslibre-schema/blob/v0.0.19/schema_format_excel.xls"
"name": "schema_data_base.xls",
"path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/schema_data_base.xls"
}
],
"sources": [],
"created": "2021-03-10",
"lastModified": "2025-12-23",
"version": "0.0.19",
"version": "0.0.20",
"contributors": [
{
"title": "Christophe Vanfrackem",
Expand Down
2 changes: 1 addition & 1 deletion erp/management/commands/generate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def add_arguments(self, parser):
def handle(self, *args, **options):
base = options.get("base-file", self.default_dir + "/base-schema.json")
outfile = options.get("out-file", self.default_dir + "/schema.json")
repository = "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/"
repository = "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/"
try:
generate_schema(base=base, outfile=outfile, repository=repository)
print(f"Schema generated to: {outfile}")
Expand Down
2 changes: 1 addition & 1 deletion tests/erp/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def test_export_failure(mocker, settings):
def test_generate_schema(db, activite):
base = "erp/export/static/base-schema.json"
outfile = "schema-test.json"
repository = "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/"
repository = "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/"

generate_schema(base, outfile, repository)

Expand Down