From 79dc895f038b2b541dcae8c56be41e72d1b3969e Mon Sep 17 00:00:00 2001 From: Vehbi Sinan Tunalioglu Date: Mon, 20 Jun 2022 07:15:04 +0800 Subject: [PATCH 1/2] chore(build): integrate git-chglog git-chglog is a tool to generate CHANGELOG files. In the context of R, we will be generating NEWS.md with this tool. --- .Rbuildignore | 1 + .chglog/CHANGELOG.tpl.md | 56 ++++++++++++++++++++++++++++++++++++++++ .chglog/config.yml | 28 ++++++++++++++++++++ NEWS | 54 -------------------------------------- NEWS.md | 41 +++++++++++++++++++++++++++++ shell.nix | 2 ++ 6 files changed, 128 insertions(+), 54 deletions(-) create mode 100755 .chglog/CHANGELOG.tpl.md create mode 100755 .chglog/config.yml delete mode 100644 NEWS create mode 100644 NEWS.md diff --git a/.Rbuildignore b/.Rbuildignore index 6ca5028..54b5b33 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,3 +1,4 @@ +.chglog .lintr ^.*\.Rproj$ ^\.Rproj\.user$ diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100755 index 0000000..5683d03 --- /dev/null +++ b/.chglog/CHANGELOG.tpl.md @@ -0,0 +1,56 @@ +{{ if .Versions -}} + +## [Unreleased] + +{{ if .Unreleased.CommitGroups -}} +{{ range .Unreleased.CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{ range .Versions }} + +## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }} +{{ range .CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} + +{{- if .RevertCommits -}} +### Reverts +{{ range .RevertCommits -}} +- {{ .Revert.Header }} +{{ end }} +{{ end -}} + +{{- if .MergeCommits -}} +### Pull Requests +{{ range .MergeCommits -}} +- {{ .Header }} +{{ end }} +{{ end -}} + +{{- if .NoteGroups -}} +{{ range .NoteGroups -}} +### {{ .Title }} +{{ range .Notes }} +{{ .Body }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{- if .Versions }} +[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD +{{ range .Versions -}} +{{ if .Tag.Previous -}} +[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }} +{{ end -}} +{{ end -}} +{{ end -}} \ No newline at end of file diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100755 index 0000000..3b6c994 --- /dev/null +++ b/.chglog/config.yml @@ -0,0 +1,28 @@ +style: github +template: CHANGELOG.tpl.md +info: + title: CHANGELOG + repository_url: https://github.com/teloscube/rdecaf +options: + commits: + # filters: + # Type: + # - feat + # - fix + # - perf + # - refactor + commit_groups: + # title_maps: + # feat: Features + # fix: Bug Fixes + # perf: Performance Improvements + # refactor: Code Refactoring + header: + pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$" + pattern_maps: + - Type + - Scope + - Subject + notes: + keywords: + - BREAKING CHANGE \ No newline at end of file diff --git a/NEWS b/NEWS deleted file mode 100644 index d46c8eb..0000000 --- a/NEWS +++ /dev/null @@ -1,54 +0,0 @@ -VERS: 2019-05-08 ------- release/0.0.5 - - * 2019-05-08 6fd78f8 [improve] Bump version to 0.0.5 (vst@vsthost.com) - * 2019-05-08 be3c28c [docs] Missing Rd files (vst@vsthost.com) - * 2019-05-08 e6b888e [improve] Add multipart form (for file uploads) (vst@vsthost.com) - * 2018-06-10 cce93f9 [improve] Allow TOKEN Auth in addition to KEY Auth (vst@vsthost.com) - * 2018-03-13 f47d61b [chore] Development version bumped to 0.0.4.9000 (vst@vsthost.com) - -VERS: 2018-03-13 2d0f3be 0.0.4 (vst@vsthost.com) - - * 2018-03-13 26d1654 Merge branch 'release/0.0.4' (vst@vsthost.com) - * 2018-03-13 f075aea [release] Change log updated (vst@vsthost.com) - * 2018-03-13 684a250 [release] Version bumped to 0.0.4 (vst@vsthost.com) - * 2018-03-09 67d5743 [fix] Adapting to the new authorization header key (vst@vsthost.com) - * 2018-03-06 81e9fb9 [fix] Adapting to new API authentication mechanism (vst@vsthost.com) - * 2018-03-06 0035417 [chore] Development version bumped to 0.0.3.9000 (vst@vsthost.com) - -VERS: 2018-03-06 2b30eac 0.0.3 (vst@vsthost.com) - - * 2018-03-06 5e40c3d Merge branch 'release/0.0.3' (vst@vsthost.com) - * 2018-03-06 55d1b7f [release] Change log updated (vst@vsthost.com) - * 2018-03-06 1799561 [release] Version bumped to 0.0.3 (vst@vsthost.com) - * 2017-09-08 2f25299 [fix] Packaging and documentation fixes (vst@vsthost.com) - * 2017-09-08 9db23e8 [chore] Updating sandbox (vst@vsthost.com) - * 2017-09-08 10604b4 [fix] Fix to getLedger to adopt API changes (vst@vsthost.com) - * 2017-09-08 a16089d [improve] Added PUT, PATCH and DELETE resources (vst@vsthost.com) - * 2017-07-10 9d942a4 [chore] Development version bumped to 0.0.2.9000 (vst@vsthost.com) - -VERS: 2017-07-10 e91e33a 0.0.2 (vst@vsthost.com) - - * 2017-07-10 3b0040d Merge branch 'release/0.0.2' (vst@vsthost.com) - * 2017-07-10 72a03ae [release] Change log updated (vst@vsthost.com) - * 2017-07-10 f364aeb [release] Version bumped to 0.0.2 (vst@vsthost.com) - * 2017-07-08 65220e7 [chore] Adopting changes on API authentication (vst@vsthost.com) - * 2017-05-16 7c02193 [chore] Suppressing marshalling messages during httr::content (vst@vsthost.com) - * 2017-04-05 235f9ce [feature] Added uploadOHLC and getSymbolsOfInterest functions (vst@vsthost.com) - * 2017-04-05 81b3819 [feature] Added `postResource` method (vst@vsthost.com) - * 2017-03-20 201eb40 [feature] Added account retrieval queries (by ID or name) (vst@vsthost.com) - * 2017-03-19 460d829 [chore] Development version bumped to 0.0.1.9000 (vst@vsthost.com) - -VERS: 2017-03-19 c9a78f1 0.0.1 (vst@vsthost.com) - - * 2017-03-19 b39a8d1 Merge branch 'release/0.0.1' (vst@vsthost.com) - * 2017-03-19 e1f5b3d [release] Change log updated (vst@vsthost.com) - * 2017-03-19 c46cea8 [release] Added README file (vst@vsthost.com) - * 2017-03-19 811a0fc [release] Version bumped to 0.0.1 (vst@vsthost.com) - * 2017-03-19 9e9caf2 [chore] Getting ready for the initial release (vst@vsthost.com) - * 2017-03-16 0b853ae [feature] Added query functions for artifacts and ledgers (vst@vsthost.com) - * 2017-03-04 2326098 [fix] Profile is not defaulting when making sessions (vst@vsthost.com) - * 2017-03-03 103e652 [fix] R version dependency changed (vst@vsthost.com) - * 2017-02-12 3191270 [chore] Auth, session and profile concepts are landing (vst@vsthost.com) - * 2017-02-04 2a23df0 [chore] Reorganising profiles and sessions (vst@vsthost.com) - * 2017-02-03 c369b28 [feature] Initial commit with `getResource` function (vst@vsthost.com) - * 2017-02-03 9c44bdb Initial commit (vst@vsthost.com) diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..c876c57 --- /dev/null +++ b/NEWS.md @@ -0,0 +1,41 @@ + +## [Unreleased] + +### Chore +- prefix all source files with depr_ +- update LICENSE +- review DecafClient implementation +- update DESCRIPTION +- **build:** attend check notice +- **build:** bump roxygen2 version +- **dev:** configure linter +- **dev:** add Nix shell +- **dev:** add lintr configuration +- **docs:** revisit the documentation of DecafClient class +- **docs:** regenerate R documentation files +- **docs:** start tutorial document + +### Feat +- add bare DECAF HTTP client + + + +## [0.0.5] - 2019-05-08 + + +## [0.0.4] - 2018-03-13 + + +## [0.0.3] - 2018-03-06 + + +## [0.0.2] - 2017-07-10 + + +## 0.0.1 - 2017-03-19 + +[Unreleased]: https://github.com/teloscube/rdecaf/compare/0.0.5...HEAD +[0.0.5]: https://github.com/teloscube/rdecaf/compare/0.0.4...0.0.5 +[0.0.4]: https://github.com/teloscube/rdecaf/compare/0.0.3...0.0.4 +[0.0.3]: https://github.com/teloscube/rdecaf/compare/0.0.2...0.0.3 +[0.0.2]: https://github.com/teloscube/rdecaf/compare/0.0.1...0.0.2 diff --git a/shell.nix b/shell.nix index fcd64fa..782ab00 100644 --- a/shell.nix +++ b/shell.nix @@ -23,5 +23,7 @@ in mkShell { buildInputs = [ thisR + + pkgs.git-chglog ]; } From e8c6c2ea9890412a0f5b75bc113c79cf35c85f2c Mon Sep 17 00:00:00 2001 From: Vehbi Sinan Tunalioglu Date: Mon, 20 Jun 2022 07:30:48 +0800 Subject: [PATCH 2/2] chore(docs): update README.md --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f009d12..5d5c041 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,63 @@ -# rdecaf: An API Client Library for DECAF suite +# rdecaf: DECAF API Client for R Language -> TODO: Provide a more detailed README. +*rdecaf* is an R library that provides client functionality to DECAF API suite. + +DECAF is a proprietary Financial Portfolio Management, Analytics, Reporting and +Productivity Suite offered as a Software as a Service (SaaS) solution. It +provides an API suite over HTTP exposing its functionality and data it hosts. +*rdecaf* is used internally to enhance DECAF's own functionality, and by +third-parties to integrate into third-party systems. + +## Installation + +*rdecaf* is currently NOT on CRAN. A typical way to install *rdecaf* is via +[devtools](https://devtools.r-lib.org/). For latest released version: + +```sh +devtools::install_github("teloscube/rdecaf", ref = "main", upgrade = "ask") +``` + +... and for the development version: + +```sh +devtools::install_github("teloscube/rdecaf", ref = "develop", upgrade = "ask") +``` + +## Development + +Development is carried on under a [Nix](https://nixos.org/explore.html) Shell. +If you are on Nix, you can enter the Nix Shell provided with: + +```sh +nix-shell +``` + +A few things to note: + +1. Make sure that the package is in good shape: + + ```sh + devtools::check(".") + ``` + +2. We are using [Semantic Versioning](https://semver.org/). However, we have NOT + released a major version YET. Therefore, expect breaking changes between + releases. +3. We are using [Conventional + Commits](https://www.conventionalcommits.org/en/v1.0.0/) since the + development version `0.0.5.9000`. Make sure that your commit messages are + compliant to these conventions. This will ensure a nice, automated changelog + ([./NEWS.md](./NEWS.md)) generation. +4. Development is carried under the `develop` branch. Pull Requests (PRs) are + preferred over direct commits to `develop` branch. +5. `main` branch is for the latest released version. No development shall be + done against the `main` branch. +6. We do not have strong preference over core formatting YET. We are currently + using the `lintr` tool for this purposes. This can change or `.lintr` + configuration may change over time. + +## LICENSE + +This work is released under MIT license. + +See [./LICENSE](./LICENSE).