Skip to content

Commit

Permalink
Merge pull request #154 from jpthiele/precommit
Browse files Browse the repository at this point in the history
[CI/Infra] Add pre-commit to repo
  • Loading branch information
jpthiele authored Nov 26, 2024
2 parents 88bcab9 + 96ac922 commit 9deb6e1
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 38 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pre-commit

on:
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: 1.11
- run: |
julia --project=@runic -e '
using Pkg
Pkg.add("Runic")'
env:
PYTHON: ""
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: [--maxkb=8192]
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
args: [--allow-multiple-documents]
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [--branch,master]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.3
hooks:
- id: gitleaks
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
3 changes: 0 additions & 3 deletions CITATIONS.bib
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,3 @@ @inproceedings{cances2020four
doi="10.1007/978-3-030-43651-3_13",
organization={Springer}
}



5 changes: 0 additions & 5 deletions docs/src/devel.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,3 @@ The pluto notebooks in this package are "triple use":
- As typical Pluto notebooks, they are self-contained in the senses that they contain their own Project and Manifest files. So users can just download and execute them.
- If they run with the environment variable `PLUTO_PROJECT` set to some julia environment, this environment will activated at the start of the notebook. In particular, they use `Revise.jl` so they can be run during development of VoronoiFVM.jl. See also https://github.com/fonsp/Pluto.jl/issues/1788 .
- During CI tests, they are run as scripts. For this purpose they are wrapped into temporary modules, and @test macros can be used in the notebooks.





3 changes: 0 additions & 3 deletions docs/src/grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,3 @@ Pages = [
]
Order = [:function]
```



10 changes: 0 additions & 10 deletions docs/src/impedance-derivation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,3 @@ \section{Algorithmic implementation}
\end{description}

\end{document}










2 changes: 0 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ Please consider a pull request updating `CITATION.bib` if you have published wor
```@bibliography
*
```


2 changes: 0 additions & 2 deletions docs/src/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,3 @@ The entities describing the discrete system can be subdivided into two categorie

The solution of the nonlinear systems of equations is performed by Newton's method combined with various direct and iterative linear solvers. The Jacobi matrices used in Newton's method are assembled from the constitutive functions
with the help of forward mode automatic differentiation implemented in [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl).


1 change: 0 additions & 1 deletion docs/src/notebooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ About the notebooks
[Pluto.jl](https://github.com/fonsp/Pluto.jl) notebooks provide a great opportunity to put together code, text and graphics
in a reproducible and accessible way. Therefore, the examples for this package are being amended by a series of Pluto notebooks.
Like the example code, the notebook code is tested during CI.

1 change: 0 additions & 1 deletion docs/src/post.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ after the solution of the unexcited stationary system.
Modules = [VoronoiFVM]
Pages = ["vfvm_impedance.jl"]
```

1 change: 0 additions & 1 deletion docs/src/solutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ Pages=["vfvm_sparsesolution.jl"]
Modules = [VoronoiFVM]
Pages=["vfvm_transientsolution.jl"]
```

1 change: 0 additions & 1 deletion docs/src/solver.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,3 @@ NoBlock
EquationBlock
PointBlock
```

1 change: 0 additions & 1 deletion docs/src/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,3 @@ VoronoiFVM.SparseSystem
viewK
viewL
```

1 change: 0 additions & 1 deletion examples/.JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
style = "sciml"
always_for_in = false
separate_kwargs_with_semicolon = true

1 change: 0 additions & 1 deletion src/vfvm_history.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,3 @@ history_details(sol) = details(sol.history)
Return summary of solver history from last `solve` call, if `log` was set to true.
"""
history_summary(sol) = summary(sol.history)

4 changes: 0 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,3 @@ elseif haskey(ENV,"NOTEBOOKS_ONLY")
else
run_all_tests(; run_notebooks = VERSION < v"1.12.0-DEV.0" , notebooksonly = false)
end




1 change: 0 additions & 1 deletion test/test_formfactors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ end


end

1 change: 0 additions & 1 deletion test/test_state.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ function runtests()

end
end

0 comments on commit 9deb6e1

Please sign in to comment.