Skip to content

Commit

Permalink
Merge pull request #11 from jmurphy6895/chore-update-CI
Browse files Browse the repository at this point in the history
Chore update ci
  • Loading branch information
jmurphy6895 authored Sep 19, 2024
2 parents dc1ca25 + b3d3ded commit 51301f2
Show file tree
Hide file tree
Showing 29 changed files with 1,441 additions and 458 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 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: "weekly"
ignore:
- dependency-name: "crate-ci/typos"
update-types: ["version-update:semver-patch", "version-update:semver-minor"]
54 changes: 54 additions & 0 deletions .github/workflows/Benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: performance tracking

on:
pull_request:

jobs:
performance-tracking:
runs-on: ubuntu-latest
steps:
# setup
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: 'nightly'
- uses: julia-actions/julia-buildpkg@latest
- name: install dependencies
run: julia -e 'using Pkg; pkg"add PkgBenchmark [email protected]"'

# run the benchmark suite
- name: run benchmarks
run: |
julia -e '
using BenchmarkCI
BenchmarkCI.judge()
BenchmarkCI.displayjudgement()
'
# generate and record the benchmark result as markdown
- name: generate benchmark result
run: |
body=$(julia -e '
using BenchmarkCI
let
judgement = BenchmarkCI._loadjudge(BenchmarkCI.DEFAULT_WORKSPACE)
title = "AstroForceModel Benchmark Result"
ciresult = BenchmarkCI.CIResult(; judgement, title)
BenchmarkCI.printcommentmd(stdout::IO, ciresult)
end
')
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo $body > ./benchmark-result.artifact
# record the pull request number
- name: record pull request number
run: echo ${{ github.event.pull_request.number }} > ./pull-request-number.artifact

# save as artifacts (performance tracking (comment) workflow will use it)
- uses: actions/upload-artifact@v4
with:
name: perforamance-tracking
path: ./*.artifact
63 changes: 63 additions & 0 deletions .github/workflows/BenchmarkComment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# To workaroud https://github.com/actions/first-interaction/issues/10 in a secure way,
# we take the following steps to generate and comment a performance benchmark result:
# 1. first "performance tracking" workflow will generate the benchmark results in an unprivileged environment triggered on `pull_request` event
# 2. then this "performance tracking (comment)" workflow will show the result to us as a PR comment in a privileged environment
# Note that this workflow can only be modifed by getting checked-in to the default branch
# and thus is secure even though this workflow is granted with write permissions, etc.
# xref: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/

name: performance tracking (comment)

on:
workflow_run:
workflows:
- performance tracking
types:
- completed

jobs:
comment:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4

# restore records from the artifacts
- uses: dawidd6/action-download-artifact@v6
with:
workflow: benchmark.yml
name: perforamance-tracking
workflow_conclusion: success
- name: output benchmark result
id: output-result-markdown
run: |
echo ::set-output name=body::$(cat ./benchmark-result.artifact)
- name: output pull request number
id: output-pull-request-number
run: |
echo ::set-output name=body::$(cat ./pull-request-number.artifact)
# check if the previous comment exists
- name: find comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ steps.output-pull-request-number.outputs.body }}
comment-author: 'github-actions[bot]'
body-includes: AstroForceModel Benchmark Result

# create/update comment
- name: create comment
if: ${{ steps.fc.outputs.comment-id == 0 }}
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ steps.output-pull-request-number.outputs.body }}
body: ${{ steps.output-result-markdown.outputs.body }}
- name: update comment
if: ${{ steps.fc.outputs.comment-id != 0 }}
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
body: ${{ steps.output-result-markdown.outputs.body }}
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
fail-fast: false
matrix:
version:
- '1.9'
- '1.10'
- 'nightly'
os:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
name: Documenter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
version: '1.10'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@releases/v1
env:
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/Invalidation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Invalidations

on:
pull_request:

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: always.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
evaluate:
# Only run on PRs to the default branch.
# In the PR trigger above branches can be specified only explicitly whereas this check should work for master, main, or any other default branch
if: github.base_ref == github.event.repository.default_branch
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-invalidations@v1
id: invs_pr

- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-invalidations@v1
id: invs_default

- name: Report invalidation counts
run: |
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
- name: Check if the PR does increase number of invalidations
if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total
run: exit 1
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]

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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/Manifest.toml
/docs/Manifest.toml
/.vscode/*
43 changes: 23 additions & 20 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
name = "HAMMERHEAD"
name = "AstroPropagators"
uuid = "7f2154ff-9684-4686-a457-9182f50d0f5b"
authors = ["Jordan Murphy"]
version = "1.0.0-DEV"
version = "0.1.0"

[deps]
AngleBetweenVectors = "ec570357-d46e-52ed-9726-18773498274d"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
AstroForceModels = "077569d7-e100-45f3-83e3-c646e23345bd"
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SatelliteToolboxAtmosphericModels = "5718ef0a-a30f-426d-bcd9-4cf31dd12909"
SatelliteToolboxBase = "9e17983a-0463-41a7-9a16-1682db6d8b66"
SatelliteToolboxGravityModels = "bd9e9728-6f7b-4d28-9e50-c765cb1b7c8c"
SatelliteToolboxTransformations = "6b019ec1-7a1e-4f04-96c7-a9db1ca5514d"
SpaceIndices = "5a540a4e-639f-452a-b107-23ea09ed4d36"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
ValSplit = "0625e100-946b-11ec-09cd-6328dd093154"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"

[compat]
AngleBetweenVectors = "0.3"
ForwardDiff = "0.10"
SatelliteToolboxAtmosphericModels = "0.1"
SatelliteToolboxBase = "0.3"
AstroForceModels = "0.3.3"
Aqua = "0.8"
ComponentArrays = "0.15"
LinearAlgebra = "1"
OrdinaryDiffEqAdamsBashforthMoulton = "1.1"
OrdinaryDiffEqCore = "1.6"
Reexport = "1.2"
SatelliteToolboxGravityModels = "0.1"
SatelliteToolboxTransformations = "0.1"
SpaceIndices = "1"
StaticArrays = "1"
ValSplit = "0.1"
julia = "1.9"
StaticArraysCore = "1"
Test = "1"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
OrdinaryDiffEqAdamsBashforthMoulton = "89bda076-bce5-4f1c-845f-551c83cdda9a"
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
SatelliteToolboxGravityModels = "bd9e9728-6f7b-4d28-9e50-c765cb1b7c8c"
SatelliteToolboxTransformations = "6b019ec1-7a1e-4f04-96c7-a9db1ca5514d"
SpaceIndices = "5a540a4e-639f-452a-b107-23ea09ed4d36"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Aqua", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqCore", "SatelliteToolboxGravityModels", "SatelliteToolboxTransformations", "SpaceIndices", "Test"]
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@
[![](https://img.shields.io/badge/docs-stable-blue.svg)][docs-stable-url]
[![](https://img.shields.io/badge/docs-dev-blue.svg)][docs-dev-url]
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)

## Description

This project implements several propagation methods for the **HAMMERHEAD.jl** ecosystem using equations of motion for different orbital element sets. The force models can either be user-supplied or built up with the **AstroForceModels.jl** package. This package was inspired by the THALASSA library [CITE]. A full list of implemented propagators can be found below:
This project implements several propagation methods for the **AstroPropagators.jl** ecosystem using equations of motion for different orbital element sets. The force models can either be user-supplied or built up with the **AstroForceModels.jl** package. This package was inspired by the [THALASSA library](https://github.com/woodywu-arizona/thalassa). A full list of implemented propagators can be found below:

- [ ] Cowell
- [x] Cowell
- [ ] EDromo
- [ ] Kustaanheimo-Stiefel
- [ ] Stiefel-Scheifel
- [ ] Unified State Model
- [ ] Gauss Variational Equations

NOTE: Although the code for some of these are present, only Cowell is currently supported!

## Installation

```julia
Expand All @@ -28,7 +31,5 @@ julia> Pkg.add("AstroPropagators")

For more information, see the [documentation][docs-stable-url].

[comment]: <> UPDATE WITH OUR DOCS

[docs-dev-url]: https://jmurphy6895.github.io/AstroPropagators.jl/stable/
[docs-stable-url]: https://jmurphy6895.github.io/AstroPropagators.jl/stable/
Loading

2 comments on commit 51301f2

@jmurphy6895
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/115515

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" 51301f24990c70673e073cfa0ae7376384732cdf
git push origin v0.1.0

Please sign in to comment.