diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..e7bd87b4 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,2 @@ +[codespell] +ignore-words-list = missings,rcall,linke,fo diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edcbbcf5..38db71eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,4 +77,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - \ No newline at end of file + diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..eac2920e --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -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/action@v3.0.1 diff --git a/.gitignore b/.gitignore index 5b31b2f5..735d1fbc 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ docs/src/*examples Manifest*.toml .repl_history.jl quarry -*.vtu \ No newline at end of file +*.vtu diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100755 index 00000000..83a49f5a --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 46c91b24..dd524395 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1143,5 +1143,3 @@ added DocStringExtensions - Add Printf in Project.toml - Fixed compat... - - diff --git a/docs/src/coordinatesystem.md b/docs/src/coordinatesystem.md index ae6732e3..666906d4 100644 --- a/docs/src/coordinatesystem.md +++ b/docs/src/coordinatesystem.md @@ -17,4 +17,3 @@ coordinatesystems() #hide Modules = [ExtendableGrids] Pages = ["coordinatesystem.jl"] ``` - diff --git a/docs/src/elementgeometry.md b/docs/src/elementgeometry.md index 887bd272..a08afc7a 100644 --- a/docs/src/elementgeometry.md +++ b/docs/src/elementgeometry.md @@ -16,4 +16,3 @@ elementgeometries() #hide Modules = [ExtendableGrids] Pages = ["elementgeometry.jl"] ``` - diff --git a/docs/src/extendablegrid.md b/docs/src/extendablegrid.md index 77dc20eb..dff1ee33 100644 --- a/docs/src/extendablegrid.md +++ b/docs/src/extendablegrid.md @@ -77,4 +77,3 @@ show(g[NodeCells]) Modules = [ExtendableGrids] Pages = ["extendablegrid.jl"] ``` - diff --git a/docs/src/gridconstructors.md b/docs/src/gridconstructors.md index 7f194aa6..0dc06fa3 100644 --- a/docs/src/gridconstructors.md +++ b/docs/src/gridconstructors.md @@ -13,4 +13,3 @@ Private = false Modules = [ExtendableGrids] Pages = ["commongrids.jl"] ``` - diff --git a/docs/src/index.md b/docs/src/index.md index 01b25c85..4b21d473 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -4,4 +4,3 @@ Markdown.parse(""" $(read("../../README.md",String)) """) ```` - diff --git a/docs/src/more.md b/docs/src/more.md index d08a8efb..57073e4c 100644 --- a/docs/src/more.md +++ b/docs/src/more.md @@ -5,4 +5,3 @@ Modules = [ExtendableGrids] Pages = ["derived.jl","more.jl"] ``` - diff --git a/docs/src/refinement.md b/docs/src/refinement.md index 2e66210e..1676d61a 100644 --- a/docs/src/refinement.md +++ b/docs/src/refinement.md @@ -5,4 +5,3 @@ Modules = [ExtendableGrids] Pages = ["meshrefinements.jl","adaptive_meshrefinements.jl"] ``` - diff --git a/docs/src/regionedit.md b/docs/src/regionedit.md index 7bd8703d..d2113bad 100644 --- a/docs/src/regionedit.md +++ b/docs/src/regionedit.md @@ -9,4 +9,3 @@ bfacemask! rect! bedgemask! ``` - diff --git a/docs/src/shape_specs.md b/docs/src/shape_specs.md index a1caa084..153a92bb 100644 --- a/docs/src/shape_specs.md +++ b/docs/src/shape_specs.md @@ -8,5 +8,3 @@ Modules = [ExtendableGrids] Pages = ["shape_specs.jl"] ``` - - diff --git a/docs/src/subgrid.md b/docs/src/subgrid.md index bf6e68f3..43ab91d4 100644 --- a/docs/src/subgrid.md +++ b/docs/src/subgrid.md @@ -30,4 +30,3 @@ println(subv) Modules = [ExtendableGrids] Pages = ["subgrid.jl"] ``` - diff --git a/docs/src/tdict.md b/docs/src/tdict.md index 50ca4c58..68213427 100644 --- a/docs/src/tdict.md +++ b/docs/src/tdict.md @@ -47,4 +47,3 @@ See above ... #### Cons - Implemented using a Dict, so access is inherently slower than access to a component of a struct. Therefore it is not well suited for inner loops. - diff --git a/docs/src/tokenstream.md b/docs/src/tokenstream.md index 95b71951..3747f026 100644 --- a/docs/src/tokenstream.md +++ b/docs/src/tokenstream.md @@ -9,5 +9,3 @@ reading of tokenizable ASCII files Modules = [ExtendableGrids] Pages = ["tokenstream.jl"] ``` - - diff --git a/docs/src/voronoi.md b/docs/src/voronoi.md index cc04f27a..70c68737 100644 --- a/docs/src/voronoi.md +++ b/docs/src/voronoi.md @@ -5,4 +5,3 @@ Modules = [ExtendableGrids] Pages = ["voronoi.jl"] ``` - diff --git a/examples/experimental/adjacency.jl b/examples/experimental/adjacency.jl index 32535ef8..fa4ab371 100644 --- a/examples/experimental/adjacency.jl +++ b/examples/experimental/adjacency.jl @@ -200,4 +200,3 @@ function test_adj_performance(n=100_000) """ nothing end - diff --git a/examples/vtk_write.jl b/examples/vtk_write.jl index 569990b3..bce60c14 100644 --- a/examples/vtk_write.jl +++ b/examples/vtk_write.jl @@ -44,4 +44,4 @@ function grid1D_test(filename::String) writeVTK(filename::String, g, true; point_data = point_data, cell_data = cell_data, field_data = field_data) -end \ No newline at end of file +end diff --git a/src/assemblytypes.jl b/src/assemblytypes.jl index 4ac78ba6..c3a6678d 100644 --- a/src/assemblytypes.jl +++ b/src/assemblytypes.jl @@ -90,4 +90,3 @@ GridComponentGeometries4AssemblyType(AT::Type{<:AssemblyType}) = GridComponent4T GridComponentUniqueGeometries4AssemblyType(AT::Type{<:AssemblyType}) = GridComponent4TypeProperty(ItemType4AssemblyType(AT),PROPERTY_UNIQUEGEOMETRY) GridComponentRegions4AssemblyType(AT::Type{<:AssemblyType}) = GridComponent4TypeProperty(ItemType4AssemblyType(AT),PROPERTY_REGION) GridComponentAssemblyGroups4AssemblyType(AT::Type{<:AssemblyType}) = GridComponent4TypeProperty(ItemType4AssemblyType(AT),PROPERTY_ASSEMBLYGROUP) - diff --git a/src/commongrids.jl b/src/commongrids.jl index 3ed0cb9d..bbdf5191 100644 --- a/src/commongrids.jl +++ b/src/commongrids.jl @@ -252,4 +252,3 @@ function ringsector(rad,ang; eltype=Triangle2D) end simplexgrid(coord,cells,cellregions,bfaces,bfaceregions) end - diff --git a/src/deprecated.jl b/src/deprecated.jl index ea42615b..18cf2d9f 100644 --- a/src/deprecated.jl +++ b/src/deprecated.jl @@ -5,4 +5,4 @@ export NodeInParent function ExtendableGrids.instantiate(xgrid::ExtendableGrid, ::Type{NodeInParent}) @warn "NodeInParents is deprecated, use NodeParents instead" xgrid[NodeParents] -end \ No newline at end of file +end diff --git a/src/derived.jl b/src/derived.jl index dac2f317..2efd4d62 100644 --- a/src/derived.jl +++ b/src/derived.jl @@ -1347,4 +1347,4 @@ function ExtendableGrids.instantiate(xgrid::ExtendableGrid{Tc,Ti}, ::Type{BEdgeA append!(xGeometryGroups, findall(==(EG), xBEdgeGeometries)) end xGeometryGroups -end \ No newline at end of file +end diff --git a/src/serialadjacency.jl b/src/serialadjacency.jl index fe53e353..70ef90ae 100644 --- a/src/serialadjacency.jl +++ b/src/serialadjacency.jl @@ -72,4 +72,4 @@ Append a column to adjacency. """ function Base.append!(adj::SerialVariableTargetAdjacency,len) push!(adj.colstart,adj.colstart[end]+len) -end \ No newline at end of file +end diff --git a/src/subgrid.jl b/src/subgrid.jl index d58d74a6..f48a88c8 100644 --- a/src/subgrid.jl +++ b/src/subgrid.jl @@ -340,6 +340,3 @@ $(TYPEDSIGNATURES) Return size of vector view. """ Base.size(a::SubgridVectorView)=(size(a.node_in_parent,1),) - - - diff --git a/src/tokenstream.jl b/src/tokenstream.jl index 8e762eff..25faab07 100644 --- a/src/tokenstream.jl +++ b/src/tokenstream.jl @@ -169,4 +169,3 @@ function trytoken(tks::TokenStream,expected::String) end return true end - diff --git a/src/typehierarchy.jl b/src/typehierarchy.jl index deed14bc..58d86aa8 100644 --- a/src/typehierarchy.jl +++ b/src/typehierarchy.jl @@ -46,4 +46,3 @@ function allsubtypes(TApex) end allsubtypes!(Type[],TApex) end - diff --git a/src/vectorofconstants.jl b/src/vectorofconstants.jl index e8fc4e4d..81d154a7 100644 --- a/src/vectorofconstants.jl +++ b/src/vectorofconstants.jl @@ -56,9 +56,3 @@ $(TYPEDSIGNATURES) Shortcut for unique """ Base.unique(v::VectorOfConstants)=[v.val] - - - - - - diff --git a/test/testbinned.jl b/test/testbinned.jl index 34f79b66..bcfe8a25 100644 --- a/test/testbinned.jl +++ b/test/testbinned.jl @@ -24,4 +24,3 @@ end @test testbinning(rand(2, 10000)) @test testbinning(rand(3, 10)) @test testbinning(rand(3, 10000)) - diff --git a/test/tritet.jl b/test/tritet.jl index bbc19003..a6e20236 100644 --- a/test/tritet.jl +++ b/test/tritet.jl @@ -93,4 +93,3 @@ end @test isa(prism(),ExtendableGrid) @test isa(material_prism(),ExtendableGrid) end -