-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into python3.11
- Loading branch information
Showing
18 changed files
with
234 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ We’ll use the following repositories: | |
|
||
udata requires several libraries to be installed to work. You can see them on the udata documentation link below. | ||
|
||
We’ll use [docker-compose](https://docs.docker.com/compose/) to manage external services so you don’t have to install native mongodb and redis. | ||
We’ll use [docker compose](https://docs.docker.com/compose/) to manage external services so you don’t have to install native mongodb and redis. | ||
|
||
# Setup udata | ||
|
||
|
@@ -50,11 +50,11 @@ In this new directory, clone udata : | |
git clone [email protected]:opendatateam/udata.git | ||
``` | ||
|
||
You can start your local development environment with docker-compose. | ||
You can start your local development environment with docker compose. | ||
|
||
```bash | ||
cd udata | ||
docker-compose up | ||
docker compose up | ||
``` | ||
|
||
!!! warning | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,25 +81,137 @@ def get_mock_data(): | |
return json.load(open(join(ROOT_DIR, 'tests', 'schemas.json'))) | ||
|
||
@staticmethod | ||
def get_expected_v1_result_from_mock_data(): | ||
return [ | ||
def get_all_schemas_from_mock_data(with_datapackage_info = True): | ||
''' | ||
with_datapackage_info is here to allow testing with or without marshalling (marshalling add None for inexistant datapackage_* fields) | ||
''' | ||
schemas = ResourceSchemaMockData.get_expected_assignable_schemas_from_mock_data(with_datapackage_info) | ||
|
||
datapackage = { | ||
"name": "etalab/schema-irve", | ||
"title": "Infrastructures de recharges pour v\u00e9hicules \u00e9lectriques (IRVE)", | ||
"description": "data package contenant 2 sch\u00e9mas : IRVE statique et IRVE dynamique", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/etalab/schema-irve/latest/datapackage.json", | ||
"schema_type": "datapackage", | ||
"contact": "[email protected]", | ||
"examples": [], | ||
"labels": [ | ||
"Socle Commun des Donn\u00e9es Locales", | ||
"transport.data.gouv.fr" | ||
], | ||
"consolidation_dataset_id": "5448d3e0c751df01f85d0572", | ||
"versions": [ | ||
{ | ||
"version_name": "2.2.0", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/etalab/schema-irve/2.2.0/datapackage.json" | ||
}, | ||
{ | ||
"version_name": "2.2.1", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/etalab/schema-irve/2.2.1/datapackage.json" | ||
}, | ||
{ | ||
"version_name": "2.3.0", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/etalab/schema-irve/2.3.0/datapackage.json" | ||
}, | ||
{ | ||
"version_name": "2.3.1", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/etalab/schema-irve/2.3.1/datapackage.json" | ||
} | ||
], | ||
"external_doc": "https://doc.transport.data.gouv.fr/producteurs/infrastructures-de-recharge-de-vehicules-electriques-irve", | ||
"external_tool": None, | ||
"homepage": "https://github.com/etalab/schema-irve.git", | ||
} | ||
|
||
if with_datapackage_info: | ||
datapackage["datapackage_title"] = None | ||
datapackage["datapackage_name"] = None | ||
datapackage["datapackage_description"] = None | ||
|
||
return [datapackage] + schemas | ||
|
||
@staticmethod | ||
def get_expected_assignable_schemas_from_mock_data(with_datapackage_info = True): | ||
''' | ||
with_datapackage_info is here to allow testing with or without marshalling (marshalling add None for inexistant datapackage_* fields) | ||
''' | ||
schemas = [ | ||
{ | ||
"id": "etalab/schema-irve-statique", | ||
"label": "IRVE statique", | ||
"name": "etalab/schema-irve-statique", | ||
"title": "IRVE statique", | ||
"description": "Sp\u00e9cification du fichier d'\u00e9change relatif aux donn\u00e9es concernant la localisation g\u00e9ographique et les caract\u00e9ristiques techniques des stations et des points de recharge pour v\u00e9hicules \u00e9lectriques", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/etalab/schema-irve-statique/latest/schema-statique.json", | ||
"schema_type": "tableschema", | ||
"contact": "[email protected]", | ||
"examples": [ | ||
{ | ||
"title": "Exemple de fichier IRVE valide", | ||
"path": "https://github.com/etalab/schema-irve/raw/v2.2.1/exemple-valide.csv" | ||
} | ||
], | ||
"labels": [ | ||
"Socle Commun des Donn\u00e9es Locales", | ||
"transport.data.gouv.fr" | ||
], | ||
"consolidation_dataset_id": "5448d3e0c751df01f85d0572", | ||
"versions": [ | ||
"2.2.0", | ||
"2.2.1" | ||
] | ||
{ | ||
"version_name": "2.2.0", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/etalab/schema-irve-statique/2.2.0/schema-statique.json" | ||
}, | ||
{ | ||
"version_name": "2.2.1", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/etalab/schema-irve-statique/2.2.1/schema-statique.json" | ||
} | ||
], | ||
"external_doc": "https://doc.transport.data.gouv.fr/producteurs/infrastructures-de-recharge-de-vehicules-electriques-irve", | ||
"external_tool": None, | ||
"homepage": "https://github.com/etalab/schema-irve.git", | ||
"datapackage_title": "Infrastructures de recharges pour v\u00e9hicules \u00e9lectriques (IRVE)", | ||
"datapackage_name": "etalab/schema-irve", | ||
"datapackage_description": "data package contenant 2 sch\u00e9mas : IRVE statique et IRVE dynamique" | ||
}, | ||
{ | ||
"id": "139bercy/format-commande-publique", | ||
"label": "Données essentielles des marchés publics français", | ||
"name": "139bercy/format-commande-publique", | ||
"title": "Donn\u00e9es essentielles des march\u00e9s publics fran\u00e7ais", | ||
"description": "Donn\u00e9es des attributions de march\u00e9s publics et de contrats de concessions sup\u00e9rieures \u00e0 40 000 euros.", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/139bercy/format-commande-publique/latest/marches.json", | ||
"schema_type": "jsonschema", | ||
"contact": "[email protected]", | ||
"examples": [], | ||
"labels": [], | ||
"consolidation_dataset_id": None, | ||
"versions": [ | ||
"1.3.0", | ||
"1.4.0", | ||
"1.5.0", | ||
"2.0.0", | ||
"2.0.1" | ||
] | ||
{ | ||
"version_name": "1.3.0", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/139bercy/format-commande-publique/1.3.0/sch\u00e9mas/json/contrats-concessions.json" | ||
}, | ||
{ | ||
"version_name": "1.4.0", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/139bercy/format-commande-publique/1.4.0/marches.json" | ||
}, | ||
{ | ||
"version_name": "1.5.0", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/139bercy/format-commande-publique/1.5.0/marches.json" | ||
}, | ||
{ | ||
"version_name": "2.0.0", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/139bercy/format-commande-publique/2.0.0/marches.json" | ||
}, | ||
{ | ||
"version_name": "2.0.1", | ||
"schema_url": "https://schema.data.gouv.fr/schemas/139bercy/format-commande-publique/2.0.1/marches.json" | ||
} | ||
], | ||
"external_doc": None, | ||
"external_tool": None, | ||
"homepage": "https://github.com/139bercy/format-commande-publique", | ||
} | ||
] | ||
] | ||
|
||
if with_datapackage_info: | ||
schemas[1]["datapackage_title"] = None | ||
schemas[1]["datapackage_name"] = None | ||
schemas[1]["datapackage_description"] = None | ||
|
||
return schemas |
Oops, something went wrong.