Skip to content
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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sandbox/
^LICENSE\.md$
^\.github$
.claude/
.opencode/
^doc$
^Meta$
^_pkgdown\.yml$
Expand Down
54 changes: 54 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Contributing to entsoeapi

Thank you for taking the time to contribute! This document outlines the process for reporting issues and submitting code changes.

## Code of Conduct

Please review and follow our [Code of Conduct](CODE_OF_CONDUCT.md).

## Reporting bugs

Use the [bug report template](https://github.com/krose/entsoeapi/issues/new?template=bug_report.md) and include:

- A minimal reproducible example (ideally using `reprex::reprex()`)
- The ENTSO-E API endpoint involved and the query parameters used
- Your OS, R version, and `entsoeapi` version (`packageVersion("entsoeapi")`)

Do **not** include your ENTSO-E security token in the report.

## Requesting features

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.

## Submitting a pull request

1. Fork the repository and create a branch from `main`.

2. Install development dependencies: `devtools::install_dev_deps()`.

3. Make your changes. Keep each PR focused on a single concern.

4. Add or update tests — the package targets 100% test coverage.

5. Run the full check suite locally before pushing:

``` r
lintr::lint_package()
devtools::document()
devtools::test()
devtools::check()
covr::package_coverage()
```

6. Open the pull request against `master` and describe what changed and why.

### Conventions

- Follow the existing code style (snake_case, `cli::` for user-facing messages, `checkmate::` for input validation).
- New user-facing functions must have `@examplesIf` blocks (see existing functions for the pattern).
- All exported functions need a `@return` tag in their roxygen documentation.
- ENTSO-E security tokens must never appear in code, tests, or fixtures — use the `ENTSOE_PAT` environment variable.

## Questions

For general usage questions, open a [GitHub Discussion](https://github.com/krose/entsoeapi/discussions) rather than an issue.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
sandbox/
test-coverage.yml
.claude/
.opencode/
inst/doc
/doc/
/Meta/
Expand Down
2 changes: 0 additions & 2 deletions .urlchecker

This file was deleted.

10 changes: 3 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: entsoeapi
Type: Package
Title: R Client for the 'ENTSO-E' Transparency Platform API
Version: 0.9.6
Version: 0.9.7
Authors@R: c(person("Kenneth", "Rose", role=c("aut", "cph"), email="kennethrose82@gmail.com"),
person("Sándor", "Budai", role=c("aut", "cre", "cph"), email="sbudai.ga@gmail.com"))
Description: Provides a standardized R client for the 'ENTSO-E' (European Network of
Expand All @@ -15,19 +15,14 @@ Imports:
cachem,
cli,
checkmate,
curl,
data.table,
dplyr,
fs,
httr2,
lubridate,
purrr,
snakecase,
stringr,
tibble,
tidyr,
tidyselect,
utf8,
utils,
xml2,
xmlconvert
Expand All @@ -46,9 +41,10 @@ Suggests:
ggplot2
VignetteBuilder: knitr
Config/testthat/edition: 3
Collate:
Collate:
'entsoeapi-package.R'
'data.R'
'constants.R'
'utils.R'
'en_helpers.R'
'en_market.R'
Expand Down
21 changes: 19 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
# entsoeapi v0.9.6 (2026-03-12)
# entsoeapi v0.9.7 (2026-03-17)

## New functionality

- None.

## Miscellaneous

- 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.

# entsoeapi v0.9.6 (2026-03-12),

## New functionality

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

# entsoeapi v0.9.5.1 (2026-03-09)
Expand Down
9 changes: 9 additions & 0 deletions R/constants.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.api_scheme <- "https://"
.api_domain <- "web-api.tp.entsoe.eu/"
.api_name <- "api?"
.req_timeout <- 60
.max_age <- 3600
possible_eic_chars <- stats::setNames(
object = 0L:36L,
nm = c(as.character(0:9), LETTERS, "-")
)
10 changes: 4 additions & 6 deletions R/en_generation.R
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,9 @@ gen_per_gen_unit <- function(
if (is.null(gen_type)) {
par_matrix <- par_matrix |>
dplyr::mutate(
periodEnd = data.table::shift(
periodEnd = dplyr::lead(
x = periodStart,
type = "lead",
fill = as.POSIXct(
default = as.POSIXct(
x = period_end,
format = "%Y%m%d%H%M",
tz = "UTC"
Expand All @@ -415,10 +414,9 @@ gen_per_gen_unit <- function(
par_matrix <- par_matrix |>
dplyr::group_by(psrType) |>
dplyr::mutate(
periodEnd = data.table::shift(
periodEnd = dplyr::lead(
x = periodStart,
type = "lead",
fill = as.POSIXct(
default = as.POSIXct(
x = period_end,
format = "%Y%m%d%H%M",
tz = "UTC"
Expand Down
Loading
Loading