Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[noref] Reduce package dependencies #72

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

Conversation

MKyhos
Copy link
Member

@MKyhos MKyhos commented Dec 2, 2022

No description provided.

pr130 and others added 4 commits February 14, 2022 14:31
* [#5] Init sketchy article about crul / api

* some more mental notes, url_parse and typo fixes

* setup vcr

* fix error in koboclient class

* add an example where we only set the baseurl in initialize

* refactoring of client class to use super init

* minimal test example (not working)

* Clarify/correct base url /url building

- Adding a note to the shorter legacy URLs
- Adding a comment to passing the path/parameters on get method

* Elaborating a bit on the wrapper function

- client as input
- example how to get ALL the data

* kobo class and koboclient class with get

* Squashed commit of the vignette article:

Merged without PR since it has no effects on the pure
package code.

commit 5fc78c0
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Sun May 2 23:50:46 2021 +0200

    Add vignette directory gitignore

commit f4f737d
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Sun May 2 23:49:57 2021 +0200

    Update article/vignette

    - some formatting
    - adding notes
    -

commit 7cfa4a9
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Sun May 2 19:00:16 2021 +0200

    Elaborating a bit on the wrapper function

    - client as input
    - example how to get ALL the data

commit 0ab0cac
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Sun May 2 18:11:04 2021 +0200

    Clarify/correct base url /url building

    - Adding a note to the shorter legacy URLs
    - Adding a comment to passing the path/parameters on get method

commit d483904
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 22:27:34 2021 +0200

    add an example where we only set the baseurl in initialize

commit bafa2ce
Author: Frie <fr1e@pm.me>
Date:   Tue Apr 27 22:51:46 2021 +0200

    some more mental notes, url_parse and typo fixes

commit 5cf275f
Merge: d12170d 156ed19
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Mon Apr 26 23:26:20 2021 +0200

    Merge branch 'main' into basics-in-crul

commit d12170d
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Mon Apr 26 23:16:00 2021 +0200

    [#5] Init sketchy article about crul / api

* push missing files 🤦

* i should not code when tired - still not fixed

* Basic `Kobo` and `KoboClient` Classes (#20)

Kobo

high-level class
intended user: analysts
initialized by passing base_url_v2 (and optionally base_url_v1) and the token, separate KoboClient objects
are constructed for v2 (and optionally v2) in the constructor (see below).
exposes (so far): get and get_assets
KoboClient

low-level class
initiailzed by passing a base_url (generic) and the token
exposes (so far): get
Note: The conceptualization of base_url has changed: instead of https://kobo.correlaid.org/api/v2, a base url is
now only the https://kobo.correlaid.org/ . we take care of adding the suffix in Kobo$get or it needs to be
passed manually to KoboClient$get.

**Commit history:**

* kobo class and koboclient class with get

* push missing files 🤦

* Extend documentation: KoboClient

- Add some WIP descriptions for any method, and parameter
- Add export statement
- Unfortunately, @inheritParams does not seem to work well with
superclasses in R6.... yet!
See r-lib/roxygen2#996

* Extend documentation: Kobo, harmonize function

- Add WIP description for all methods and parameters
- Add export statement
- Harmonize Kobo$initialize method, defaulting to Sys.getenv
instead of NULL (token)

* Minor code rearrangements / fixes

- In R6 classes, class name in first row
- Bring the inherit field upfront in KoboClient
- Delete obsolete inheritance field in Kobo
- Make code stay within 80 characters
- Test for Kobo: expect list instead of character (we had already
added the jsonlite::fromJSON() parsing in KoboClient$get())

* Minor code and docs improvement

-  see the changed files :see-no-evil:

* Adding checkmate to imports

* Updating KoboClient documentation

* Remove obsolete argument checking from Kobo

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

* first trial with POST (upload new xls form)

1. doesn't work yet. status 200 but nothing happens on the kobo page
2. for some reason path with "api/v2/" part returns 404. but works without it

* delete getting started tests

* basic http tests for kobo and kobo client

* enable tests on main and dev (as well as PR)

* disable tests again for PRs against dev

* add missing vcr_dir definition

* Change expected error message

* POST request - deploying an asset

* more flexible regex for incorrect host error

* add code coverage with covr

* regexp without host name

* more post request trials

1. none is successful so far
2. moved all the post requests to the end in the separate chunk

* Revert "more post request trials"

This reverts commit dc56c4d.

* Revert "POST request - deploying an asset"

This reverts commit 595aa68.

* Revert "first trial with POST (upload new xls form)"

This reverts commit ee40ab5.

* rename kobo client test file for consistency

* Add overview over response structures (#31)

* draft overview

* Get surveyObject, helper-function

* get test block

* Update response_overview

* comparison of names, details for question type

* use cases draft and some rearrangements

* Update response_overview.Rmd

* add 2 use cses, templates and blocks

* how to get submissions

* some more explanation on the comparison

Co-authored-by: hammti <timm.hamm@outlook.de>

* Refactoring base class (#27)

* Addressing two of issues Lada & Timm have detected

- Double checking of kobo_token: remove check from Kobo class, only
have it in KoboClient.
- Wrong checking: tested on envvar instead of kobo_token

* Adding first tests for Kobo class

* Update rendered docs

* remove example test

* message if no baseurl provided for api v1

* move 403 test to koboclient

* split tests

* remove duplicate tests

* Squashed commit of the following:

commit 6a684cf
Author: Frie <fr1e@pm.me>
Date:   Sun May 16 20:33:46 2021 +0200

    rename kobo client test file for consistency

commit 573b253
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Sun May 16 13:36:43 2021 +0200

    Revert "first trial with POST (upload new xls form)"

    This reverts commit ee40ab5.

commit ebc6cde
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Sun May 16 13:35:53 2021 +0200

    Revert "POST request - deploying an asset"

    This reverts commit 595aa68.

commit 3867429
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Sun May 16 13:33:21 2021 +0200

    Revert "more post request trials"

    This reverts commit dc56c4d.

commit dc56c4d
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Thu May 13 18:02:01 2021 +0200

    more post request trials

    1. none is successful so far
    2. moved all the post requests to the end in the separate chunk

commit b79eee7
Merge: 595aa68 647ac91
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 17:20:07 2021 +0200

    Merge pull request #25 from CorrelAid/httptesting

    Set up http testing with vcr

commit 647ac91
Merge: 7be468b 69ee2b0
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Thu May 13 17:03:58 2021 +0200

    Merge branch 'httptesting' of github.com:CorrelAid/kbtbr into httptesting

commit 7be468b
Merge: 6f17725 42d0888
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Thu May 13 17:03:45 2021 +0200

    Check on test error regex

commit 69ee2b0
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 17:03:00 2021 +0200

    regexp without host name

commit a9d407b
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 17:01:43 2021 +0200

    add code coverage with covr

commit 42d0888
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 16:54:37 2021 +0200

    more flexible regex for incorrect host error

commit 595aa68
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Tue May 11 23:35:34 2021 +0200

    POST request - deploying an asset

commit 6f17725
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Tue May 11 21:58:22 2021 +0200

    Change expected error message

commit 2915b36
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 16:51:52 2021 +0200

    add missing vcr_dir definition

commit 1c86af5
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 16:48:53 2021 +0200

    disable tests again for PRs against dev

commit 37678ba
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 15:52:06 2021 +0200

    enable tests on main and dev (as well as PR)

commit 2306b51
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 15:50:23 2021 +0200

    basic http tests for kobo and kobo client

commit d487297
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 15:23:32 2021 +0200

    delete getting started tests

commit 89a45c2
Merge: 936a2b7 eb2b780
Author: Frie <fr1e@pm.me>
Date:   Wed May 5 21:37:54 2021 +0200

    Merge branch 'dev' into httptesting

commit 936a2b7
Author: Frie <fr1e@pm.me>
Date:   Mon May 3 22:22:32 2021 +0200

    i should not code when tired - still not fixed

commit 9f6fded
Merge: fdc5d83 ee7111b
Author: Frie <fr1e@pm.me>
Date:   Mon May 3 22:11:01 2021 +0200

    Merge branch 'dimi-malte-frie-experiments' into httptesting

commit ee7111b
Author: Frie <fr1e@pm.me>
Date:   Mon May 3 21:00:26 2021 +0200

    push missing files :facepalm:

commit 45a8723
Author: Frie <fr1e@pm.me>
Date:   Sun May 2 23:03:46 2021 +0200

    kobo class and koboclient class with get

commit fdc5d83
Merge: cd511f3 7cfa4a9
Author: Frie <fr1e@pm.me>
Date:   Sun May 2 19:24:54 2021 +0200

    Merge branch 'basics-in-crul' into httptesting

commit 7cfa4a9
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Sun May 2 19:00:16 2021 +0200

    Elaborating a bit on the wrapper function

    - client as input
    - example how to get ALL the data

commit 0ab0cac
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Sun May 2 18:11:04 2021 +0200

    Clarify/correct base url /url building

    - Adding a note to the shorter legacy URLs
    - Adding a comment to passing the path/parameters on get method

commit cd511f3
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 22:42:04 2021 +0200

    minimal test example (not working)

commit 5cc3ed0
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 22:41:50 2021 +0200

    refactoring of client class to use super init

commit d483904
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 22:27:34 2021 +0200

    add an example where we only set the baseurl in initialize

commit 2d0b656
Merge: 6a42d28 156ed19
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 21:43:34 2021 +0200

    Merge branch 'main' into httptesting

commit 6a42d28
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 21:42:09 2021 +0200

    setup vcr

commit bafa2ce
Author: Frie <fr1e@pm.me>
Date:   Tue Apr 27 22:51:46 2021 +0200

    some more mental notes, url_parse and typo fixes

commit 5cf275f
Merge: d12170d 156ed19
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Mon Apr 26 23:26:20 2021 +0200

    Merge branch 'main' into basics-in-crul

commit d12170d
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Mon Apr 26 23:16:00 2021 +0200

    [#5] Init sketchy article about crul / api

* merge dev again

Co-authored-by: Frie <fr1e@pm.me>

* Kobo accepts sessions (#35)

* Addressing two of issues Lada & Timm have detected

- Double checking of kobo_token: remove check from Kobo class, only
have it in KoboClient.
- Wrong checking: tested on envvar instead of kobo_token

* Adding first tests for Kobo class

* Update rendered docs

* remove example test

* message if no baseurl provided for api v1

* move 403 test to koboclient

* split tests

* remove duplicate tests

* Squashed commit of the following:

commit 6a684cf
Author: Frie <fr1e@pm.me>
Date:   Sun May 16 20:33:46 2021 +0200

    rename kobo client test file for consistency

commit 573b253
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Sun May 16 13:36:43 2021 +0200

    Revert "first trial with POST (upload new xls form)"

    This reverts commit ee40ab5.

commit ebc6cde
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Sun May 16 13:35:53 2021 +0200

    Revert "POST request - deploying an asset"

    This reverts commit 595aa68.

commit 3867429
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Sun May 16 13:33:21 2021 +0200

    Revert "more post request trials"

    This reverts commit dc56c4d.

commit dc56c4d
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Thu May 13 18:02:01 2021 +0200

    more post request trials

    1. none is successful so far
    2. moved all the post requests to the end in the separate chunk

commit b79eee7
Merge: 595aa68 647ac91
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 17:20:07 2021 +0200

    Merge pull request #25 from CorrelAid/httptesting

    Set up http testing with vcr

commit 647ac91
Merge: 7be468b 69ee2b0
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Thu May 13 17:03:58 2021 +0200

    Merge branch 'httptesting' of github.com:CorrelAid/kbtbr into httptesting

commit 7be468b
Merge: 6f17725 42d0888
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Thu May 13 17:03:45 2021 +0200

    Check on test error regex

commit 69ee2b0
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 17:03:00 2021 +0200

    regexp without host name

commit a9d407b
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 17:01:43 2021 +0200

    add code coverage with covr

commit 42d0888
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 16:54:37 2021 +0200

    more flexible regex for incorrect host error

commit 595aa68
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Tue May 11 23:35:34 2021 +0200

    POST request - deploying an asset

commit 6f17725
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Tue May 11 21:58:22 2021 +0200

    Change expected error message

commit 2915b36
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 16:51:52 2021 +0200

    add missing vcr_dir definition

commit 1c86af5
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 16:48:53 2021 +0200

    disable tests again for PRs against dev

commit 37678ba
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 15:52:06 2021 +0200

    enable tests on main and dev (as well as PR)

commit 2306b51
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 15:50:23 2021 +0200

    basic http tests for kobo and kobo client

commit d487297
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 15:23:32 2021 +0200

    delete getting started tests

commit 89a45c2
Merge: 936a2b7 eb2b780
Author: Frie <fr1e@pm.me>
Date:   Wed May 5 21:37:54 2021 +0200

    Merge branch 'dev' into httptesting

commit 936a2b7
Author: Frie <fr1e@pm.me>
Date:   Mon May 3 22:22:32 2021 +0200

    i should not code when tired - still not fixed

commit 9f6fded
Merge: fdc5d83 ee7111b
Author: Frie <fr1e@pm.me>
Date:   Mon May 3 22:11:01 2021 +0200

    Merge branch 'dimi-malte-frie-experiments' into httptesting

commit ee7111b
Author: Frie <fr1e@pm.me>
Date:   Mon May 3 21:00:26 2021 +0200

    push missing files :facepalm:

commit 45a8723
Author: Frie <fr1e@pm.me>
Date:   Sun May 2 23:03:46 2021 +0200

    kobo class and koboclient class with get

commit fdc5d83
Merge: cd511f3 7cfa4a9
Author: Frie <fr1e@pm.me>
Date:   Sun May 2 19:24:54 2021 +0200

    Merge branch 'basics-in-crul' into httptesting

commit 7cfa4a9
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Sun May 2 19:00:16 2021 +0200

    Elaborating a bit on the wrapper function

    - client as input
    - example how to get ALL the data

commit 0ab0cac
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Sun May 2 18:11:04 2021 +0200

    Clarify/correct base url /url building

    - Adding a note to the shorter legacy URLs
    - Adding a comment to passing the path/parameters on get method

commit cd511f3
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 22:42:04 2021 +0200

    minimal test example (not working)

commit 5cc3ed0
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 22:41:50 2021 +0200

    refactoring of client class to use super init

commit d483904
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 22:27:34 2021 +0200

    add an example where we only set the baseurl in initialize

commit 2d0b656
Merge: 6a42d28 156ed19
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 21:43:34 2021 +0200

    Merge branch 'main' into httptesting

commit 6a42d28
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 21:42:09 2021 +0200

    setup vcr

commit bafa2ce
Author: Frie <fr1e@pm.me>
Date:   Tue Apr 27 22:51:46 2021 +0200

    some more mental notes, url_parse and typo fixes

commit 5cf275f
Merge: d12170d 156ed19
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Mon Apr 26 23:26:20 2021 +0200

    Merge branch 'main' into basics-in-crul

commit d12170d
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Mon Apr 26 23:16:00 2021 +0200

    [#5] Init sketchy article about crul / api

* merge dev again

* Kobo accept sessions

* Included test for session argument

* code style fix

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>
Co-authored-by: Frie <fr1e@pm.me>

* Fix cran checks, license, description, code styling (#38)

* add authors and license

* description and maintainer

* use importfrom only to cancel note

* Housekeeping #18 run styler::style_pkg()

* delete getting started file

* #46 style with 4 spaces indentation instead of 2 (#47)

* #49 indent with 4 spaces instead of 2

* #49 add pr command to style

* fix warning and note

* relax test regexp in attempt to fix windows..

* add a maintainer

* Post patch methods (#32)

* Add first WIP examples for post/patch

* [#21] Add other WIP examples for post/patch

- does somewhat work for creating/cloning
- does not work for deploying (PATCH)

* #21 add post method for KoboClient

1. check on whether body is character doesn't check whether this character is json-like string
2. added helper function converting lists to json-like strings.

* post high level methods trials

* Includes raise exception if post message fails.

* remove print, add test

* Add deploy_asset, create_asset, import_xls_form methods to the Kobo class

Also add parameters names and descriptions to these methods + document them

* Adjust Kobo$post for forms importing, create tests (on success) for POST methods

* Update R/kobo-client.R

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

* Update R/kobo.R

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

* PR review upd

* PR review upd

* Update documentation

* Apply styling (with styler)

* Suppress Kobo message during tests

* Change expect_equal to expect_true

* remove create asset method

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>
Co-authored-by: Dimitri Marinelli <dimitri-mar@users.noreply.github.com>
Co-authored-by: Frie <fr1e@pm.me>

* [#2] | Add pkgdown documentation (#44)

* Initialize pkgdown with gh actions

* Temp. disable code rendering in articles

* Add stuff to rbuildignore

* Install devtools in GH action

* temp add package dependencies

* Try dynamic branches

* Test branch folders...

* test on ubuntu

* try with i.bak

* try AGAIN

* ..

* ANOTHER try...

* try againainaisn

* Revert "test on ubuntu"

This reverts commit 19435e1.

* Update stuff

* Use endbug add-and-commit GH action

* Fix git add argument

* Change runner

* Switch to pak

* set upstream when pushing

* recursively create folders

* reset pkgdown after build

* checkout pkgdown, not overwrite

* redirect to main, add links to readme

* test switching to pkgdown deploy to branch

* git setup

* use cache from pak example, clean argument

* build in tmp directory, move afterwards

* delete wrong code

* Squashed commit of the following:

commit fc7a1d2
Author: Lada Rudnitckaia <lada.rudnitckaia@gmail.com>
Date:   Mon Jun 28 08:30:39 2021 +0200

    Post patch methods (#32)

    * Add first WIP examples for post/patch

    * [#21] Add other WIP examples for post/patch

    - does somewhat work for creating/cloning
    - does not work for deploying (PATCH)

    * #21 add post method for KoboClient

    1. check on whether body is character doesn't check whether this character is json-like string
    2. added helper function converting lists to json-like strings.

    * post high level methods trials

    * Includes raise exception if post message fails.

    * remove print, add test

    * Add deploy_asset, create_asset, import_xls_form methods to the Kobo class

    Also add parameters names and descriptions to these methods + document them

    * Adjust Kobo$post for forms importing, create tests (on success) for POST methods

    * Update R/kobo-client.R

    Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

    * Update R/kobo.R

    Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

    * PR review upd

    * PR review upd

    * Update documentation

    * Apply styling (with styler)

    * Suppress Kobo message during tests

    * Change expect_equal to expect_true

    * remove create asset method

    Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>
    Co-authored-by: Dimitri Marinelli <dimitri-mar@users.noreply.github.com>
    Co-authored-by: Frie <fr1e@pm.me>

commit a9887ae
Author: Frie <fr1e@pm.me>
Date:   Mon Jun 21 21:44:26 2021 +0200

    add a maintainer

commit 57162b8
Author: Frie <fr1e@pm.me>
Date:   Mon Jun 21 21:29:27 2021 +0200

    relax test regexp in attempt to fix windows..

commit 4bfc8d3
Author: Frie <fr1e@pm.me>
Date:   Mon Jun 21 21:27:48 2021 +0200

    fix warning and note

commit c35c31f
Author: Frie <fr1e@pm.me>
Date:   Mon Jun 21 21:13:36 2021 +0200

    * #49 indent with 4 spaces instead of 2

    * #49 add pr command to style

commit a13193a
Author: Frie <fr1e@pm.me>
Date:   Sun Jun 13 18:12:38 2021 +0200

    Fix cran checks, license, description, code styling (#38)

    * add authors and license

    * description and maintainer

    * use importfrom only to cancel note

    * Housekeeping #18 run styler::style_pkg()

    * delete getting started file

* add URL field to description

* checkout gh-pages before moving files

* correctly checkout branch

* check out ghpages again..

* track branch locally , not detached

Co-authored-by: Frie <fr1e@pm.me>

* Issue29 manage output get (#45)

* Add first WIP examples for post/patch

* [#21] Add other WIP examples for post/patch

- does somewhat work for creating/cloning
- does not work for deploying (PATCH)

* #21 add post method for KoboClient

1. check on whether body is character doesn't check whether this character is json-like string
2. added helper function converting lists to json-like strings.

* post high level methods trials

* Includes raise exception if post message fails.

* Json as optional argument

* removed parser for results in post method

* fixed json format and parser, test are todo

* cherries from asset branch pluse minor documentation changes

* improved documentation get methods

* Code styled!

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>
Co-authored-by: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Co-authored-by: Frie <fr1e@pm.me>

* Asset class (#43)

* Add first WIP examples for post/patch

* [#21] Add other WIP examples for post/patch

- does somewhat work for creating/cloning
- does not work for deploying (PATCH)

* #21 add post method for KoboClient

1. check on whether body is character doesn't check whether this character is json-like string
2. added helper function converting lists to json-like strings.

* post high level methods trials

* Includes raise exception if post message fails.

* Json as optional argument

* removed parser for results in post method

* fixed json format and parser, test are todo

* initial draft of asset class

* add missing fields  in initialization

* update documentation

* better naming

* default parse=True, fix tests and docs

* kobo client docs update

* pass Kobo instance to Asset

* fix frm merge

* use active fields

* add tests, remove clone_asset

* test only one case per asset type

* styling

* improved documentation get methods

* fix cran check warnings

* styling, fix  after merge

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>
Co-authored-by: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Co-authored-by: Dimitri Marinelli <dimitri-mar@users.noreply.github.com>

* add tests on expected errors for existing kobo post methods (#49)

* add tests on expected errors for existing kobo post methods

* Apply style guide

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

* Create asset #40 (#51)

* add kobo$create_asset method and tests #40

* move helper list_as_json_char fucntion to utils

* Use lists for sector and country field

* Add additional assertions to function

* Apply style guide

* [#40] Add checkmate package indicator

* [#40] Update Rd for Kobo with new list definition

* [#40] Updatetests with country/sector structure

* #40 #51 adjustments after the review

* #40 #51 adjustments before the merge

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

* [#26] Enforce trailing slashes for `POST` and `GET` (#54)

* [#26] Add trailing slash to post and get requests

* [#26] Add check_repair_path function

* Add test for function

* Set noRd tag for internal function

* this test is not helpful at all.

* Vignette for KoboClient (#30)

* Addressing two of issues Lada & Timm have detected

- Double checking of kobo_token: remove check from Kobo class, only
have it in KoboClient.
- Wrong checking: tested on envvar instead of kobo_token

* Adding first tests for Kobo class

* Update rendered docs

* remove example test

* message if no baseurl provided for api v1

* move 403 test to koboclient

* split tests

* remove duplicate tests

* Squashed commit of the following:

commit 6a684cf
Author: Frie <fr1e@pm.me>
Date:   Sun May 16 20:33:46 2021 +0200

    rename kobo client test file for consistency

commit 573b253
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Sun May 16 13:36:43 2021 +0200

    Revert "first trial with POST (upload new xls form)"

    This reverts commit ee40ab5.

commit ebc6cde
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Sun May 16 13:35:53 2021 +0200

    Revert "POST request - deploying an asset"

    This reverts commit 595aa68.

commit 3867429
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Sun May 16 13:33:21 2021 +0200

    Revert "more post request trials"

    This reverts commit dc56c4d.

commit dc56c4d
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Thu May 13 18:02:01 2021 +0200

    more post request trials

    1. none is successful so far
    2. moved all the post requests to the end in the separate chunk

commit b79eee7
Merge: 595aa68 647ac91
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 17:20:07 2021 +0200

    Merge pull request #25 from CorrelAid/httptesting

    Set up http testing with vcr

commit 647ac91
Merge: 7be468b 69ee2b0
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Thu May 13 17:03:58 2021 +0200

    Merge branch 'httptesting' of github.com:CorrelAid/kbtbr into httptesting

commit 7be468b
Merge: 6f17725 42d0888
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Thu May 13 17:03:45 2021 +0200

    Check on test error regex

commit 69ee2b0
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 17:03:00 2021 +0200

    regexp without host name

commit a9d407b
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 17:01:43 2021 +0200

    add code coverage with covr

commit 42d0888
Author: Frie <fr1e@pm.me>
Date:   Thu May 13 16:54:37 2021 +0200

    more flexible regex for incorrect host error

commit 595aa68
Author: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Date:   Tue May 11 23:35:34 2021 +0200

    POST request - deploying an asset

commit 6f17725
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Tue May 11 21:58:22 2021 +0200

    Change expected error message

commit 2915b36
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 16:51:52 2021 +0200

    add missing vcr_dir definition

commit 1c86af5
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 16:48:53 2021 +0200

    disable tests again for PRs against dev

commit 37678ba
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 15:52:06 2021 +0200

    enable tests on main and dev (as well as PR)

commit 2306b51
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 15:50:23 2021 +0200

    basic http tests for kobo and kobo client

commit d487297
Author: Frie <fr1e@pm.me>
Date:   Mon May 10 15:23:32 2021 +0200

    delete getting started tests

commit 89a45c2
Merge: 936a2b7 eb2b780
Author: Frie <fr1e@pm.me>
Date:   Wed May 5 21:37:54 2021 +0200

    Merge branch 'dev' into httptesting

commit 936a2b7
Author: Frie <fr1e@pm.me>
Date:   Mon May 3 22:22:32 2021 +0200

    i should not code when tired - still not fixed

commit 9f6fded
Merge: fdc5d83 ee7111b
Author: Frie <fr1e@pm.me>
Date:   Mon May 3 22:11:01 2021 +0200

    Merge branch 'dimi-malte-frie-experiments' into httptesting

commit ee7111b
Author: Frie <fr1e@pm.me>
Date:   Mon May 3 21:00:26 2021 +0200

    push missing files :facepalm:

commit 45a8723
Author: Frie <fr1e@pm.me>
Date:   Sun May 2 23:03:46 2021 +0200

    kobo class and koboclient class with get

commit fdc5d83
Merge: cd511f3 7cfa4a9
Author: Frie <fr1e@pm.me>
Date:   Sun May 2 19:24:54 2021 +0200

    Merge branch 'basics-in-crul' into httptesting

commit 7cfa4a9
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Sun May 2 19:00:16 2021 +0200

    Elaborating a bit on the wrapper function

    - client as input
    - example how to get ALL the data

commit 0ab0cac
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Sun May 2 18:11:04 2021 +0200

    Clarify/correct base url /url building

    - Adding a note to the shorter legacy URLs
    - Adding a comment to passing the path/parameters on get method

commit cd511f3
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 22:42:04 2021 +0200

    minimal test example (not working)

commit 5cc3ed0
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 22:41:50 2021 +0200

    refactoring of client class to use super init

commit d483904
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 22:27:34 2021 +0200

    add an example where we only set the baseurl in initialize

commit 2d0b656
Merge: 6a42d28 156ed19
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 21:43:34 2021 +0200

    Merge branch 'main' into httptesting

commit 6a42d28
Author: Frie <fr1e@pm.me>
Date:   Fri Apr 30 21:42:09 2021 +0200

    setup vcr

commit bafa2ce
Author: Frie <fr1e@pm.me>
Date:   Tue Apr 27 22:51:46 2021 +0200

    some more mental notes, url_parse and typo fixes

commit 5cf275f
Merge: d12170d 156ed19
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Mon Apr 26 23:26:20 2021 +0200

    Merge branch 'main' into basics-in-crul

commit d12170d
Author: Malte Kyhos <mkyhos@protonmail.com>
Date:   Mon Apr 26 23:16:00 2021 +0200

    [#5] Init sketchy article about crul / api

* merge dev again

* Initial vignet for KoboClient

* Reduce the output of the str function

* spelling error fixes

* Updated the vignette according the the current implementation

* Included KoboClient role in the Kobo interface

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>
Co-authored-by: Frie <fr1e@pm.me>

* get_assets returns tibbles (#63)

* Issue06 listsurveys (#60)

* included get_surveys function

* Included tests for get_surveys

* get_assets returns tibbles

* Included option to get_surveys to show all columns

* Reproducible koboclass vignette (#64)

* use vcr for koboclass vignette (no kbtbr token required on github)

* Get submissions to survey (#52)

* #4 download data in asset and kobo class

* #4 add another test and code styling

* Update R/asset.R

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

* mac stuff

* wrangling submissions vignette

* add vcr mock data

* devtools load all

* Update DESCRIPTION

* Documentation and pkgdown update (#65)

* #4 download data in asset and kobo class

* #4 add another test and code styling

* Update R/asset.R

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

* mac stuff

* wrangling submissions vignette

* first draft

* move readme to top level

* readme and contributing md

* progress on get started

* get started and restructure vignettes/articles

* do not print warning for not specifying v1 url (no consequences as of now)

* readme update and code of conduct/contributing.md

* different landing pages for github and pkgdown

* code of conduct and contributing md

* fix rcmdcheck note re non used imports

* hard wrap markdown - delete duplicate file

* Kobo is a class not an object

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

* fix spelling mistake

* do not use :: if we i import tibble

* use tidyverse (@MKyhos said no baseR)

* no html preview

* code of conduct title

* fix check notes

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

* change identation back to 2 (#68)

* Mixed refactoring (#66)

* #4 download data in asset and kobo class

* #4 add another test and code styling

* Update R/asset.R

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

* mac stuff

* wrangling submissions vignette

* first draft

* move readme to top level

* readme and contributing md

* progress on get started

* Running automated reformatting

* Fix namespace import with checkmate

* Update docs

* get started and restructure vignettes/articles

* do not print warning for not specifying v1 url (no consequences as of now)

* readme update and code of conduct/contributing.md

* different landing pages for github and pkgdown

* code of conduct and contributing md

* fix rcmdcheck note re non used imports

* Remove dependency: glue

* Import usethis::ui_ funs once for all

* Only one version of list_as_json_char needed

* Rename function: check_repair_path -> append_slash

* Update namespace/docs (missed it)

* KoboClient: inline function call

* Kobo/KoboClient: add and update assertions

* hard wrap markdown - delete duplicate file

* Kobo is a class not an object

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>

* fix spelling mistake

* do not use :: if we i import tibble

* use tidyverse (@MKyhos said no baseR)

* no html preview

* code of conduct title

* fix check notes

* Apply new indent

* Asset: restructure

* KoboClient: bring R6 elements in order

* Update docs

* Asset: fix the active binding access util

* Add Section headers to R6 objects

* Asset: fix description of init

* Update docs

* Fix typo

* fix warning from zzz.R

* delete files that were accidentally added

Co-authored-by: Frie <fr1e@pm.me>

* [Workflow] Add basic makefile (#69)

* Initial makefile

* small restructuring

* Add minimal PR target

* Add comment regarding dependencies

* Add makefile to buildignore

* Fix rbuildignore: no ^ needed

* bump roxygen2 to 7.1.2

* prepare 0.1.0 release 🚀

* suggest markdown

Co-authored-by: Malte Kyhos <mkyhos@protonmail.com>
Co-authored-by: Lada Rudnitckaia <lada.rudnitckaia@uni-konstanz.de>
Co-authored-by: hammti <timm.hamm@outlook.de>
Co-authored-by: Dimitri Marinelli <dimitri-mar@users.noreply.github.com>
Co-authored-by: Lada Rudnitckaia <lada.rudnitckaia@gmail.com>
Co-authored-by: Malte Kyhos <malte.kyhos@civey.com>
Replace `ui_stop`, `ui_warn`, `ui_info` with `stop`, `warning`, `message`
Is still suggested -> used in tests etc.
@MKyhos MKyhos requested a review from pr130 December 2, 2022 19:47
@MKyhos MKyhos changed the base branch from main to dev December 2, 2022 19:52
@MKyhos MKyhos marked this pull request as ready for review December 3, 2022 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants