Skip to content

Commit

Permalink
Merge pull request #26 from eWaterCycle/subdir-per-language
Browse files Browse the repository at this point in the history
Make sub dir per language
  • Loading branch information
sverhoeven authored Nov 12, 2024
2 parents b0aa7e7 + ab0a51c commit ea6d377
Show file tree
Hide file tree
Showing 158 changed files with 1,421 additions and 77 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/JuliaReusableTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ jobs:
with:
version: ${{ inputs.version }}
arch: ${{ inputs.arch }}
project: './RemoteBMI.jl'
project: './julia'
- name: Use Julia cache
uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
with:
project: './RemoteBMI.jl'
project: './julia'
- uses: julia-actions/julia-runtest@v1
with:
project: './RemoteBMI.jl'
project: './julia'
- uses: julia-actions/julia-processcoverage@v1
if: ${{ inputs.run_codecov }}
with:
directories: "RemoteBMI.jl/src"
directories: "julia/src"
- uses: codecov/codecov-action@v4
if: ${{ inputs.run_codecov }}
with:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/julia-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ on:
branches:
- main
paths:
- "RemoteBMI.jl/docs/**"
- "RemoteBMI.jl/src/**"
- "RemoteBMI.jl/*.toml"
- "julia/docs/**"
- "julia/src/**"
- "julia/*.toml"
- .github/workflows/julia-docs.yml
tags: ["*"]
pull_request:
branches:
- main
paths:
- "RemoteBMI.jl/docs/**"
- "RemoteBMI.jl/src/**"
- "RemoteBMI.jl/*.toml"
- "julia/docs/**"
- "julia/src/**"
- "julia/*.toml"
- .github/workflows/julia-docs.yml
types: [opened, synchronize, reopened]

Expand All @@ -35,7 +35,7 @@ jobs:
- uses: julia-actions/setup-julia@v2
with:
version: "1"
project: './RemoteBMI.jl'
project: './julia'
- name: Use Julia cache
uses: julia-actions/cache@v2
- name: Instantiate environment with development version of the package
Expand All @@ -44,18 +44,18 @@ jobs:
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
working-directory: RemoteBMI.jl
working-directory: julia
- name: Run doctest
run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using RemoteBMI
DocMeta.setdocmeta!(RemoteBMI, :DocTestSetup, :(using RemoteBMI); recursive=true)
doctest(RemoteBMI)'
working-directory: RemoteBMI.jl
working-directory: julia
- name: Generate and deploy documentation
run: julia --project=docs docs/make.jl
working-directory: RemoteBMI.jl
working-directory: julia
env:
JULIA_PKG_SERVER: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/julia-test-on-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
# branches:
# - main
paths:
- "RemoteBMI.jl/src/**"
- "RemoteBMI.jl/test/**"
- "RemoteBMI.jl/*.toml"
- "julia/src/**"
- "julia/test/**"
- "julia/*.toml"
- .github/workflows/julia-test-on-prs.yml
types: [opened, synchronize, reopened]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/julia-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
tags: ["*"]
paths:
- "RemoteBMI.jl/**"
- "julia/**"
- .github/workflows/julia-test.yml
workflow_dispatch:

Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ on:
paths:
- "openapi.yaml"
- .github/workflows/openapi.yml
pull_request_target:
- python/src/remotebmi/server/openapi.yaml
pull_request:
paths:
- "openapi.yaml"
- .github/workflows/openapi.yml
- python/src/remotebmi/server/openapi.yaml
types: [opened, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -44,3 +47,14 @@ jobs:

- name: Yamllint
run: yamllint openapi.yaml
copycheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: |
openapi.yaml
python/src/remotebmi/server/openapi.yaml
- name: Check spec copies are the same
run: diff openapi.yaml python/src/remotebmi/server/openapi.yaml
19 changes: 17 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ on:
- "python/remotebmi/**"
- "python/tests/**"
- .github/workflows/python.yml
pull_request_target:
pull_request:
paths:
- "openapi.yaml"
- "python/remotebmi/**"
- "python/tests/**"
- .github/workflows/python.yml
types: [opened, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -53,4 +54,18 @@ jobs:
- name: Install dependencies
run: pip install -e .[dev]
- name: Run tests
run: pytest tests
run: pytest tests
build:
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 build
run: pip install build
- name: Build package
run: python3 -m build
16 changes: 8 additions & 8 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: R
on:
push:
paths:
- "R/remotebmi/**"
- "R/**"
- .github/workflows/r.yml
pull_request_target:
paths:
- "R/remotebmi/**"
- "R/**"
- .github/workflows/r.yml

concurrency:
Expand All @@ -29,12 +29,12 @@ jobs:
with:
extra-packages: any::rcmdcheck, any::covr, any::xml2
needs: check, coverage
working-directory: R/remotebmi
working-directory: R
- uses: r-lib/actions/check-r-package@v2
with:
working-directory: R/remotebmi
working-directory: R
- name: Test coverage
working-directory: R/remotebmi
working-directory: R
run: |
cov <- covr::package_coverage(
quiet = FALSE,
Expand All @@ -46,20 +46,20 @@ jobs:
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./R/remotebmi/cobertura.xml
file: ./R/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
find '${{ runner.temp }}/R/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
path: ${{ runner.temp }}/R/package
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ __pycache__
/venv
python/.venv/
python/heat.toml
RemoteBMI.jl/example/Project.toml
RemoteBMI.jl/example/heat.toml
julia/example/Project.toml
julia/example/heat.toml
openapi-generator-cli.jar
openapitools.json
PEQ_Hupsel.dat
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion R/remotebmi/README.md → R/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can install the development version of remotebmi from [GitHub](https://githu

``` r
# install.packages("pak")
pak::pak("github::eWaterCycle/remotebmi/R/remotebmi")
pak::pak("github::eWaterCycle/remotebmi/R")
```

## Example
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ The [REST API specification](openapi.yaml) is in the [OpenAPI](https://swagger.i

This repository is a monorepo containing packages for different languages.
1. Python client and server, in [./python/](./python) directory
2. Julia server, in [./RemoteBMI.jl/](./RemoteBMI.jl/) directory
2. Julia client and server, in [./julia/](./julia/) directory
3. R server, in [./R/](./R/) directory

### Python consumer

Expand Down
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ component_management:
- python/**
- component_id: Julia
paths:
- RemoteBMI.jl/**
- julia/**
- component_id: R
paths:
- R/remotebmi/**
- R/**
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ body:
Please, before submitting, make sure that:
- There is not an [existing issue](https://github.com/eWaterCycle/RemoteBMI.jl/issues) with the same question
- You have read the [contributing guide](https://eWaterCycle.github.io/RemoteBMI.jl/dev/90-contributing/)
- You are following the [code of conduct](https://github.com/eWaterCycle/RemoteBMI.jl/blob/main/CODE_OF_CONDUCT.md)
- There is not an [existing issue](https://github.com/eWaterCycle/julia/issues) with the same question
- You have read the [contributing guide](https://eWaterCycle.github.io/julia/dev/90-contributing/)
- You are following the [code of conduct](https://github.com/eWaterCycle/julia/blob/main/CODE_OF_CONDUCT.md)
The form below should help you in filling out this issue.
- type: textarea
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ body:
Please, before submitting, make sure that:
- There is not an [existing issue](https://github.com/eWaterCycle/RemoteBMI.jl/issues) with the same question
- You have read the [contributing guide](https://eWaterCycle.github.io/RemoteBMI.jl/dev/90-contributing/)
- You are following the [code of conduct](https://github.com/eWaterCycle/RemoteBMI.jl/blob/main/CODE_OF_CONDUCT.md)
- There is not an [existing issue](https://github.com/eWaterCycle/julia/issues) with the same question
- You have read the [contributing guide](https://eWaterCycle.github.io/julia/dev/90-contributing/)
- You are following the [code of conduct](https://github.com/eWaterCycle/julia/blob/main/CODE_OF_CONDUCT.md)
The form below should help you in filling out this issue.
- type: textarea
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ body:
Please, before submitting, make sure that:
- You have checked the [documentation](https://eWaterCycle.github.io/RemoteBMI.jl) and haven't found enough information
- There is not an [existing issue](https://github.com/eWaterCycle/RemoteBMI.jl/issues) with the same question
- You have read the [contributing guide](https://eWaterCycle.github.io/RemoteBMI.jl/dev/90-contributing/)
- You are following the [code of conduct](https://github.com/eWaterCycle/RemoteBMI.jl/blob/main/CODE_OF_CONDUCT.md)
- You have checked the [documentation](https://eWaterCycle.github.io/julia) and haven't found enough information
- There is not an [existing issue](https://github.com/eWaterCycle/julia/issues) with the same question
- You have read the [contributing guide](https://eWaterCycle.github.io/julia/dev/90-contributing/)
- You are following the [code of conduct](https://github.com/eWaterCycle/julia/blob/main/CODE_OF_CONDUCT.md)
The form below should help you in filling out this issue.
- type: textarea
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ body:
Please, before submitting, make sure that:
- There is not an [existing issue](https://github.com/eWaterCycle/RemoteBMI.jl/issues) with the same question
- You have read the [contributing guide](https://eWaterCycle.github.io/RemoteBMI.jl/dev/90-contributing/)
- You are following the [code of conduct](https://github.com/eWaterCycle/RemoteBMI.jl/blob/main/CODE_OF_CONDUCT.md)
- There is not an [existing issue](https://github.com/eWaterCycle/julia/issues) with the same question
- You have read the [contributing guide](https://eWaterCycle.github.io/julia/dev/90-contributing/)
- You are following the [code of conduct](https://github.com/eWaterCycle/julia/blob/main/CODE_OF_CONDUCT.md)
The form below should help you in filling out this issue.
- type: textarea
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Discussions
url: https://github.com/eWaterCycle/RemoteBMI.jl/discussions
url: https://github.com/eWaterCycle/julia/discussions
about: Create and follow discussions here
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Thanks for making a pull request to RemoteBMI.jl.
Thanks for making a pull request to julia.
We have added this PR template to help you help us.
Make sure to read the contributing guidelines and abide by the code of conduct.
See the comments below, fill the required fields, and check the items.
Expand All @@ -21,7 +21,7 @@ There is no related issue.

<!-- mark true if NA -->
<!-- leave PR as draft until all is checked -->
- [ ] I am following the [contributing guidelines](https://github.com/eWaterCycle/RemoteBMI.jl/blob/main/docs/src/90-contributing.md)
- [ ] I am following the [contributing guidelines](https://github.com/eWaterCycle/julia/blob/main/docs/src/90-contributing.md)
- [ ] Tests are passing
- [ ] Lint workflow is passing
- [ ] Docs were updated and workflow is passing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 15 additions & 15 deletions RemoteBMI.jl/README.md → julia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ See [example](example/README.md).

## How to Cite

If you use RemoteBMI.jl in your work, please cite using the reference given in [CITATION.cff](https://github.com/eWaterCycle/RemoteBMI.jl/blob/main/CITATION.cff).
If you use RemoteBMI.jl in your work, please cite using the reference given in [CITATION.cff](https://github.com/eWaterCycle/julia/blob/main/CITATION.cff).

## Contributing

If you want to make contributions of any kind, please first that a look into our [contributing guide directly on GitHub](docs/src/90-contributing.md) or the [contributing page on the website](https://eWaterCycle.github.io/RemoteBMI.jl/dev/contributing/).
If you want to make contributions of any kind, please first that a look into our [contributing guide directly on GitHub](docs/src/90-contributing.md) or the [contributing page on the website](https://eWaterCycle.github.io/julia/dev/contributing/).

## Code generation

Expand All @@ -37,23 +37,23 @@ wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.9.0
java -jar ./openapi-generator-cli.jar generate -i ./openapi.yaml -g julia-server -o julia-server --additional-properties=packageName=BmiServer --additional-properties=exportModels=true
java -jar ./openapi-generator-cli.jar generate -i ./openapi.yaml -g julia-client -o julia-client --additional-properties=packageName=BmiClient --additional-properties=exportModels=true
# Copy the generated src
cp -r julia-client/src/* RemoteBMI.jl/src/client/
cp -r julia-server/src/* RemoteBMI.jl/src/server/
cp -r julia-client/src/* julia/src/client/
cp -r julia-server/src/* julia/src/server/
# Copy the generated docs
mkdir -p RemoteBMI.jl/docs/src/client/ RemoteBMI.jl/docs/src/server/
cp -r julia-client/docs RemoteBMI.jl/docs/src/client/docs
cp -r julia-server/docs RemoteBMI.jl/docs/src/server/
cp julia-client/README.md RemoteBMI.jl/docs/src/client/
cp julia-server/README.md RemoteBMI.jl/docs/src/server/
mkdir -p julia/docs/src/client/ julia/docs/src/server/
cp -r julia-client/docs julia/docs/src/client/docs
cp -r julia-server/docs julia/docs/src/server/
cp julia-client/README.md julia/docs/src/client/
cp julia-server/README.md julia/docs/src/server/
# Correct links
touch RemoteBMI.jl/docs/src/client/docs/Int64.md
touch RemoteBMI.jl/docs/src/client/docs/Float64.md
touch RemoteBMI.jl/docs/src/server/docs/Int64.md
touch RemoteBMI.jl/docs/src/server/docs/Float64.md
touch julia/docs/src/client/docs/Int64.md
touch julia/docs/src/client/docs/Float64.md
touch julia/docs/src/server/docs/Int64.md
touch julia/docs/src/server/docs/Float64.md
```

[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
[docs-dev-url]: https://www.ewatercycle.org/remotebmi/RemoteBMI.jl/dev
[docs-dev-url]: https://www.ewatercycle.org/remotebmi/julia/dev

[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://www.ewatercycle.org/remotebmi/RemoteBMI.jl/stable
[docs-stable-url]: https://www.ewatercycle.org/remotebmi/julia/stable
File renamed without changes.
2 changes: 1 addition & 1 deletion RemoteBMI.jl/docs/make.jl → julia/docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ makedocs(;
pages = ["index.md"; numbered_pages],
)

deploydocs(; repo = "github.com/eWaterCycle/remotebmi", dirname="RemoteBMI.jl")
deploydocs(; repo = "github.com/eWaterCycle/remotebmi", dirname="julia")
Loading

0 comments on commit ea6d377

Please sign in to comment.