Skip to content

Commit

Permalink
Use http://abelsiqueira.com/BestieTemplate.jl/ + got running server w…
Browse files Browse the repository at this point in the history
…hich dies on first request
  • Loading branch information
sverhoeven committed Jul 5, 2024
1 parent 7c084be commit 6e59790
Show file tree
Hide file tree
Showing 78 changed files with 1,339 additions and 1,453 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ BMI_MODULE=mypackage BMI_CLASS=MyModel run-bmi-server
Given you have a model class called `MyModel` and a BMI called `BMI` inside the `MyPackage` package.

```julia
using MyPackage.MyModel
using MyPackage
using RemoteBMI

port = parse(Int, get(ENV, "BMI_PORT", 50051))
RemoteBMI.run(MyModel, port=port, host="localhost")
RemoteBMI.run(MyPackage.Model, "0.0.0.0", 50555)
```

### R provider
Expand Down
18 changes: 18 additions & 0 deletions RemoteBMI.jl/.JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
align_assignment = true
align_matrix = true
align_pair_arrow = true
align_struct_field = true
always_for_in = true
annotate_untyped_fields_with_any = false
conditional_to_if = true
for_in_replacement = "in"
format_docstrings = false
format_markdown = false
import_to_using = true
indent = 2
margin = 100
normalize_line_endings = "unix"
remove_extra_newlines = true
separate_kwargs_with_semicolon = true
whitespace_ops_in_indices = true
whitespace_typedefs = true
22 changes: 22 additions & 0 deletions RemoteBMI.jl/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changes here will be overwritten by Copier
AddAllcontributors: false
AddCodeOfConduct: true
AddCopierCI: false
AddGitHubTemplates: true
AddMacToCI: false
AddPrecommit: false
AddWinToCI: false
AnswerStrategy: ask
AuthorEmail: [email protected]
AuthorName: Stefan Verhoeven
Indentation: 2
JuliaMinVersion: '1.6'
License: Apache-2.0
PackageName: RemoteBMI
PackageOwner: eWaterCycle
PackageUUID: 4b6948d5-498c-54b5-b082-cdb1540453e9
RunJuliaNightlyOnCI: false
SimplifiedPRTest: true
UseCirrusCI: false
_commit: v0.7.1
_src_path: https://github.com/abelsiqueira/BestieTemplate.jl
10 changes: 10 additions & 0 deletions RemoteBMI.jl/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://editorconfig.org
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
61 changes: 61 additions & 0 deletions RemoteBMI.jl/.github/ISSUE_TEMPLATE/10-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Bug Report
description: File a bug report related to running the package
title: "[Bug] "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
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)
The form below should help you in filling out this issue.
- type: textarea
id: description
attributes:
label: Description
description: Describe the bug
validations:
required: true
- type: input
id: pkg-version
attributes:
label: Package Version
description: What version of the package are you running?
validations:
required: true
- type: input
id: version
attributes:
label: Julia Version
description: What version of Julia are you running?
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction steps
description: What steps led to the bug happening? Please provide a minimal reproducible example.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: dropdown
id: os
attributes:
label: "Operating System"
description: What is the impacted environment?
multiple: true
options:
- Windows
- Linux
- Mac
42 changes: 42 additions & 0 deletions RemoteBMI.jl/.github/ISSUE_TEMPLATE/20-feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Feature Request"
description: Suggest a new feature for the package
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request!
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)
The form below should help you in filling out this issue.
- type: textarea
id: description
attributes:
label: Description
description: Describe the requested feature
validations:
required: true
- type: textarea
id: validation
attributes:
label: Validation and testing
description: How could we verify that the new feature works? What kind of tests can be done?
- type: textarea
id: motivation
attributes:
label: Motivation
description: Explain why this feature is relevant
- type: textarea
id: target
attributes:
label: Target audience
description: Tell more about the users of this feature, or where it could be useful
- type: textarea
id: can-help
attributes:
label: Can you help?
description: Can you help developing this feature?
24 changes: 24 additions & 0 deletions RemoteBMI.jl/.github/ISSUE_TEMPLATE/30-usage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Usage question"
description: Questions related to the usage
labels: ["documentation"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this question!
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)
The form below should help you in filling out this issue.
- type: textarea
id: description
attributes:
label: Description
description: Write your question
validations:
required: true
22 changes: 22 additions & 0 deletions RemoteBMI.jl/.github/ISSUE_TEMPLATE/99-general.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "General issue"
description: In case none of the others templates apply
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this issue!
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)
The form below should help you in filling out this issue.
- type: textarea
id: description
attributes:
label: Description
description: Describe the issue
validations:
required: true
5 changes: 5 additions & 0 deletions RemoteBMI.jl/.github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Discussions
url: https://github.com/eWaterCycle/RemoteBMI.jl/discussions
about: Create and follow discussions here
27 changes: 27 additions & 0 deletions RemoteBMI.jl/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
Thanks for making a pull request to RemoteBMI.jl.
We have added this PR template to help you help us.
Make sure to read the contributing guidelines and abide to the code of conduct.
See the comments below, fill the required fields, and check the items.
-->

## Related issues

<!-- We normally work with (i) create issue; (ii) discussion if necessary; (iii) create PR. So, at least one of the following should be true:-->

<!-- Option 1, this closes an existing issue. Fill the number below-->
Closes #

<!-- Option 2, this is a small fix that arguably won't need an issue. Uncomment below -->
<!--
There is no related issue.
-->

## Checklist

<!-- 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)
- [ ] Tests are passing
- [ ] Lint workflow is passing
- [ ] Docs were updated and workflow is passing
7 changes: 7 additions & 0 deletions RemoteBMI.jl/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
51 changes: 51 additions & 0 deletions RemoteBMI.jl/.github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# CompatHelper v3.5.0
name: CompatHelper

on:
schedule:
- cron: 0 0 * * * # Every day at 00:00 UTC
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Check if Julia is already available in the PATH
id: julia_in_path
run: which julia
continue-on-error: true
- name: Install Julia, but only if it is not already available in the PATH
uses: julia-actions/setup-julia@v2
with:
version: "1"
arch: ${{ runner.arch }}
if: steps.julia_in_path.outcome != 'success'
- name: Use Julia cache
uses: julia-actions/cache@v2
- name: "Add the General registry via Git"
run: |
import Pkg
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- name: "Install CompatHelper"
run: |
import Pkg
name = "CompatHelper"
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
version = "3"
Pkg.add(; name, uuid, version)
shell: julia --color=yes {0}
- name: "Run CompatHelper"
run: |
import CompatHelper
CompatHelper.main()
shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
53 changes: 53 additions & 0 deletions RemoteBMI.jl/.github/workflows/Docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docs

on:
push:
branches:
- main
paths:
- "docs/**"
- "src/**"
- "*.toml"
tags: ["*"]
pull_request:
branches:
- main
paths:
- "docs/**"
- "src/**"
- "*.toml"
types: [opened, synchronize, reopened]

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- name: Use Julia cache
uses: julia-actions/cache@v2
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using RemoteBMI
DocMeta.setdocmeta!(RemoteBMI, :DocTestSetup, :(using RemoteBMI); recursive=true)
doctest(RemoteBMI)'
- run: julia --project=docs docs/make.jl
env:
JULIA_PKG_SERVER: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
Loading

0 comments on commit 6e59790

Please sign in to comment.