Skip to content

Commit bdd4c14

Browse files
committed
Update datagouv documentation
1 parent 6402532 commit bdd4c14

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

content/api/cli.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The dataset can be published to multiple platforms simultaneously:
5858

5959
- **GitHub releases**: Requires `OTA_ENGINE_GITHUB_TOKEN` environment variable
6060
- **GitLab releases**: Requires `OTA_ENGINE_GITLAB_TOKEN` environment variable (used only if GitHub token is not configured)
61-
- **data.gouv.fr**: Requires `OTA_ENGINE_DATAGOUV_API_KEY` environment variable and `dataset.datagouv.datasetId` in configuration
61+
- **data.gouv.fr**: Requires `OTA_ENGINE_DATAGOUV_API_KEY` environment variable. To set up data.gouv.fr publishing, see the [guide to publish datasets to data.gouv.fr]({{< relref "collections/how-to/publish-to-datagouv" >}}).
6262

6363
These environment variables can be defined in a [`.env` file]({{< relref "collections/reference/environment-variables" >}}).
6464

@@ -70,16 +70,6 @@ To export, publish the dataset and remove the local copy that was created after
7070

7171
{{< refItem name="ota dataset --schedule [--file <filename>]" description="Schedule export, publishing and local copy removal" example="npx ota dataset --schedule --publish --remove-local-copy" />}}
7272

73-
### Setting up data.gouv.fr publishing
74-
75-
Before publishing to data.gouv.fr for the first time, you need to:
76-
77-
1. Create a dataset on [data.gouv.fr](https://www.data.gouv.fr/) or [demo.data.gouv.fr](https://demo.data.gouv.fr/) (for testing)
78-
2. Copy the dataset ID from the URL (e.g., `6914a64b17a0a91bb0a61222`)
79-
3. Add it to your configuration at `dataset.datagouv.datasetId`
80-
4. Set `dataset.datagouv.useDemo` to `true` if using the demo environment
81-
5. Set the `OTA_ENGINE_DATAGOUV_API_KEY` environment variable with your API key
82-
8373
## Exposing the collection API
8474

8575
{{< refItem name="ota serve" description="Start the collection Web API server. The Web API will be available under `<http://localhost>:<port>/<basePath>/<apiVersion>/<resource>`. The server port and base path are defined in the configuration." example="npx ota serve" />}}

content/collections/reference/configuration.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,25 +199,39 @@ The dataset section configures how datasets are published. Datasets can be publi
199199
{{< refItem
200200
name="dataset.publishingSchedule"
201201
type="string"
202-
description="Cron expression for dataset publishing. By default, it runs every Monday at 8:30 AM."
202+
description="Cron expression for dataset publishing. By default, it runs every Monday at 8:30 AM. If publishing to data.gouv.fr, remember to update `dataset.datagouv.frequency` to match the actual publishing frequency."
203203
default="30 8 * * MON"
204204
/>}}
205205

206206
#### data.gouv.fr publishing
207207

208-
The data.gouv.fr section configures publishing to the French government's open data platform.
208+
The data.gouv.fr section configures publishing to the French government's open data platform. Either `datasetId` or `organizationIdOrSlug` must be configured.
209209

210210
{{< refItem
211211
name="dataset.datagouv.datasetId"
212212
type="string"
213-
description="ID of the dataset on data.gouv.fr. Required for publishing to data.gouv.fr. Must be created manually on the data.gouv.fr website."
213+
description="ID of an existing dataset on data.gouv.fr. Use this to publish to an existing dataset. Either this or `organizationIdOrSlug` is required."
214214
example="6914a64b17a0a91bb0a61222"
215215
/>}}
216216

217+
{{< refItem
218+
name="dataset.datagouv.organizationIdOrSlug"
219+
type="string"
220+
description="ID or slug of the organization on data.gouv.fr. Use this to automatically create and publish a dataset. The dataset will be created with the title from `dataset.title` if it doesn't exist. Either this or `datasetId` is required."
221+
example="open-terms-archive"
222+
/>}}
223+
224+
{{< refItem
225+
name="dataset.datagouv.frequency"
226+
type="string"
227+
description="Update frequency of the dataset. Used when creating or updating a dataset on data.gouv.fr. See [data.gouv.fr API](https://www.data.gouv.fr/api/1/datasets/frequencies/) for all allowed values."
228+
example="weekly"
229+
/>}}
230+
217231
{{< refItem
218232
name="dataset.datagouv.useDemo"
219233
type="boolean"
220-
description="Set to true to use the demo.data.gouv.fr environment for testing."
234+
description="Set to `true` to use the demo.data.gouv.fr environment for testing."
221235
default="false"
222236
/>}}
223237

content/collections/reference/environment-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ This reference documentation details all available environment variables that ca
1919

2020
{{< refItem name="OTA_ENGINE_GITLAB_RELEASES_TOKEN" type="string" description="GitLab token for dataset releases." />}}
2121

22-
{{< refItem name="OTA_ENGINE_DATAGOUV_API_KEY" type="string" description="API key for data.gouv.fr dataset publishing. Requires dataset.datagouv.datasetId to be configured." />}}
22+
{{< refItem name="OTA_ENGINE_DATAGOUV_API_KEY" type="string" description="API key for data.gouv.fr dataset publishing." />}}
2323

2424
---
2525

26-
### Federation API
26+
### Federation API
2727

2828
{{< refItem name="OTA_FEDERATION_API_SMTP_PASSWORD" type="string" description="SMTP password for email error notifications." />}}

0 commit comments

Comments
 (0)