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

Support Entity management #155

Merged
merged 33 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b4214bf
WIP #152: entity_list
florianm Mar 16, 2024
4eba32c
WIP #152: Add entity_list and entity_detail
florianm Mar 31, 2024
cbce233
Update contrib guide on functions
florianm Mar 31, 2024
c8c0d34
Improve entity_list: add parameter `deleted`
florianm Apr 1, 2024
a6b954d
Clean up docs for entity management functions
florianm Apr 1, 2024
7a113cb
Improve Entity Management functions error handling for missing did an…
florianm Apr 1, 2024
c5f76bc
Add entity_update
florianm Apr 2, 2024
81fa590
Style package
florianm Apr 2, 2024
83b2728
Add pre-commit and devcontainer configs
florianm Apr 2, 2024
926ce1d
Fix pre-commit config end of file
florianm Apr 2, 2024
66c7e08
Add precommit.ci badge to README
florianm Apr 2, 2024
7e4bc32
Configure lintr: allow code comments
florianm Apr 2, 2024
df0eb34
Update WORDLIST
florianm Apr 2, 2024
72b5a25
Lint and style
florianm Apr 2, 2024
ebb9f74
Style form_schema_ext
florianm Apr 2, 2024
bd4e386
Style package
florianm Apr 2, 2024
d135c07
Run pre-commit on all files
florianm Apr 2, 2024
317e92a
Fix tests, update deps
florianm Jul 22, 2024
1872d02
Update broken URLs in vignettes and man
florianm Jul 22, 2024
980a279
Experiment: pre-commit hook deps-in-desc
florianm Jul 23, 2024
e2b30f5
Add new pre-commit hook pkgdown, tidy up DESC
florianm Jul 23, 2024
29474d5
Add entity_create
florianm Jul 23, 2024
3c4ca87
Complete entity_create
florianm Jul 24, 2024
e2550e6
Update man for entity_create
florianm Jul 24, 2024
6f87d3d
Add entity_delete
florianm Jul 26, 2024
c6f09b5
Add entity_version, add get_default_orders
florianm Jul 26, 2024
6ae716f
Fix tests: add new property names
florianm Oct 11, 2024
f2640f3
Add entity_changes
florianm Oct 11, 2024
ed69999
Fix test
florianm Oct 11, 2024
2ac007d
Address pre-commit warnings
florianm Oct 11, 2024
87d433f
Add entity_audits
florianm Oct 11, 2024
3e81ff8
Prepare release 1.5.0
florianm Oct 11, 2024
9a5f51c
Relax pre-commit: drop pkgdown for now
florianm Oct 11, 2024
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
6 changes: 5 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
^CONTRIBUTING\.md$
^ISSUE_TEMPLATE\.md$
^SUPPORT\.md$
^\.github$
^man-roxygen$
^appveyor\.yml$
codemeta.json
Expand All @@ -25,3 +24,8 @@ codemeta.json
^tic\.R$
^Dockerfile$
^codemeta\.json$
^\.devcontainer
^\.github
^\.vscode
^.lintr
^\.pre-commit-config\.yaml$
25 changes: 25 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ghcr.io/rocker-org/devcontainer/r-ver:4.2

# non interactive frontend for locales
ENV DEBIAN_FRONTEND=noninteractive

# installing texlive and utils
RUN apt-get update && \
apt-get -y install --no-install-recommends \
libudunits2-dev libxtst6 libxt6 libmagick++-dev \
libxml2-dev libjq-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev \
libicu-dev libv8-dev libjq-dev libprotobuf-dev protobuf-compiler libgit2-dev \
rsync mdbtools cargo libavfilter-dev libfontconfig1-dev libopenblas-dev \
freetds-common libct4 libsybdb5 freetds-bin freetds-dev libsybdb5 tdsodbc \
unixodbc make git procps locales curl && \
rm -rf /var/lib/apt/lists/*

# generating locales
RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_GB.UTF-8
ENV LANGUAGE=en_GB.UTF-8 LANG=en_GB.UTF-8 LC_ALL=en_GB.UTF-8

# installing cpanm & missing latexindent dependencies
RUN curl -L http://cpanmin.us | perl - --self-upgrade && \
cpanm Log::Dispatch::File YAML::Tiny File::HomeDir
40 changes: 40 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "R (rocker/r-ver base)",
"dockerFile": "Dockerfile",
"features": {
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {
"version": "prerelease"
},
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
"packages": "libudunits2-dev,libxtst6,libxt6,libmagick++-dev"
},
"ghcr.io/rocker-org/devcontainer-features/r-packages:1": {
"packages": "github::rstudio/renv,tidyverse,git2r,knitr,spelling,languageserver,precommit,clisymbols,crayon,dplyr,fs,glue,httr,httr2,janitor,lifecycle,lubridate,magrittr,purrr,readr,rlang,stringr,semver,tibble,tidyr,xml2,covr,DT,ggplot2,here,knitr,lattice,leaflet,listviewer,leafpop,leafem,mapview,rmarkdown,roxygen2,sf,terra,testthat,tmap,usethis"
},
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {}
},
"mounts": [
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.gitconfig,target=~/.gitconfig,type=bind,consistency=cached"
],
"onCreateCommand": "pre-commit install && pre-commit run",
"customizations": {
"vscode": {
"extensions": [
"mechatroner.rainbow-csv",
"REditorSupport.r",
"RDebugger.r-debugger",
"ms-azuretools.vscode-docker",
"usernamehw.errorlens",
"christian-kohler.path-intellisense",
"ms-vscode.live-server"
]
},
"codespaces": {
"openFiles": [
"DESCRIPTION",
"NEWS.md",
"data-raw/make_release.R"
]
}
}
}
30 changes: 15 additions & 15 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ assignees: florianm
---

## Problem
<!--
<!--
Please briefly describe your problem.
-->
## ruODK function(s) used
<!--
<!--
The most important bit - which ruODK functions did you use?
-->

## Unexpected behaviour
<!--
<!--
Run the failing commands with verbose=TRUE and provide any error messages,
and the time elapsed. Did the command fail straight away or run for a while?
Could this be a networking issue or performance issues on the ODK Central server?
-->

## Reproducible example
<!--
If this issue refers to a bug or unexpected behaviour of ruODK,
please include a minimal reproducible example
([reprex](https://reprex.tidyverse.org/), see also
<https://www.tidyverse.org/help/#reprex>).
Note: If this issue involves an authenticated web request,
<!--
If this issue refers to a bug or unexpected behaviour of ruODK,
please include a minimal reproducible example
([reprex](https://reprex.tidyverse.org/), see also
<https://www.tidyverse.org/help/#reprex>).

Note: If this issue involves an authenticated web request,
do not include your credentials, server address, or any identifying
information.
information.
Instead, run ru_setup() with environment variables.
Make sure to sanitise any output of credentials, too.

The failing function and the (sanitised) error output alone
will be a welcome help to narrow down the problem.
-->
Expand All @@ -47,12 +47,12 @@ assignees: florianm
<details>
<summary><strong>Session Info</strong></summary>

<!--
<!--
Append "version.txt" to your ODK Central URL
-->
ODK Central version:
<!--

<!--
R versions: R, ruODK, loaded packages
-->
```{r}
Expand Down
7 changes: 7 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
linters: linters_with_defaults(
line_length_linter(120),
object_name_linter = NULL,
line_length_linter = NULL,
commented_code_linter = NULL
)
exclusions: list()
54 changes: 54 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
exclude: "/migrations/|^venv/|/email/subject/"
default_stages: [commit]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
name: Drop trailing whitespace
exclude: man
- id: end-of-file-fixer
name: Fix end of files
- id: check-yaml
name: Check YAML syntax
- id: check-toml
name: Check TOML syntax
# - id: pretty-format-json
# name: Format JSON
- id: check-added-large-files
name: Prevent adding large files
args: ['--maxkb=1024']
- id: check-merge-conflict
name: Check for unhandled merge conflicts
- id: debug-statements
name: Check for debug statements
- id: detect-private-key
name: Detect private keys

# https://lorenzwalthert.github.io/precommit/articles/available-hooks.html
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.2
hooks:
- id: style-files
name: Style code to tidyverse conventions
args: [--scope=spaces]
- id: readme-rmd-rendered
name: Ensure README.md is up to date
- id: no-debug-statement
name: Ensure that no debug() statement is committed
- id: no-browser-statement
name: Ensure that no browser() statement is committed
# - id: spell-check
# name: Spellcheck
# - id: deps-in-desc
# name: Ensure that DESCRIPTION lists all dependencies
# args: [--allow_private_imports, --root=R]
- id: use-tidy-description
name: Format DESCRIPTION
# - id: pkgdown
# name: Validate pkgdown.yml
# - id: lintr
# name: Lint code but emit only warnings
# args: [--warn_only]
# verbose: true
12 changes: 6 additions & 6 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who
As contributors and maintainers of this project, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating documentation,
submitting pull requests or patches, and other activities.

Expand All @@ -13,13 +13,13 @@ imagery, derogatory comments or personal attacks, trolling, public or private ha
insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments,
commits, code, wiki edits, issues, and other contributions that are not aligned to this
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
commits, code, wiki edits, issues, and other contributions that are not aligned to this
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
from the project team.

Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by
Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by
opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the Contributor Covenant
(<http://contributor-covenant.org>), version 1.0.0, available at
This Code of Conduct is adapted from the Contributor Covenant
(<http://contributor-covenant.org>), version 1.0.0, available at
<http://contributor-covenant.org/version/1/0/0/>
Loading
Loading