Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
efaulhaber committed May 3, 2024
0 parents commit 4a5735c
Show file tree
Hide file tree
Showing 22 changed files with 542 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Use SciML style: https://github.com/SciML/SciMLStyle
style = "sciml"

# Python style alignment. See https://github.com/domluna/JuliaFormatter.jl/pull/732.
yas_style_nesting = true

# Align struct fields for better readability of large struct definitions
align_struct_field = true

# Allow Dict definitions to be aligned like arrays. See https://github.com/domluna/JuliaFormatter.jl/pull/676
variable_call_indent = ["Dict"]
5 changes: 5 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# xref: https://docs.codecov.io/docs/codecovyml-reference

# Disable annotations (annoying!)
github_checks:
annotations: false
7 changes: 7 additions & 0 deletions .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: "monthly"
45 changes: 45 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CompatHelper
on:
schedule:
- cron: 0 0 * * *
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: "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(; subdirs=["", "test", "docs"])
shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
46 changes: 46 additions & 0 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Documentation

on:
push:
branches:
- 'main'
tags: '*'
paths-ignore:
- '.github/workflows/ci.yml'
- '.github/workflows/CompatHelper.yml'
- '.github/workflows/TagBot.yml'
pull_request:
paths-ignore:
- '.github/workflows/ci.yml'
- '.github/workflows/CompatHelper.yml'
- '.github/workflows/TagBot.yml'
workflow_dispatch:

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:
build-docs:
name: Build and Deploy Documentation
runs-on: ubuntu-latest
steps:
- name: Check out project
uses: actions/checkout@v4
- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: '1'
show-versioninfo: true
- uses: julia-actions/cache@v1
- name: Build package
uses: julia-actions/julia-buildpkg@v1
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
run: julia --project=docs --color=yes docs/make.jl
40 changes: 40 additions & 0 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Format Check

on:
push:
branches:
- 'main'
tags: '*'
pull_request:

jobs:
check-format:
name: Check format with JuliaFormatter.jl
runs-on: ubuntu-latest
steps:
- name: Check out project
uses: actions/checkout@v4
- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: '1'
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'
- uses: julia-actions/cache@v1
- name: Install JuliaFormatter and format
# This will use the latest version by default but you can set the version like so:
#
# julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version = "0.13.0"))'
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"))'
julia -e 'using JuliaFormatter; format(".")'
- name: Format check
run: |
julia -e '
out = Cmd(`git diff --name-only`) |> read |> String
if out == ""
exit(0)
else
@error "Some files have not been formatted !!!"
write(stdout, out)
exit(1)
end'
13 changes: 13 additions & 0 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Spell Check

on: [pull_request, workflow_dispatch]

jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@v1.21.0
31 changes: 31 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
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'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
91 changes: 91 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: CI

on:
push:
branches:
- main
tags: ['*']
paths-ignore:
- 'CITATION.bib'
- 'LICENSE.md'
- 'README.md'
- '.zenodo.json'
- '.github/workflows/CompatHelper.yml'
- '.github/workflows/SpellCheck.yml'
- '.github/workflows/TagBot.yml'
- 'docs/**'
pull_request:
paths-ignore:
- 'CITATION.bib'
- 'LICENSE.md'
- 'README.md'
- '.zenodo.json'
- '.github/workflows/CompatHelper.yml'
- '.github/workflows/SpellCheck.yml'
- '.github/workflows/TagBot.yml'
- 'docs/**'
workflow_dispatch:

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:
build:
name: Run Tests (Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }})
runs-on: ubuntu-latest
strategy:
# Don't cancel all running jobs when one job fails
fail-fast: false
matrix:
version:
- '1.9'
- '1'
os:
- ubuntu-latest
arch:
- x64
include:
# Also run tests on Windows and macOS-ARM, but only with the latest Julia version
- version: '1'
os: windows-latest
arch: x64
- version: '1'
os: macos-14
arch: arm64

steps:
- name: Check out project
uses: actions/checkout@v4
- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'
- uses: julia-actions/cache@v1
- name: Build package
uses: julia-actions/julia-buildpkg@v1
- name: Run tests
uses: julia-actions/julia-runtest@v1
with:
annotate: true
# Only run coverage in one Job (Ubuntu and latest Julia version)
coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.version == '1' }}
- name: Process coverage results
# Only run coverage in one Job (Ubuntu and latest Julia version)
if: matrix.os == 'ubuntu-latest' && matrix.version == '1'
uses: julia-actions/julia-processcoverage@v1
with:
directories: src,test
- name: Upload coverage report to Codecov
# Only run coverage in one Job (Ubuntu and latest Julia version)
if: matrix.os == 'ubuntu-latest' && matrix.version == '1'
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: true
flags: unit
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Manifest.toml
docs/build
docs/src/index.md
docs/src/authors.md
docs/src/license.md
public/
coverage/
coverage_report/
*.jl.*.cov
.vscode/
run

.DS_Store

LocalPreferences.toml
8 changes: 8 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Authors

This package is maintained by the authors of
[TrixiParticles.jl](https://github.com/trixi-framework/TrixiParticles.jl).
For a full list of authors, see
[AUTHORS.md](https://github.com/trixi-framework/TrixiParticles.jl/blob/main/AUTHORS.md)
in the TrixiParticles.jl repository.
These authors form "The TrixiParticles.jl Authors", as mentioned in the [LICENSE.md](LICENSE.md) file.
22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2023-present The TrixiParticles.jl Authors (see [AUTHORS.md](AUTHORS.md)) \
Copyright (c) 2023-present Helmholtz-Zentrum hereon GmbH, Institute of Surface Science \
\
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "TrixiNeighborhoodSearch"
uuid = "1c4d5385-0a27-49de-8e2c-43b175c8985c"
authors = ["Erik Faulhaber <44124897+efaulhaber@users.noreply.github.com>"]
version = "0.1.0-pre"

[compat]
julia = "1.9"
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# TrixiNeighborhoodSearch.jl

[![Docs-stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://trixi-framework.github.io/TrixiNeighborhoodSearch.jl/stable)
[![Docs-dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://trixi-framework.github.io/TrixiNeighborhoodSearch.jl/dev)
[![Build Status](https://github.com/trixi-framework/TrixiNeighborhoodSearch.jl/workflows/CI/badge.svg)](https://github.com/trixi-framework/TrixiNeighborhoodSearch.jl/actions?query=workflow%3ACI)
[![Coveralls](https://coveralls.io/repos/github/trixi-framework/TrixiNeighborhoodSearch.jl/badge.svg)](https://coveralls.io/github/trixi-framework/TrixiNeighborhoodSearch.jl)
[![Codecov](https://codecov.io/gh/trixi-framework/TrixiNeighborhoodSearch.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/trixi-framework/TrixiNeighborhoodSearch.jl)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/license/mit/)
30 changes: 30 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Security Policy

The Trixi.jl development team takes security issues seriously. We appreciate
all efforts to responsibly disclose any security issues and will make every
effort to acknowledge contributions.


## Supported Versions

The current stable release following the interpretation of
[semantic versioning (SemVer)](https://julialang.github.io/Pkg.jl/dev/compatibility/#Version-specifier-format-1)
used in the Julia ecosystem is supported with security updates.


## Reporting a Vulnerability

To report a security issue, please use the GitHub Security Advisory
["Report a Vulnerability"](https://github.com/trixi-framework/TrixiNeighborhoodSearch.jl/security/advisories/new)
tab.

We will send a response indicating the next steps in handling your report.
After the initial reply to your report, we will keep you informed of the
progress towards a fix and full announcement, and may ask for additional
information or guidance.

Please report security bugs in third-party modules directly to the person
or team maintaining the module.

Public notifications of vulnerabilities will be shared in community channels
such as Slack.
5 changes: 5 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "1"
Loading

0 comments on commit 4a5735c

Please sign in to comment.