Skip to content

Commit 8841794

Browse files
committed
Prepare first stable release
1 parent 1bba632 commit 8841794

File tree

15 files changed

+91
-79
lines changed

15 files changed

+91
-79
lines changed

.github/workflows/test-coverage.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
@@ -10,9 +10,10 @@ name: test-coverage
1010

1111
jobs:
1212
test-coverage:
13-
runs-on: macos-latest
13+
runs-on: ubuntu-latest
1414
env:
1515
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1617

1718
steps:
1819
- uses: actions/checkout@v4
@@ -28,18 +29,20 @@ jobs:
2829

2930
- name: Test coverage
3031
run: |
32+
token <- Sys.getenv("CODECOV_TOKEN", "")
3133
covr::codecov(
3234
quiet = FALSE,
3335
clean = FALSE,
34-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
36+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package"),
37+
token = if (token != "") token
3538
)
3639
shell: Rscript {0}
3740

3841
- name: Show testthat output
3942
if: always()
4043
run: |
4144
## --------------------------------------------------------------------
42-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
45+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4346
shell: bash
4447

4548
- name: Upload test results

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ message: 'To cite package "CatastRoNav" in publications use:'
88
type: software
99
license: CC-BY-4.0
1010
title: 'CatastRoNav: Interface to the ''INSPIRE'' services of ''Catastro de Navarra'''
11-
version: 0.0.2.9000
11+
version: 0.1.0
1212
doi: 10.5281/zenodo.6366407
1313
abstract: Access public spatial data available under the 'INSPIRE' directive. Tools
1414
for downloading references, buildings and addresses of properties on Navarre (Spain).
@@ -26,7 +26,7 @@ preferred-citation:
2626
email: diego.hernangomezherrero@gmail.com
2727
orcid: https://orcid.org/0000-0001-8457-4658
2828
year: '2024'
29-
version: 0.0.2.9000
29+
version: 0.1.0
3030
doi: 10.5281/zenodo.6366407
3131
url: https://ropenspain.github.io/CatastRoNav/
3232
abstract: Access public spatial data available under the INSPIRE directive. Tools

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: CatastRoNav
22
Title: Interface to the 'INSPIRE' services of 'Catastro de Navarra'
3-
Version: 0.0.2.9000
3+
Version: 0.1.0
44
Authors@R:
55
person("Diego", "Hernangómez", , "diego.hernangomezherrero@gmail.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0001-8457-4658"))

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
export(catrnav_atom_get_parcels)
44
export(catrnav_atom_get_parcels_db_all)
55
export(catrnav_clear_cache)
6+
export(catrnav_detect_cache_dir)
67
export(catrnav_set_cache_dir)
78
export(catrnav_wfs_get_address_bbox)
89
export(catrnav_wfs_get_buildings_bbox)

NEWS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CatastRoNav (development version)
1+
# CatastRoNav 0.1.0
22

33
- Improve condition handling.
44
- Add a `count` parameter that allows to set the maximum number of features to
@@ -7,7 +7,8 @@
77
- Support for ATOM on cadastral parcels added, see
88
`catrnav_atom_get_parcels()`. Other ATOM capabilities to be added when
99
the Cadastre of Navarra make them available.
10-
- New caching system, see `catrnav_set_cache_dir()`.
10+
- New caching system, see `catrnav_set_cache_dir()` and
11+
`catrnav_detect_cache_dir()`.
1112
- New dependency: **rappdirs** .
1213

1314
# CatastRoNav 0.0.2

R/cache_set.R

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@
33
#' @family cache utilities
44
#' @seealso [rappdirs::user_config_dir()]
55
#'
6-
#' @return An (invisible) character with the path to your `cache_dir`.
6+
#' @rdname catrnav_set_cache_dir
7+
#'
8+
#' @return
9+
#' [catrnav_set_cache_dir()] is called for its side effects, and returns an
10+
#' (invisible) character with the path to your `cache_dir`.
11+
#'
712
#' @description
8-
#' This function will store your `cache_dir` path on your local machine and
9-
#' would load it for future sessions. Type `Sys.getenv("CATASTRONAV_CACHE_DIR")`
10-
#' to find your cached path.
13+
#' [catrnav_set_cache_dir()] will store your `cache_dir` path on your local
14+
#' machine and would load it for future sessions.
1115
#'
1216
#' Alternatively, you can store the `cache_dir` manually with the following
1317
#' options:
1418
#' * Run `Sys.setenv(CATASTRONAV_CACHE_DIR = "cache_dir")`. You would need to
1519
#' run this command on each session (Similar to `install = FALSE`).
16-
#' * Write this line on your `.Renviron` file:
20+
#' * Write this line on your .Renviron file:
1721
#' `CATASTRONAV_CACHE_DIR = "value_for_cache_dir"` (same behavior than
1822
#' `install = TRUE`). This would store your `cache_dir` permanently.
1923
#'
@@ -44,7 +48,6 @@
4448
#' catrnav_set_cache_dir(verbose = TRUE)
4549
#' }
4650
#'
47-
#' Sys.getenv("CATASTRONAV_CACHE_DIR")
4851
#' @export
4952
catrnav_set_cache_dir <- function(cache_dir,
5053
overwrite = FALSE,
@@ -128,6 +131,35 @@ catrnav_set_cache_dir <- function(cache_dir,
128131
}
129132

130133

134+
#' @rdname catrnav_set_cache_dir
135+
#' @name catrnav_detect_cache_dir
136+
#'
137+
#' @export
138+
#'
139+
#' @description
140+
#' [catrnav_detect_cache_dir()] detects and returns the path to your current
141+
#' `cache_dir`.
142+
#'
143+
#' @param ... Ignored
144+
#' @return
145+
#' [catrnav_detect_cache_dir()] returns the path to the `cache_dir` used in this
146+
#' session
147+
#'
148+
#' @examples
149+
#'
150+
#' catrnav_detect_cache_dir()
151+
#'
152+
catrnav_detect_cache_dir <- function(...) {
153+
# nocov start
154+
# This is just a wrapper
155+
156+
list(...)
157+
cache <- catrnav_hlp_detect_cache_dir()
158+
159+
cache
160+
# nocov end
161+
}
162+
131163
#' Detect cache dir for CatastRoNav
132164
#'
133165
#' @noRd

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ A BibTeX entry for LaTeX users is:
8080
title = {{CatastRoNav}: Interface to the {API} {Catastro} de {Navarra}},
8181
author = {Diego Hernangómez},
8282
year = {2024},
83-
version = {0.0.2.9000},
83+
version = {0.1.0},
8484
doi = {10.5281/zenodo.6366407},
8585
url = {https://ropenspain.github.io/CatastRoNav/},
8686
abstract = {Access public spatial data available under the INSPIRE directive. Tools for downloading references, buildings and addresses of properties on Navarre (Spain).},

codemeta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"codeRepository": "https://github.com/rOpenSpain/CatastRoNav",
99
"issueTracker": "https://github.com/rOpenSpain/CatastRoNav/issues",
1010
"license": "https://spdx.org/licenses/CC-BY-4.0",
11-
"version": "0.0.2.9000",
11+
"version": "0.1.0",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",
@@ -190,7 +190,7 @@
190190
},
191191
"SystemRequirements": null
192192
},
193-
"fileSize": "962.98KB",
193+
"fileSize": "961.034KB",
194194
"citation": [
195195
{
196196
"@type": "SoftwareSourceCode",

inst/WORDLIST

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Navarra
1212
ORCID
1313
Olite
1414
Pamplona
15+
Renviron
1516
Royé
1617
SITNA
1718
SRS
1819
WFS
1920
cadastral
2021
cadastre
21-
catrnav
2222
codecov
2323
config
2424
de

inst/schemaorg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"url": "https://r-project.org"
2121
},
2222
"runtimePlatform": "R version 4.4.0 (2024-04-24 ucrt)",
23-
"version": "0.0.2.9000"
23+
"version": "0.1.0"
2424
},
2525
{
2626
"id": "https://doi.org/10.5281/zenodo.6366407",

0 commit comments

Comments
 (0)