From d294feabe39c7e8639f53dae568a30fd5336f623 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Wed, 13 Jul 2022 10:41:22 +0200 Subject: [PATCH 01/10] gzip demarches publiques export --- .../demarches_publiques_export_service.rb | 29 ++++++++++++------- ...demarches_publiques_export_service_spec.rb | 17 ++++++++--- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/app/services/demarches_publiques_export_service.rb b/app/services/demarches_publiques_export_service.rb index 1afcb01af..2508c1e12 100644 --- a/app/services/demarches_publiques_export_service.rb +++ b/app/services/demarches_publiques_export_service.rb @@ -1,27 +1,34 @@ class DemarchesPubliquesExportService - attr_reader :io - def initialize(io) - @io = io + attr_reader :gzip_filename + + def initialize(gzip_filename) + @gzip_filename = gzip_filename end def call + Zlib::GzipWriter.open(gzip_filename) do |gz| + generate_json(gz) + end + end + + private + + def generate_json(io) end_cursor = nil first = true - write_array_opening + write_array_opening(io) loop do - write_demarches_separator if !first + write_demarches_separator(io) if !first execute_query(cursor: end_cursor) end_cursor = last_cursor io.write(jsonify(demarches)) first = false break if !has_next_page? end - write_array_closing + write_array_closing(io) io.close end - private - def execute_query(cursor: nil) result = API::V2::Schema.execute(query, variables: { cursor: cursor }, context: { internal_use: true }) raise DemarchesPubliquesExportService::Error.new(result["errors"]) if result["errors"] @@ -83,15 +90,15 @@ class DemarchesPubliquesExportService demarches.map(&:to_json).join(',') end - def write_array_opening + def write_array_opening(io) io.write('[') end - def write_array_closing + def write_array_closing(io) io.write(']') end - def write_demarches_separator + def write_demarches_separator(io) io.write(',') end end diff --git a/spec/services/demarches_publiques_export_service_spec.rb b/spec/services/demarches_publiques_export_service_spec.rb index 7d039729d..c83d7e060 100644 --- a/spec/services/demarches_publiques_export_service_spec.rb +++ b/spec/services/demarches_publiques_export_service_spec.rb @@ -1,7 +1,9 @@ describe DemarchesPubliquesExportService do let(:procedure) { create(:procedure, :published, :with_service, :with_type_de_champ) } let!(:dossier) { create(:dossier, procedure: procedure) } - let(:io) { StringIO.new } + let(:gzip_filename) { "demarches.json.gz" } + + after { FileUtils.rm(gzip_filename) } describe 'call' do it 'generate json for all closed procedures' do @@ -31,17 +33,24 @@ describe DemarchesPubliquesExportService do ] } } + DemarchesPubliquesExportService.new(gzip_filename).call - DemarchesPubliquesExportService.new(io).call - expect(JSON.parse(io.string)[0] + expect(JSON.parse(deflat_gzip(gzip_filename))[0] .deep_symbolize_keys) .to eq(expected_result) end + it 'raises exception when procedure with bad data' do procedure.libelle = nil procedure.save(validate: false) - expect { DemarchesPubliquesExportService.new(io).call }.to raise_error(DemarchesPubliquesExportService::Error) + expect { DemarchesPubliquesExportService.new(gzip_filename).call }.to raise_error(DemarchesPubliquesExportService::Error) + end + end + + def deflat_gzip(gzip_filename) + Zlib::GzipReader.open(gzip_filename) do |gz| + return gz.read end end end From f7226ac6255cb880bfe793d474c2d7381e6321c4 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 14 Jul 2022 11:19:37 +0200 Subject: [PATCH 02/10] add datagouv secrets --- config/env.example | 6 ++++++ config/secrets.yml | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/config/env.example b/config/env.example index b3090af82..b12f3c267 100644 --- a/config/env.example +++ b/config/env.example @@ -153,3 +153,9 @@ CLAMAV_ENABLED="disabled" # Siret number used for API Entreprise, by default we use SIRET from dinum API_ENTREPRISE_DEFAULT_SIRET="put_your_own_siret" + +# Publish to datagouv +DATAGOUV_API_KEY="thisisasecret" +DATAGOUV_API_URL="https://www.data.gouv.fr/api/1" +DATAGOUV_DEMARCHES_PUBLIQUES_DATASET="datasetid" +DATAGOUV_DEMARCHES_PUBLIQUES_RESOURCE="resourceid" diff --git a/config/secrets.yml b/config/secrets.yml index 35a8a5c42..c7d74fb20 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -78,7 +78,11 @@ defaults: &defaults api_geo_url: <%= ENV['API_GEO_URL'] %> api_adresse_url: <%= ENV['API_ADRESSE_URL'] %> api_education_url: <%= ENV['API_EDUCATION_URL'] %> - + datagouv: + api_key: <%= ENV['DATAGOUV_API_KEY'] %> + api_url: <%= ENV['DATAGOUV_API_URL'] %> + ds_demarches_publiques_dataset: <%= ENV['DATAGOUV_DEMARCHES_PUBLIQUES_DATASET'] %> + ds_demarches_publiques_resource: <%= ENV['DATAGOUV_DEMARCHES_PUBLIQUES_RESOURCE'] %> development: @@ -109,6 +113,11 @@ test: userpwd: 'fake:fake' autocomplete: api_geo_url: /test/api_geo + datagouv: + api_key: "clesecrete" + api_url: "https://www.data.gouv.fr/api/1" + descriptif_demarches_dataset: "ethopundataset" + descriptif_demarches_resource: "etbimuneressource" # Do not keep production secrets in the repository, # instead read values from the environment. From 77a9a2ba123f2c2b2307649cd6e47542927fabf1 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 14 Jul 2022 13:15:19 +0200 Subject: [PATCH 03/10] can upload file to datagouv --- app/lib/api_datagouv/api.rb | 47 +++++++++++++++++++++++++++++++ spec/lib/api_datagouv/api_spec.rb | 28 ++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 app/lib/api_datagouv/api.rb create mode 100644 spec/lib/api_datagouv/api_spec.rb diff --git a/app/lib/api_datagouv/api.rb b/app/lib/api_datagouv/api.rb new file mode 100644 index 000000000..2347e1e04 --- /dev/null +++ b/app/lib/api_datagouv/api.rb @@ -0,0 +1,47 @@ +class APIDatagouv::API + class RequestFailed < StandardError + def initialize(url, response) + msg = <<-TEXT + HTTP error code: #{response.code} + #{response.body} + TEXT + + super(msg) + end + end + + class << self + def upload(path) + io = File.new(path, 'r') + response = Typhoeus.post( + datagouv_upload_url, + body: { + file: io + }, + headers: { "X-Api-Key" => datagouv_secret[:api_key] } + ) + io.close + + if response.success? + response.body + else + raise RequestFailed.new(datagouv_upload_url, response) + end + end + + private + + def datagouv_upload_url + [ + datagouv_secret[:api_url], + "/datasets/", datagouv_secret[:ds_demarches_publiques_dataset], + "/resources/", datagouv_secret[:ds_demarches_publiques_resource], + "/upload/" + ].join + end + + def datagouv_secret + Rails.application.secrets.datagouv + end + end +end diff --git a/spec/lib/api_datagouv/api_spec.rb b/spec/lib/api_datagouv/api_spec.rb new file mode 100644 index 000000000..327c5e34d --- /dev/null +++ b/spec/lib/api_datagouv/api_spec.rb @@ -0,0 +1,28 @@ +describe APIDatagouv::API do + describe '#upload' do + let(:subject) { APIDatagouv::API.upload(Tempfile.new.path) } + + before do + stub_request(:post, /https:\/\/www.data.gouv.fr\/api/) + .to_return(body: body, status: status) + end + + context "when response ok" do + let(:status) { 200 } + let(:body) { "ok" } + + it 'returns body response' do + expect(subject).to eq body + end + end + + context "when responds with error" do + let(:status) { 400 } + let(:body) { "oops ! There is a problem..." } + + it 'raise error' do + expect { subject }.to raise_error(APIDatagouv::API::RequestFailed) + end + end + end +end From b6c96301ef1b3dc65897e54f6e1d53a71223aeae Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 14 Jul 2022 17:59:32 +0200 Subject: [PATCH 04/10] export and publish opendata demarches --- ...ort_and_publish_demarches_publiques_job.rb | 18 ++++++++++++ config/env.example.optional | 3 ++ ...nd_publish_demarches_publiques_job_spec.rb | 28 +++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 app/jobs/cron/export_and_publish_demarches_publiques_job.rb create mode 100644 spec/jobs/cron/export_and_publish_demarches_publiques_job_spec.rb diff --git a/app/jobs/cron/export_and_publish_demarches_publiques_job.rb b/app/jobs/cron/export_and_publish_demarches_publiques_job.rb new file mode 100644 index 000000000..3ffede9e6 --- /dev/null +++ b/app/jobs/cron/export_and_publish_demarches_publiques_job.rb @@ -0,0 +1,18 @@ +class Cron::ExportAndPublishDemarchesPubliquesJob < Cron::CronJob + self.schedule_expression = "every month at 3:00" + + def perform(*args) + gzip_filepath = [ + ENV.fetch('DATAGOUV_TMP_DIR', 'tmp'), '/', + Time.zone.now.to_formatted_s(:number), + '-demarches.json.gz' + ].join + + begin + DemarchesPubliquesExportService.new(gzip_filepath).call + APIDatagouv::API.upload(gzip_filepath) + ensure + FileUtils.rm(gzip_filepath) + end + end +end diff --git a/config/env.example.optional b/config/env.example.optional index 73b01bbc5..0e2026159 100644 --- a/config/env.example.optional +++ b/config/env.example.optional @@ -140,3 +140,6 @@ VITE_LEGACY="" # around july 2022, we changed the duree_conservation_dossiers_dans_ds, allow instances to choose their own duration NEW_MAX_DUREE_CONSERVATION=12 +# +# Directory which temporarily holds demarches.json.gz during generation before publishing to datagouv +DATAGOUV_TMP_DIR="/tmp" diff --git a/spec/jobs/cron/export_and_publish_demarches_publiques_job_spec.rb b/spec/jobs/cron/export_and_publish_demarches_publiques_job_spec.rb new file mode 100644 index 000000000..89cec05a5 --- /dev/null +++ b/spec/jobs/cron/export_and_publish_demarches_publiques_job_spec.rb @@ -0,0 +1,28 @@ +RSpec.describe Cron::ExportAndPublishDemarchesPubliquesJob, type: :job do + let!(:procedure) { create(:procedure, :published, :with_service, :with_type_de_champ) } + let(:status) { 200 } + let(:body) { "ok" } + let(:stub) { stub_request(:post, /https:\/\/www.data.gouv.fr\/api\/.*\/upload\//) } + + describe 'perform' do + before do + stub + end + + subject { Cron::ExportAndPublishDemarchesPubliquesJob.perform_now } + + it 'send POST request to datagouv' do + subject + + expect(stub).to have_been_requested + end + + it 'removes gzip file even if an error occured' do + procedure.libelle = nil + procedure.save(validate: false) + + expect { subject }.to raise_error(StandardError) + expect(Dir.glob("*demarches.json.gz", base: 'tmp').empty?).to be_truthy + end + end +end From bed61670107f302baeab19a4c12fa8b1ae2de0b4 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 21 Jul 2022 15:04:14 +0200 Subject: [PATCH 05/10] use specific namespace for datagouv cron jobs --- .../export_and_publish_demarches_publiques_job.rb | 2 +- .../export_and_publish_demarches_publiques_job_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename app/jobs/cron/{ => datagouv}/export_and_publish_demarches_publiques_job.rb (84%) rename spec/jobs/cron/{ => datagouv}/export_and_publish_demarches_publiques_job_spec.rb (80%) diff --git a/app/jobs/cron/export_and_publish_demarches_publiques_job.rb b/app/jobs/cron/datagouv/export_and_publish_demarches_publiques_job.rb similarity index 84% rename from app/jobs/cron/export_and_publish_demarches_publiques_job.rb rename to app/jobs/cron/datagouv/export_and_publish_demarches_publiques_job.rb index 3ffede9e6..ae9664bc2 100644 --- a/app/jobs/cron/export_and_publish_demarches_publiques_job.rb +++ b/app/jobs/cron/datagouv/export_and_publish_demarches_publiques_job.rb @@ -1,4 +1,4 @@ -class Cron::ExportAndPublishDemarchesPubliquesJob < Cron::CronJob +class Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob < Cron::CronJob self.schedule_expression = "every month at 3:00" def perform(*args) diff --git a/spec/jobs/cron/export_and_publish_demarches_publiques_job_spec.rb b/spec/jobs/cron/datagouv/export_and_publish_demarches_publiques_job_spec.rb similarity index 80% rename from spec/jobs/cron/export_and_publish_demarches_publiques_job_spec.rb rename to spec/jobs/cron/datagouv/export_and_publish_demarches_publiques_job_spec.rb index 89cec05a5..03a8d5bb8 100644 --- a/spec/jobs/cron/export_and_publish_demarches_publiques_job_spec.rb +++ b/spec/jobs/cron/datagouv/export_and_publish_demarches_publiques_job_spec.rb @@ -1,4 +1,4 @@ -RSpec.describe Cron::ExportAndPublishDemarchesPubliquesJob, type: :job do +RSpec.describe Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob, type: :job do let!(:procedure) { create(:procedure, :published, :with_service, :with_type_de_champ) } let(:status) { 200 } let(:body) { "ok" } @@ -9,7 +9,7 @@ RSpec.describe Cron::ExportAndPublishDemarchesPubliquesJob, type: :job do stub end - subject { Cron::ExportAndPublishDemarchesPubliquesJob.perform_now } + subject { Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob.perform_now } it 'send POST request to datagouv' do subject From 0e3e6eb62a5762ffe208ddec8d6be9835df78b40 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 21 Jul 2022 15:28:28 +0200 Subject: [PATCH 06/10] add schedulable? class method to cron jobs --- app/jobs/cron/cron_job.rb | 4 ++++ .../export_and_publish_demarches_publiques_job.rb | 4 ++++ spec/jobs/cron/cron_job_spec.rb | 7 +++++++ ...rt_and_publish_demarches_publiques_job_spec.rb | 15 +++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 spec/jobs/cron/cron_job_spec.rb diff --git a/app/jobs/cron/cron_job.rb b/app/jobs/cron/cron_job.rb index 1fe79f81b..902e8f106 100644 --- a/app/jobs/cron/cron_job.rb +++ b/app/jobs/cron/cron_job.rb @@ -3,6 +3,10 @@ class Cron::CronJob < ApplicationJob class_attribute :schedule_expression class << self + def schedulable? + true + end + def schedule remove if cron_expression_changed? set(cron: cron_expression).perform_later if !scheduled? diff --git a/app/jobs/cron/datagouv/export_and_publish_demarches_publiques_job.rb b/app/jobs/cron/datagouv/export_and_publish_demarches_publiques_job.rb index ae9664bc2..2a6822978 100644 --- a/app/jobs/cron/datagouv/export_and_publish_demarches_publiques_job.rb +++ b/app/jobs/cron/datagouv/export_and_publish_demarches_publiques_job.rb @@ -15,4 +15,8 @@ class Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob < Cron::CronJob FileUtils.rm(gzip_filepath) end end + + def self.schedulable? + ENV.fetch('OPENDATA_ENABLED', nil) == 'enabled' + end end diff --git a/spec/jobs/cron/cron_job_spec.rb b/spec/jobs/cron/cron_job_spec.rb new file mode 100644 index 000000000..29048feb8 --- /dev/null +++ b/spec/jobs/cron/cron_job_spec.rb @@ -0,0 +1,7 @@ +RSpec.describe Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob, type: :job do + describe '#schedulable?' do + it 'is schedulable by default' do + expect(Cron::CronJob.schedulable?).to be_truthy + end + end +end diff --git a/spec/jobs/cron/datagouv/export_and_publish_demarches_publiques_job_spec.rb b/spec/jobs/cron/datagouv/export_and_publish_demarches_publiques_job_spec.rb index 03a8d5bb8..7ac7eff1b 100644 --- a/spec/jobs/cron/datagouv/export_and_publish_demarches_publiques_job_spec.rb +++ b/spec/jobs/cron/datagouv/export_and_publish_demarches_publiques_job_spec.rb @@ -25,4 +25,19 @@ RSpec.describe Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob, type: :job expect(Dir.glob("*demarches.json.gz", base: 'tmp').empty?).to be_truthy end end + + describe '#schedulable?' do + context "when ENV['OPENDATA_ENABLED'] == 'enabled'" do + it 'is schedulable' do + ENV['OPENDATA_ENABLED'] = 'enabled' + expect(Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob.schedulable?).to be_truthy + end + end + context "when ENV['OPENDATA_ENABLED'] != 'enabled'" do + it 'is schedulable' do + ENV['OPENDATA_ENABLED'] = nil + expect(Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob.schedulable?).to be_falsy + end + end + end end From 899047b656848309152cbf2a75b75b0eb5875bc5 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 21 Jul 2022 15:49:02 +0200 Subject: [PATCH 07/10] schedule and display only schedulable jobs --- lib/tasks/jobs.rake | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/tasks/jobs.rake b/lib/tasks/jobs.rake index d761a6fa6..8a7e755f0 100644 --- a/lib/tasks/jobs.rake +++ b/lib/tasks/jobs.rake @@ -1,15 +1,17 @@ namespace :jobs do - desc 'Schedule all cron jobs' + desc 'Schedule all schedulable cron jobs' task schedule: :environment do - glob = Rails.root.join('app', 'jobs', '**', '*_job.rb') - Dir.glob(glob).each { |f| require f } - Cron::CronJob.subclasses.each(&:schedule) + schedulable_jobs.each(&:schedule) end - desc 'Display schedule for all cron jobs' + desc 'Display schedule for all schedulable cron jobs' task display_schedule: :environment do + schedulable_jobs.each(&:display_schedule) + end + + def schedulable_jobs glob = Rails.root.join('app', 'jobs', '**', '*_job.rb') Dir.glob(glob).each { |f| require f } - Cron::CronJob.subclasses.each(&:display_schedule) + Cron::CronJob.subclasses.filter(&:schedulable?) end end From 004176a88d6f6552fdade425470d378b373f0a4f Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 21 Jul 2022 15:52:16 +0200 Subject: [PATCH 08/10] add optional OPENDATA_ENABLED variable env --- config/env.example.optional | 1 + 1 file changed, 1 insertion(+) diff --git a/config/env.example.optional b/config/env.example.optional index 0e2026159..5082b9147 100644 --- a/config/env.example.optional +++ b/config/env.example.optional @@ -141,5 +141,6 @@ VITE_LEGACY="" # around july 2022, we changed the duree_conservation_dossiers_dans_ds, allow instances to choose their own duration NEW_MAX_DUREE_CONSERVATION=12 # +OPENDATA_ENABLED="enabled" # Directory which temporarily holds demarches.json.gz during generation before publishing to datagouv DATAGOUV_TMP_DIR="/tmp" From 906dd4b50929e2b4acffbae817959a6e278b7432 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 21 Jul 2022 16:00:33 +0200 Subject: [PATCH 09/10] remove useless DATAGOUV_TMP_DIR env --- .../cron/datagouv/export_and_publish_demarches_publiques_job.rb | 2 +- config/env.example.optional | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/jobs/cron/datagouv/export_and_publish_demarches_publiques_job.rb b/app/jobs/cron/datagouv/export_and_publish_demarches_publiques_job.rb index 2a6822978..534e8dfaa 100644 --- a/app/jobs/cron/datagouv/export_and_publish_demarches_publiques_job.rb +++ b/app/jobs/cron/datagouv/export_and_publish_demarches_publiques_job.rb @@ -3,7 +3,7 @@ class Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob < Cron::CronJob def perform(*args) gzip_filepath = [ - ENV.fetch('DATAGOUV_TMP_DIR', 'tmp'), '/', + 'tmp/', Time.zone.now.to_formatted_s(:number), '-demarches.json.gz' ].join diff --git a/config/env.example.optional b/config/env.example.optional index 5082b9147..9decf0afe 100644 --- a/config/env.example.optional +++ b/config/env.example.optional @@ -142,5 +142,3 @@ VITE_LEGACY="" NEW_MAX_DUREE_CONSERVATION=12 # OPENDATA_ENABLED="enabled" -# Directory which temporarily holds demarches.json.gz during generation before publishing to datagouv -DATAGOUV_TMP_DIR="/tmp" From e3206f3eec2856bec885b410c02aa2f04d3e1986 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 21 Jul 2022 16:36:58 +0200 Subject: [PATCH 10/10] rename datagouv env var --- app/lib/api_datagouv/api.rb | 4 ++-- config/env.example | 6 ------ config/env.example.optional | 6 ++++++ config/secrets.yml | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/lib/api_datagouv/api.rb b/app/lib/api_datagouv/api.rb index 2347e1e04..0a0d70b2b 100644 --- a/app/lib/api_datagouv/api.rb +++ b/app/lib/api_datagouv/api.rb @@ -34,8 +34,8 @@ class APIDatagouv::API def datagouv_upload_url [ datagouv_secret[:api_url], - "/datasets/", datagouv_secret[:ds_demarches_publiques_dataset], - "/resources/", datagouv_secret[:ds_demarches_publiques_resource], + "/datasets/", datagouv_secret[:descriptif_demarches_dataset], + "/resources/", datagouv_secret[:descriptif_demarches_resource], "/upload/" ].join end diff --git a/config/env.example b/config/env.example index b12f3c267..b3090af82 100644 --- a/config/env.example +++ b/config/env.example @@ -153,9 +153,3 @@ CLAMAV_ENABLED="disabled" # Siret number used for API Entreprise, by default we use SIRET from dinum API_ENTREPRISE_DEFAULT_SIRET="put_your_own_siret" - -# Publish to datagouv -DATAGOUV_API_KEY="thisisasecret" -DATAGOUV_API_URL="https://www.data.gouv.fr/api/1" -DATAGOUV_DEMARCHES_PUBLIQUES_DATASET="datasetid" -DATAGOUV_DEMARCHES_PUBLIQUES_RESOURCE="resourceid" diff --git a/config/env.example.optional b/config/env.example.optional index 9decf0afe..332bbb9b8 100644 --- a/config/env.example.optional +++ b/config/env.example.optional @@ -142,3 +142,9 @@ VITE_LEGACY="" NEW_MAX_DUREE_CONSERVATION=12 # OPENDATA_ENABLED="enabled" + +# Publish to datagouv +DATAGOUV_API_KEY="thisisasecret" +DATAGOUV_API_URL="https://www.data.gouv.fr/api/1" +DATAGOUV_DESCRIPTIF_DEMARCHES_DATASET="datasetid" +DATAGOUV_DESCRIPTIF_DEMARCHES_RESOURCE="resourceid" diff --git a/config/secrets.yml b/config/secrets.yml index c7d74fb20..ffdd413cd 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -81,8 +81,8 @@ defaults: &defaults datagouv: api_key: <%= ENV['DATAGOUV_API_KEY'] %> api_url: <%= ENV['DATAGOUV_API_URL'] %> - ds_demarches_publiques_dataset: <%= ENV['DATAGOUV_DEMARCHES_PUBLIQUES_DATASET'] %> - ds_demarches_publiques_resource: <%= ENV['DATAGOUV_DEMARCHES_PUBLIQUES_RESOURCE'] %> + descriptif_demarches_dataset: <%= ENV['DATAGOUV_DESCRIPTIF_DEMARCHES_DATASET'] %> + descriptif_demarches_resource: <%= ENV['DATAGOUV_DESCRIPTIF_DEMARCHES_RESOURCE'] %> development: