Skip to content

Commit

Permalink
start on 0.4.2 - versioning hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
michalovadek committed Apr 5, 2022
1 parent faa65e7 commit 9ec5e61
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: eurlex
Type: Package
Title: Retrieve Data on European Union Law
Version: 0.4.1
Version: 0.4.2
Authors@R: c(person(given = "Michal",
family = "Ovadek",
role = c("aut", "cre", "cph"),
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# eurlex 0.4.2

## Major changes

- the returned results from `elx_make_query()` no longer include previous versions of the same record (new versions typically fix incorrect or missing metadata). This reduces the number of duplicates previously appearing in the results

# eurlex 0.4.1

## Major changes
Expand Down
9 changes: 8 additions & 1 deletion R/elx_make_query.R
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ elx_make_query <- function(resource_type = c("any","directive","regulation","dec

if (include_citations == TRUE){

query <- paste(query, "OPTIONAL{?work cdm:work_cites_work ?citation. ?citation cdm:resource_legal_id_celex ?citationcelex.}")
query <- paste(query, "OPTIONAL{?work cdm:work_cites_work ?citation.
?citation cdm:resource_legal_id_celex ?citationcelex.}")

}

Expand Down Expand Up @@ -486,6 +487,12 @@ elx_make_query <- function(resource_type = c("any","directive","regulation","dec
query <- paste(query, "OPTIONAL{?work cdm:resource_legal_id_sector ?sector.}")

}

# add filter to hide versioned works (keeps only latest)
query <- paste(
query,
'FILTER not exists{?work cdm:do_not_index "true"^^<http://www.w3.org/2001/XMLSchema#boolean>}.'
)

if (order == TRUE){
query <- paste(query, "} order by str(?date)")
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ Please consider contributing to the maintenance and development of the package b

## Latest changes

### eurlex 0.4.2

- the returned results from `elx_make_query()` no longer include previous versions of the same record (new versions typically fix incorrect or missing metadata)

### eurlex 0.4.1

- `elx_fetch_data(type = "notice", notice = c("tree","branch", "object"))` now mirrors the behaviour of `elx_download_xml()` but instead of saving to path givess access to XML notice in R
Expand Down

0 comments on commit 9ec5e61

Please sign in to comment.