Skip to content

Commit d395263

Browse files
committed
[doc], autotest, [compat], release 0.1
1 parent 20cd8aa commit d395263

26 files changed

Lines changed: 465 additions & 23 deletions

.github/workflows/CI.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
# 64-bit Julia only
6+
jobs:
7+
test:
8+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
9+
runs-on: ${{ matrix.os }}
10+
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, 'CompatHelper')"
11+
strategy:
12+
matrix:
13+
version:
14+
- '1.6.0'
15+
os:
16+
- ubuntu-latest
17+
- macOS-latest
18+
- windows-latest
19+
arch:
20+
- x64
21+
steps:
22+
- run: echo ACTIONS_RUNNER_DEBUG true
23+
- uses: actions/[email protected]
24+
- name: "Set up Julia"
25+
uses: julia-actions/setup-julia@latest
26+
with:
27+
version: ${{ matrix.version }}
28+
arch: ${{ matrix.arch }}
29+
#- uses: julia-actions/julia-buildpkg@latest
30+
- uses: julia-actions/julia-runtest@latest
31+
#env:
32+
# ACTIONS_RUNNER_DEBUG: true
33+
- uses: julia-actions/julia-uploadcodecov@latest
34+
env:
35+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/CompatHelper.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CompatHelper
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 1 * *'
6+
7+
jobs:
8+
CompatHelper:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
julia-version: [1.6.0]
13+
julia-arch: [x64]
14+
os: [ubuntu-latest]
15+
steps:
16+
- uses: julia-actions/setup-julia@latest
17+
with:
18+
version: ${{ matrix.julia-version }}
19+
- name: Pkg.add("CompatHelper")
20+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
21+
- name: CompatHelper.main()
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: julia -e 'using CompatHelper; CompatHelper.main()'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CompatHelper
2+
3+
on:
4+
[push, pull_request, workflow_dispatch]
5+
6+
jobs:
7+
CompatHelper:
8+
runs-on: ${{ matrix.os }}
9+
if: "contains(github.event.head_commit.message, '[compat]')"
10+
strategy:
11+
matrix:
12+
julia-version: [1.6.0]
13+
julia-arch: [x64]
14+
os: [ubuntu-latest]
15+
steps:
16+
- uses: julia-actions/setup-julia@latest
17+
with:
18+
version: ${{ matrix.julia-version }}
19+
- name: Pkg.add("CompatHelper")
20+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
21+
- name: CompatHelper.main()
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: julia -e 'using CompatHelper; CompatHelper.main()'
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: ManuallyBuildDoc
2+
3+
on:
4+
[push, pull_request, workflow_dispatch]
5+
6+
# 64-bit Julia only
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
if: "contains(github.event.head_commit.message, '[doc]')"
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: julia-actions/setup-julia@latest
14+
with:
15+
version: '1.6.0'
16+
- run: julia --project=docs -e '
17+
using Pkg;
18+
Pkg.add("Documenter");
19+
Pkg.develop(PackageSpec(; path=pwd()));
20+
Pkg.instantiate();'
21+
- name: Build and deploy doc
22+
env:
23+
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Deploying to else where, so use SSH instead
24+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
25+
run: julia --project=docs --color=yes docs/make.jl

.github/workflows/TagBot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
jobs:
8+
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: JuliaRegistries/TagBot@v1
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
Manifest.toml
2+
docs/build

Project.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,15 @@ StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
1717
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1818
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
1919
UnitfulAstro = "6112ee07-acf9-5e0f-b108-d242c714bf9f"
20+
21+
[compat]
22+
AstroIO = "0.1"
23+
AstroLib = "0.4"
24+
BangBang = "0.3"
25+
PhysicalConstants = "0.2"
26+
PhysicalParticles = "1"
27+
Reexport = "1"
28+
StructArrays = "0.6"
29+
Unitful = "1"
30+
UnitfulAstro = "1"
31+
julia = "1.6"

Readme.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,41 @@
22

33
Initial condition generator for astrophysical simulations
44

5+
[![codecov](https://codecov.io/gh/JuliaAstroSim/AstroIC.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaAstroSim/AstroIC.jl)
6+
[![][docs-dev-img]][docs-dev-url]
7+
58
## Installation
69

710
```julia
811
]add AstroIC
912
```
13+
14+
or
15+
16+
```julia
17+
using Pkg; Pkg.add("AstroIC")
18+
```
19+
1020
or
21+
1122
```julia
12-
]add https://github.com/JuliaAstroSim/AstroIC.jl
23+
using Pkg; Pkg.add("https://github.com/JuliaAstroSim/AstroIC.jl")
1324
```
1425

26+
To test the Package:
27+
```julia
28+
]test AstroIC
29+
```
30+
31+
## Documentation
32+
33+
- [**Dev**][docs-dev-url] — *documentation of the in-development version.*
34+
35+
[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
36+
[docs-dev-url]: https://juliaastrosim.github.io/AstroIC.jl/dev
37+
38+
For beginners, it is highly recommended to read the [documentation of PhysicalParticles.jl](https://juliaastrosim.github.io/PhysicalParticles.jl/dev/).
39+
1540
## Usage
1641

1742
### Generating a star cluster using Plummer model

docs/Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
4+
[compat]
5+
Documenter = "0.27"

docs/make.jl

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
"""
2+
Compile with:
3+
julia --project=docs/ --color=yes docs/make.jl
4+
5+
Generate key:
6+
DocumenterTools.genkeys(user="JuliaAstroSim", repo="[email protected]:JuliaAstroSim/AstroIC.jl.git")
7+
"""
8+
9+
using Documenter
10+
11+
using AstroIC
12+
13+
# The DOCSARGS environment variable can be used to pass additional arguments to make.jl.
14+
# This is useful on CI, if you need to change the behavior of the build slightly but you
15+
# can not change the .travis.yml or make.jl scripts any more (e.g. for a tag build).
16+
if haskey(ENV, "DOCSARGS")
17+
for arg in split(ENV["DOCSARGS"])
18+
(arg in ARGS) || push!(ARGS, arg)
19+
end
20+
end
21+
22+
makedocs(
23+
modules = [AstroIC],
24+
format = Documenter.HTML(
25+
# Use clean URLs, unless built as a "local" build
26+
prettyurls = !("local" in ARGS),
27+
canonical = "https://juliaastrosims.github.io/AstroIC.jl/dev/",
28+
assets = ["assets/alpha_small.ico"],
29+
analytics = "UA-153693590-1",
30+
highlights = ["llvm", "yaml"],
31+
),
32+
clean = false,
33+
sitename = "AstroIC.jl",
34+
authors = "islent",
35+
linkcheck = !("skiplinks" in ARGS),
36+
pages = [
37+
"Home" => "index.md",
38+
"Manual" => Any[
39+
"manual/guide.md",
40+
"manual/plummer.md",
41+
"manual/solarsystem.md",
42+
"manual/tools.md",
43+
],
44+
"Library" => Any[
45+
"lib/Methods.md",
46+
],
47+
#"contributing.md",
48+
],
49+
#strict = !("strict=false" in ARGS),
50+
#doctest = ("doctest=only" in ARGS) ? :only : true,
51+
)
52+
53+
deploydocs(
54+
repo = "github.com/JuliaAstroSim/AstroIC.jl.git",
55+
target = "build",
56+
)

0 commit comments

Comments
 (0)