Skip to content

Commit 1caeef0

Browse files
committed
0.9.6 >> 0.9.7
- The code base simplified. - The package level constants have been placed into a standalone file. - These dependency (Imports) packages removed from the code: `curl`, `data.table`, `fs`, `tidyselect`, `utf8` - The sapply() calls have been removed from some unit tests. - The global assignment operators have been removed from the code. - The .github/CONTRIBUTING.md file has been created and added. - The DESCRIPTION document has been updated. - A contributor guide has been added.
1 parent 4a7d775 commit 1caeef0

File tree

110 files changed

+711
-955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+711
-955
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ sandbox/
66
^LICENSE\.md$
77
^\.github$
88
.claude/
9+
.opencode/
910
^doc$
1011
^Meta$
1112
^_pkgdown\.yml$

.github/CONTRIBUTING.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Contributing to entsoeapi
2+
3+
Thank you for taking the time to contribute! This document outlines the process for reporting issues and submitting code changes.
4+
5+
## Code of Conduct
6+
7+
Please review and follow our [Code of Conduct](CODE_OF_CONDUCT.md).
8+
9+
## Reporting bugs
10+
11+
Use the [bug report template](https://github.com/krose/entsoeapi/issues/new?template=bug_report.md) and include:
12+
13+
- A minimal reproducible example (ideally using `reprex::reprex()`)
14+
- The ENTSO-E API endpoint involved and the query parameters used
15+
- Your OS, R version, and `entsoeapi` version (`packageVersion("entsoeapi")`)
16+
17+
Do **not** include your ENTSO-E security token in the report.
18+
19+
## Requesting features
20+
21+
Open a [feature request](https://github.com/krose/entsoeapi/issues/new?template=feature_request.md) describing the ENTSO-E endpoint or data domain you would like covered and a brief use case.
22+
23+
## Submitting a pull request
24+
25+
1. Fork the repository and create a branch from `main`.
26+
27+
2. Install development dependencies: `devtools::install_dev_deps()`.
28+
29+
3. Make your changes. Keep each PR focused on a single concern.
30+
31+
4. Add or update tests — the package targets 100% test coverage.
32+
33+
5. Run the full check suite locally before pushing:
34+
35+
``` r
36+
lintr::lint_package()
37+
devtools::document()
38+
devtools::test()
39+
devtools::check()
40+
covr::package_coverage()
41+
```
42+
43+
6. Open the pull request against `master` and describe what changed and why.
44+
45+
### Conventions
46+
47+
- Follow the existing code style (snake_case, `cli::` for user-facing messages, `checkmate::` for input validation).
48+
- New user-facing functions must have `@examplesIf` blocks (see existing functions for the pattern).
49+
- All exported functions need a `@return` tag in their roxygen documentation.
50+
- ENTSO-E security tokens must never appear in code, tests, or fixturesuse the `ENTSOE_PAT` environment variable.
51+
52+
## Questions
53+
54+
For general usage questions, open a [GitHub Discussion](https://github.com/krose/entsoeapi/discussions) rather than an issue.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
sandbox/
55
test-coverage.yml
66
.claude/
7+
.opencode/
78
inst/doc
89
/doc/
910
/Meta/

.urlchecker

Lines changed: 0 additions & 2 deletions
This file was deleted.

DESCRIPTION

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: entsoeapi
22
Type: Package
33
Title: R Client for the 'ENTSO-E' Transparency Platform API
4-
Version: 0.9.6
4+
Version: 0.9.7
55
Authors@R: c(person("Kenneth", "Rose", role=c("aut", "cph"), email="kennethrose82@gmail.com"),
66
person("Sándor", "Budai", role=c("aut", "cre", "cph"), email="sbudai.ga@gmail.com"))
77
Description: Provides a standardized R client for the 'ENTSO-E' (European Network of
@@ -15,19 +15,14 @@ Imports:
1515
cachem,
1616
cli,
1717
checkmate,
18-
curl,
19-
data.table,
2018
dplyr,
21-
fs,
2219
httr2,
2320
lubridate,
2421
purrr,
2522
snakecase,
2623
stringr,
2724
tibble,
2825
tidyr,
29-
tidyselect,
30-
utf8,
3126
utils,
3227
xml2,
3328
xmlconvert
@@ -46,9 +41,10 @@ Suggests:
4641
ggplot2
4742
VignetteBuilder: knitr
4843
Config/testthat/edition: 3
49-
Collate:
44+
Collate:
5045
'entsoeapi-package.R'
5146
'data.R'
47+
'constants.R'
5248
'utils.R'
5349
'en_helpers.R'
5450
'en_market.R'

NEWS.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
# entsoeapi v0.9.6 (2026-03-12)
1+
# entsoeapi v0.9.7 (2026-03-17)
2+
3+
## New functionality
4+
5+
- None.
6+
7+
## Miscellaneous
8+
9+
- The code base simplified.
10+
- The package level constants have been placed into a standalone file.
11+
- These dependency (Imports) packages removed from the code: `curl`, `data.table`, `fs`, `tidyselect`, `utf8`
12+
- The sapply() calls have been removed from some unit tests.
13+
- The global assignment operators have been removed from the code.
14+
- The .github/CONTRIBUTING.md file has been created and added.
15+
- The DESCRIPTION document has been updated.
16+
- A contributor guide has been added.
17+
18+
# entsoeapi v0.9.6 (2026-03-12),
219

320
## New functionality
421

@@ -11,7 +28,7 @@
1128
- Across all R files @examples blocks replaced by @examplesIf blocks — since they require an ENTSOE_PAT env var that isn't available in CI.
1229
- @return section has been added to each exported function.
1330
- The cran-comments.md has been created and has been added to .Rbuildignore.
14-
- the .urlchecker config file has been created and has been added to .Rbuildignore.
31+
- The .urlchecker config file has been created and has been added to .Rbuildignore.
1532
- The DESCRIPTION and the LICENSE documents have been updated.
1633

1734
# entsoeapi v0.9.5.1 (2026-03-09)

R/constants.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.api_scheme <- "https://"
2+
.api_domain <- "web-api.tp.entsoe.eu/"
3+
.api_name <- "api?"
4+
.req_timeout <- 60
5+
.max_age <- 3600
6+
possible_eic_chars <- stats::setNames(
7+
object = 0L:36L,
8+
nm = c(as.character(0:9), LETTERS, "-")
9+
)

R/en_generation.R

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,9 @@ gen_per_gen_unit <- function(
401401
if (is.null(gen_type)) {
402402
par_matrix <- par_matrix |>
403403
dplyr::mutate(
404-
periodEnd = data.table::shift(
404+
periodEnd = dplyr::lead(
405405
x = periodStart,
406-
type = "lead",
407-
fill = as.POSIXct(
406+
default = as.POSIXct(
408407
x = period_end,
409408
format = "%Y%m%d%H%M",
410409
tz = "UTC"
@@ -415,10 +414,9 @@ gen_per_gen_unit <- function(
415414
par_matrix <- par_matrix |>
416415
dplyr::group_by(psrType) |>
417416
dplyr::mutate(
418-
periodEnd = data.table::shift(
417+
periodEnd = dplyr::lead(
419418
x = periodStart,
420-
type = "lead",
421-
fill = as.POSIXct(
419+
default = as.POSIXct(
422420
x = period_end,
423421
format = "%Y%m%d%H%M",
424422
tz = "UTC"

0 commit comments

Comments
 (0)