-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into wflow.jl
- Loading branch information
Showing
29 changed files
with
2,111 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Python | ||
|
||
on: | ||
push: | ||
paths: | ||
- "openapi.yaml" | ||
- "python/remotebmi/**" | ||
- "python/tests/**" | ||
- .github/workflows/python.yml | ||
pull_request_target: | ||
paths: | ||
- "openapi.yaml" | ||
- "python/remotebmi/**" | ||
- "python/tests/**" | ||
- .github/workflows/python.yml | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
working-directory: python | ||
|
||
jobs: | ||
lint-format: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
- name: Install ruff | ||
run: pip install ruff | ||
- name: Run ruff check | ||
run: ruff check | ||
- name: Run ruff format | ||
run: ruff format --check | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
- name: Install dependencies | ||
run: pip install -e .[dev] | ||
- name: Run tests | ||
run: pytest tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: R | ||
|
||
on: | ||
push: | ||
paths: | ||
- "R/remotebmi/**" | ||
- .github/workflows/r.yml | ||
pull_request_target: | ||
paths: | ||
- "R/remotebmi/**" | ||
- .github/workflows/r.yml | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
|
||
jobs: | ||
r: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::rcmdcheck, any::covr, any::xml2 | ||
needs: check, coverage | ||
working-directory: R/remotebmi | ||
- uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
working-directory: R/remotebmi | ||
- name: Test coverage | ||
working-directory: R/remotebmi | ||
run: | | ||
cov <- covr::package_coverage( | ||
quiet = FALSE, | ||
clean = FALSE, | ||
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") | ||
) | ||
covr::to_cobertura(cov) | ||
shell: Rscript {0} | ||
- uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }} | ||
file: ./R/remotebmi/cobertura.xml | ||
plugin: noop | ||
disable_search: true | ||
use_oidc: true | ||
- name: Show testthat output | ||
if: always() | ||
run: | | ||
## -------------------------------------------------------------------- | ||
find '${{ runner.temp }}/R/remotebmi/package' -name 'testthat.Rout*' -exec cat '{}' \; || true | ||
shell: bash | ||
|
||
- name: Upload test results | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-test-failures | ||
path: ${{ runner.temp }}/R/remotebmi/package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
^LICENSE\.md$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Package: remotebmi | ||
Title: BMI over http | ||
Version: 0.0.0.9000 | ||
Authors@R: | ||
person("Stefan", "Verhoeven", , "[email protected]", role = c("aut", "cre"), | ||
comment = c(ORCID = "https://orcid.org/0000-0002-5821-2060")) | ||
Description: Runs a BMI model as a http json web service. | ||
URL: https://github.com/eWaterCycle/remotebmi | ||
License: Apache License (>= 2) | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.3.2 | ||
Imports: | ||
fiery, | ||
reqres, | ||
routr | ||
Suggests: | ||
testthat (>= 3.0.0) | ||
Config/testthat/edition: 3 | ||
Remotes: | ||
eWaterCycle/bmi-r |
Oops, something went wrong.