smvr
Simple implementation of Semantic Versioning 2.0.0 (SemVer) on R
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.9%) to scientific vocabulary
Keywords
r
s3-vectors
Last synced: 10 months ago
·
JSON representation
Repository
Simple implementation of Semantic Versioning 2.0.0 (SemVer) on R
Basic Info
- Host: GitHub
- Owner: eitsupi
- License: other
- Language: R
- Default Branch: main
- Homepage: https://eitsupi.github.io/smvr/
- Size: 1.19 MB
Statistics
- Stars: 8
- Watchers: 0
- Forks: 0
- Open Issues: 2
- Releases: 2
Topics
r
s3-vectors
Created about 1 year ago
· Last pushed 10 months ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# smvr
[](https://CRAN.R-project.org/package=smvr)
[](https://eitsupi.r-universe.dev/smvr)
Simple implementation of [Semantic Versioning 2.0.0](https://semver.org/) on R.
smvr provides a lightweight, fully vectorized R class for Semantic Versioning.
It enables type-safe manipulation, comparison, and sorting of version numbers,
and integrates smoothly with tidyverse tools.
## Installation
Install the latest release version from CRAN:
```r
install.packages("smvr")
```
The development version can be installed from GitHub:
```r
pak::pak("eitsupi/smvr")
```
## Example
```{r example}
library(smvr)
# Parse version characters into smvr objects
v <- parse_semver(c("1.0.0", "1.0.0-alpha.2", "1.0.0-alpha.10", "1.0.1+20250621", "0.9.0"))
# Sort versions
sort(v)
# Can compare with string notation
v["1.0.0-alpha" < v & v < "1.0.0"]
# Works with tibble data frame and dplyr
tibble::tibble(version = v) |>
dplyr::arrange(version) |>
dplyr::mutate(
`>= 1.0.0` = version >= "1.0.0",
`pre-release` = is_pre_release(version),
)
```
## Features
- Fully vectorized Semantic Versioning class.
- Type-safe comparison and sorting.
- Tidyverse compatibility (`{tibble}`, `{dplyr}`, etc.).
- No dependencies except `{vctrs}`.
## Related Works
- The numeric version class vector can be crated with `numeric_version()` in base R works well for versions
that only have MAJOR.MINOR.PATCH. But it does not support pre-release identifiers of SemVer,
so in the case of including pre-release versions, it is not suitable.
- The [semver](https://CRAN.R-project.org/package=semver) package is a wrapper for a C++ SemVer parser.
The class provided by this package is a special list, which does not work well with `{tibble}` and `{dplyr}`.
- The [semverutils](https://CRAN.R-project.org/package=semverutils) package has a SemVer parser written in R.
It creates a single version as an `{R6}` object, which is not vectorized.
Also, at the moment (version 0.1.0, published 2020-02-22 on CRAN),
it has a bug in comparing pre-release versions[^semverutils], so it does not work correctly.
[^semverutils]:
Owner
- Login: eitsupi
- Kind: user
- Location: Tokyo, Japan
- Twitter: eitsupi
- Repositories: 148
- Profile: https://github.com/eitsupi
GitHub Events
Total
- Create event: 20
- Issues event: 3
- Watch event: 4
- Delete event: 19
- Issue comment event: 4
- Public event: 1
- Push event: 72
- Pull request review comment event: 4
- Pull request review event: 3
- Pull request event: 39
Last Year
- Create event: 20
- Issues event: 3
- Watch event: 4
- Delete event: 19
- Issue comment event: 4
- Public event: 1
- Push event: 72
- Pull request review comment event: 4
- Pull request review event: 3
- Pull request event: 39
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 2
- Total pull requests: 27
- Average time to close issues: about 13 hours
- Average time to close pull requests: about 3 hours
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 2.5
- Average comments per pull request: 0.0
- Merged pull requests: 27
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 27
- Average time to close issues: about 13 hours
- Average time to close pull requests: about 3 hours
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 2.5
- Average comments per pull request: 0.0
- Merged pull requests: 27
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- eitsupi (2)
Pull Request Authors
- eitsupi (46)
- dependabot[bot] (1)
Top Labels
Issue Labels
documentation (1)
Pull Request Labels
dependencies (1)
github_actions (1)
Packages
- Total packages: 1
-
Total downloads:
- cran 207 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
cran.r-project.org: smvr
Simple Implementation of Semantic Versioning (SemVer)
- Homepage: https://eitsupi.github.io/smvr/
- Documentation: http://cran.r-project.org/web/packages/smvr/smvr.pdf
- License: MIT + file LICENSE
-
Latest release: 0.2.1
published 10 months ago
Rankings
Dependent packages count: 26.2%
Dependent repos count: 32.2%
Average: 48.3%
Downloads: 86.4%
Maintainers (1)
Last synced:
10 months ago
Dependencies
DESCRIPTION
cran
- cli >= 3.4.0 imports
- rlang >= 1.1.0 imports
- vctrs * imports
- dplyr * suggests
- testthat >= 3.0.0 suggests
- tibble * suggests