Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed update_path with metacharacter #34

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check changelog

on: [ push, pull_request ]

jobs:
check-changelog-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- uses: jbangdev/jbang-action@v0.115.0
with:
script: com.github.nbbrd.heylogs:heylogs-cli:0.7.2:bin
scriptargs: "check NEWS.md"
10 changes: 5 additions & 5 deletions .lintr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
linters: linters_with_defaults(
object_name_linter = NULL,
cyclocomp_linter = NULL,
linters: linters_with_defaults(
indentation_linter(indent = 4L),
object_name_linter = NULL,
cyclocomp_linter = NULL,
line_length_linter = NULL,
commented_code_linter = NULL,
indentation_linter(indent = 4L)
commented_code_linter = NULL
)
encoding: "UTF-8"
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ URL: https://github.com/InseeFrLab/rjdworkspace
LazyData: TRUE
BugReports: https://github.com/InseeFrLab/rjdworkspace/issues
Encoding: UTF-8
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
56 changes: 45 additions & 11 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,63 @@
# rjdworkspace dev version
# Changelog

# rjdworkspace 1.1.6
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [Unreleased]

### Fixed

* Bug in update_path with the meta character ` ` (which can be encode as `%20` or as `+`)


## [1.1.6] - 2024-02-14

### Added

* add a new hidden function to copy ws

### Changed

* simplify the XML path writting with `URLencode`

### Fixed

* resolve bugs for `update_path` with WS created with `RJDemetra::add_sa_item`


# rjdworkspace 1.1.3
## [1.1.3] - 2023-08-29

### Added

* Adding some documentation to functions
* Successfull check!

### Changed

* Bug fixed in `get_comment`
* Changes in `transfer_series` to regroup `transfer_series` and `replace_series` with new arguments
* ws_from and ws_to to identify the workspaces in which we take the data and to which we transfer the data
* name_mp_from, name_mp_to, pos_mp_from and pos_mp_to to identify the SA-Processings (or Multi-Processings denoted mp)
* create_mp to create a new Multi-Processing
* replace_series to replace existing series
* Adding some documentation to functions
* Successfull check!

### Fixed

* Bug fixed in `get_comment`


# rjdworkspace 1.1.0
## [1.1.0] - 2023-07-04

## Changes :
### Added

* add new function to `update_path` of **workspaces**, **SAProcessing** and specifically **Sa-items** for csv, xls and xlsx files


# rjdworkspace 1.0.0 - Initial release.
## [1.0.0] - 2023-07-04

## Changes from dev version :
### Changed

* Globally, the functions which use 2 workspaces now have 2 arguments `ws_from` and `ws_to` which designate the workspace which contains the updated data (`ws_from`) and the workspace to update (`ws_to`). The arguments are in that order.
* This concerns the functions :
Expand All @@ -37,5 +66,10 @@
* `update_metadata`
* `update_metadata_roughly`
* `set_metadata` for SA ITEM

* the function `replace_series` has an new argument `mp_from_name` and `mp_to_name` to specify the multipreprocessing in which to search for series

[unreleased]: https://github.com/InseeFrLab/rjdworkspace/compare/v1.1.6...HEAD
[1.1.6]: https://github.com/InseeFrLab/rjdworkspace/compare/v1.1.3...v1.1.6
[1.1.3]: https://github.com/InseeFrLab/rjdworkspace/compare/v1.1.0...v1.1.3
[1.1.0]: https://github.com/InseeFrLab/rjdworkspace/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/InseeFrLab/rjdworkspace/releases/tag/v1.0.0
7 changes: 6 additions & 1 deletion R/update_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
format_path_to_xml <- function(path) {
path_norm <- normalizePath(path)
formatted_path <- URLencode(path_norm, reserved = TRUE)

formatted_path <- gsub(
x = formatted_path,
pattern = "%20",
replacement = "+",
fixed = TRUE
)
return(formatted_path)
}

Expand Down
Loading