Skip to content

Commit

Permalink
Update compat bounds for Meshes.jl and set up basic workflows (#43)
Browse files Browse the repository at this point in the history
* update compat bounds for Meshes.jl

* add CompatHelper workflow

* add dependabot

* add CI workflow

* add spell check workflow

* add some badges to README

* fix example in README

* remove docs from subdirs in CompatHelper

* use to instead of coords
  • Loading branch information
JoshuaLampert authored Aug 16, 2024
1 parent a800275 commit 8e727e8
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 6 deletions.
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"
77 changes: 77 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI
on:
push:
branches:
- main
tags: ['*']
paths-ignore:
- 'LICENSE.md'
- 'README.md'
- '.github/workflows/CompatHelper.yml'
- '.github/workflows/SpellCheck.yml'
- 'docs/**'
pull_request:
paths-ignore:
- 'LICENSE.md'
- 'README.md'
- '.github/workflows/CompatHelper.yml'
- '.github/workflows/SpellCheck.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:
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.10'
os:
- ubuntu-latest
- macos-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src
- uses: codecov/codecov-action@v4
with:
files: lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }}-${{ github.run_id }}
parallel: true
path-to-lcov: ./lcov.info

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
16 changes: 16 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CompatHelper
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "test"])'
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/[email protected]
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ FastGaussQuadrature = "1"
HCubature = "1.5"
julia = "1.6"
LinearAlgebra = "1"
Meshes = "0.36 - 0.47"
Meshes = "0.47, 0.48"
QuadGK = "2"
Unitful = "1"
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# MeshIntegrals.jl

[![Build Status](https://github.com/mikeingold/MeshIntegrals.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/mikeingold/MeshIntegrals.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)

This package implements methods for numerically-computing integrals over geometric polytopes
from [**Meshes.jl**](https://github.com/JuliaGeometry/Meshes.jl) using the following `::IntegrationAlgorithms`:
- Gauss-Legendre quadrature rules from [**FastGaussQuadrature.jl**](https://github.com/JuliaApproximation/FastGaussQuadrature.jl): `GaussLegendre(n)`
Expand Down Expand Up @@ -29,15 +33,15 @@ unit_circle_bz = BezierCurve(

# A Real-valued function
f(x, y, z) = abs(x + y)
f(p) = f(p.coords...)
f(p) = f(to(p)...)

integral(f, unit_circle_xy, GaussKronrod())
# 56.500 μs (1819 allocations: 100.95 KiB)
# ans == 5.656854249502878
# 0.000170 seconds (5.00 k allocations: 213.531 KiB)
# ans == 5.656854249525293 m^2

integral(f, unit_circle_bz, GaussKronrod())
# 9.638 ms (18830 allocations: 78.40 MiB)
# ans = 5.551055333711397
# 0.017122 seconds (18.93 k allocations: 78.402 MiB)
# ans = 5.551055333711397 m^2
```

# Support Matrix
Expand Down

0 comments on commit 8e727e8

Please sign in to comment.