Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
indent = 4
# margin = 92
normalize_line_endings = "unix"
40 changes: 40 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Changes here will be overwritten by Copier
AddAllcontributors: false
AddCitationCFF: false
AddCodeOfConduct: false
AddContributionDocs: false
AddCopierCI: false
AddDocs: true
AddDocsCI: true
AddFormatterAndLinterConfigFiles: true
AddGitHubPRTemplate: true
AddGitHubTemplates: false
AddLintCI: true
AddLychee: true
AddMacToCI: true
AddPrecommit: true
AddPrecommitUpdateCI: false
AddTagBotCI: true
AddTestCI: true
AddWinToCI: true
Authors: Gabriel Weymouth <gabriel.weymouth@gmail.com>
CheckExplicitImports: false
ConfigIndentation: 2
GitHubActionVersionAutoUpdate: dependabot
JuliaCompatAutoUpdate: dependabot
JuliaIndentation: 4
JuliaMinCIVersion: '1.11'
JuliaMinVersion: '1.10'
License: MIT
LicenseCopyrightHolders: Gabriel Weymouth
MarkdownIndentation: 2
PackageName: WaterLily
PackageOwner: WaterLily-jl
PackageUUID: ed894a53-35f9-47f1-b17f-85db9237eebd
RunJuliaNightlyOnCI: false
StrategyConfirmIncluded: true
StrategyLevel: 2
StrategyReviewExcluded: true
TestingStrategy: testitem_basic
UseCirrusCI: false
_src_path: /home/b-fg/.julia/packages/BestieTemplate/hXGfI
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# https://editorconfig.org
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
trim_trailing_whitespace = true

[*.jl]
indent_size = 4

[*.md]
indent_size = 2

[*.{yml,toml,json}]
indent_size = 2
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
Thanks for making a pull request to WaterLily.jl.
We have added this PR template to help you help us.
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 -->
- [ ] Tests are passing
- [ ] Lint workflow is passing
- [ ] Docs were updated and workflow is passing
10 changes: 9 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
interval: "weekly"
- package-ecosystem: "julia"
directories:
- "/"
- "/docs"
- "/test"
schedule:
interval: "weekly"

57 changes: 57 additions & 0 deletions .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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@v6
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- name: Use Julia cache
uses: julia-actions/cache@v5
- name: Instantiate environment with development version of the package
run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- name: Run doctest
run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using WaterLily
DocMeta.setdocmeta!(WaterLily, :DocTestSetup, :(using WaterLily); recursive=true)
doctest(WaterLily)'
- name: Generate and deploy documentation
run: julia --project=docs docs/make.jl
env:
JULIA_PKG_SERVER: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988
62 changes: 62 additions & 0 deletions .github/workflows/Lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Lint

on:
push:
branches:
- main
tags: ["*"]
pull_request:

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:

lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v6
- name: Setup Julia
uses: julia-actions/setup-julia@v2
with:
version: "1"
- name: Use Julia cache
uses: julia-actions/cache@v5
- name: Install Julia packages
run: julia -e 'using Pkg; pkg"add JuliaFormatter"'
- name: Hack for setup-python cache # https://github.com/actions/setup-python/issues/807
run: touch requirements.txt
- name: Setup Python
uses: actions/setup-python@v5
with:
cache: "pip"
python-version: "3.11"
- name: Hack for setup-python cache # https://github.com/actions/setup-python/issues/807
run: rm requirements.txt
- name: Cache pre-commit
uses: actions/cache@v5
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: SKIP=no-commit-to-branch pre-commit run -a
link-checker:
name: Link checker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
fail: true
args: --config '.lychee.toml' .

63 changes: 63 additions & 0 deletions .github/workflows/ReusableTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Reusable test

on:
workflow_call:
inputs:
version:
required: false
type: string
default: "1"
os:
required: false
type: string
default: ubuntu-latest
arch:
required: false
type: string
default: x64
allow_failure:
required: false
type: boolean
default: false
run_codecov:
required: false
type: boolean
default: false
secrets:
codecov_token:
required: true

jobs:
test:
name: Julia ${{ inputs.version }} - ${{ inputs.os }} - ${{ inputs.arch }} - ${{ github.event_name }}
runs-on: ${{ inputs.os }}
continue-on-error: ${{ inputs.allow_failure }}

steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ inputs.version }}
arch: ${{ inputs.arch }}
- name: Use Julia cache
uses: julia-actions/cache@v5
- uses: julia-actions/julia-buildpkg@v1
- name: WaterLily tests
env:
JULIA_NUM_THREADS: ${{ matrix.nthreads }}
shell: bash
run: |
if [ "${{ matrix.nthreads }}" = "auto" ]
then
printf "[WaterLily]\nbackend = \"KernelAbstractions\"" > LocalPreferences.toml
else
printf "[WaterLily]\nbackend = \"SIMD\"" > LocalPreferences.toml
fi
julia --proj --color=yes -e "using Pkg; Pkg.instantiate(); Pkg.test(; coverage=true);"
- uses: julia-actions/julia-processcoverage@v1
if: ${{ inputs.run_codecov }}
- uses: codecov/codecov-action@v4
if: ${{ inputs.run_codecov }}
with:
file: lcov.info
token: ${{ secrets.codecov_token }}
22 changes: 21 additions & 1 deletion .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
name: TagBot

on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
type: number
default: 3

permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read

jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
Expand All @@ -12,4 +32,4 @@ jobs:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
ssh: ${{ secrets.GITHUB_TOKEN }}
52 changes: 52 additions & 0 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test

on:
pull_request:
paths:
- '.github/workflows/ci.yml'
- 'ext/**'
- 'src/**'
- 'test/**'
- 'Project.toml'
push:
branches:
- master
tags: '*'
paths:
- '.github/workflows/ci.yml'
- 'ext/**'
- 'src/**'
- 'test/**'
- 'Project.toml'
workflow_dispatch:

jobs:
test:
uses: ./.github/workflows/ReusableTest.yml
with:
os: ${{ matrix.os }}
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
allow_failure: ${{ matrix.allow_failure }}
run_codecov: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' }}
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
strategy:
fail-fast: false
matrix:
version:
- '1.11'
- '1.12'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
nthreads:
- '1'
- 'auto'
exclude:
- os: macOS-latest
arch: x86
allow_failure: [false]
Loading
Loading