Skip to content

Commit 780c998

Browse files
Api sirene v3 (#89)
* change ci * mise à jour sirene v3 * change checks ci * adapte test
1 parent b4e8f44 commit 780c998

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
on:
44
push:
55
branches:
6-
- main
7-
- master
6+
- '**'
87
pull_request:
98
branches:
10-
- main
11-
- master
9+
- '**'
1210

1311
name: R-CMD-check
1412

@@ -81,7 +79,7 @@ jobs:
8179
shell: Rscript {0}
8280

8381
- name: Upload check results
84-
if: failure()
82+
if: failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
8583
uses: actions/upload-artifact@main
8684
with:
8785
name: ${{ runner.os }}-r${{ matrix.config.r }}-results

.github/workflows/build-artifacts.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: build-artifacts
22

3-
on: push
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull request:
7+
branches: [main, master]
48

59
jobs:
610
build-artifacts:

R/sysdata.rda

95 Bytes
Binary file not shown.

data-raw/liste_donnees.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31057,7 +31057,7 @@
3105731057
"nom": "SIRENE_SIREN",
3105831058
"libelle": "Données du répertoire Sirène depuis 1973, unités légales",
3105931059
"collection": "SIRENE",
31060-
"lien": "https://api.insee.fr/entreprises/sirene/siren",
31060+
"lien": "https://api.insee.fr/entreprises/sirene/V3.11/siren",
3106131061
"type": "json",
3106231062
"zip": false,
3106331063
"big_zip": false,
@@ -31067,7 +31067,7 @@
3106731067
"nom": "SIRENE_SIRET",
3106831068
"libelle": "Données du répertoire Sirène depuis 1973, établissements",
3106931069
"collection": "SIRENE",
31070-
"lien": "https://api.insee.fr/entreprises/sirene/siret",
31070+
"lien": "https://api.insee.fr/entreprises/sirene/V3.11/siret",
3107131071
"type": "json",
3107231072
"zip": false,
3107331073
"big_zip": false,
@@ -31077,7 +31077,7 @@
3107731077
"nom": "SIRENE_SIRET_LIENS",
3107831078
"libelle": "Données du répertoire Sirène depuis 1973, liens de succession entre établissements",
3107931079
"collection": "SIRENE",
31080-
"lien": "https://api.insee.fr/entreprises/sirene/siret/liensSuccession",
31080+
"lien": "https://api.insee.fr/entreprises/sirene/V3.11/siret/liensSuccession",
3108131081
"type": "json",
3108231082
"zip": false,
3108331083
"big_zip": false,

data/liste_donnees.rda

-47 Bytes
Binary file not shown.

tests/testthat/test_liste_donnees.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test_that("pas de valeurs incongrues", {
2323

2424
# lien (motif, pas existence)
2525
url_pattern <- "^https://www.insee.fr/fr/statistiques/fichier/\\d{5,}/.+\\.(zip|xls|xlsx)$"
26-
api_url_pattern <- "^https://api.insee.fr/entreprises/sirene/sire[nt](/(liensSuccession|nonDiffusibles))?$"
26+
api_url_pattern <- "^https://api.insee.fr/entreprises/sirene(/V3.11)?/sire[nt](/(liensSuccession|nonDiffusibles))?$"
2727
expect_true(
2828
all(grepl(paste0(url_pattern, "|", api_url_pattern), df_ld$lien))
2929
)

0 commit comments

Comments
 (0)