Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregated updates #45

Merged
merged 34 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e03d67d
Move docs workflow to separate file
abhro Jul 16, 2024
483003e
Update checkout version in workflows
abhro Jul 16, 2024
4517fe9
Tighten julia compat to 1.6 and up
abhro Jul 16, 2024
7d7bfee
Add compat bounds for Documenter.jl
abhro Jul 16, 2024
dd6f770
Change CI to run on 1.6 and higher
abhro Jul 16, 2024
b739eab
Add compat bounds for other doc dependencies
abhro Jul 16, 2024
b62c403
Fix doctests
abhro Jul 16, 2024
b06809b
Fix more doctests
abhro Jul 16, 2024
dc9121c
Update install instructions
abhro Jul 16, 2024
12f15bf
Update example code blocks in README.md
abhro Jul 16, 2024
1cd8c99
Wrap lines and fix markdown
abhro Jul 16, 2024
901c02b
Fix indents and spacing
abhro Jul 16, 2024
f463f6a
Update abstract type docstring header
abhro Jul 16, 2024
9be798f
Use more specific DomainError instead of error()
abhro Jul 16, 2024
ae2e515
Move error handling to top of method
abhro Jul 16, 2024
516831a
Fix tests to catch correct exception type
abhro Jul 16, 2024
a6d2bc6
Make curve F99 method more type stable
abhro Jul 16, 2024
ef7b5c0
Move bibtex asset files to their own directory
abhro Jul 16, 2024
000e455
Fix capitalization
abhro Jul 16, 2024
d571900
Add docstrings to site for G03_SMCBar
abhro Jul 16, 2024
f73fba1
Add docstring for checkbounds to site
abhro Jul 16, 2024
ec5824a
Turn docstrings missing from doc site into warnings
abhro Jul 16, 2024
dd5d3ca
Split up color laws into separate files
abhro Jul 16, 2024
d152b42
Update GitHub/Julia actions versions
abhro Jul 16, 2024
2acbee3
Add coloring to aqua workflow
abhro Jul 16, 2024
96132f6
Update codecov action version
abhro Jul 16, 2024
f6a53b0
Encapsulate all tests into larger testset
abhro Jul 16, 2024
07ae89a
Add dependabot
abhro Jul 16, 2024
c2c348f
Allow manual triggering of CompatHelper
abhro Jul 16, 2024
c6699d5
Give CompatHelper pull request permissions
abhro Jul 16, 2024
0e39b01
Rename CompatHelper job steps
abhro Jul 16, 2024
d7f5da6
Reformat CompatHelper runner
abhro Jul 16, 2024
0a12509
Add compat entry for DelimitedFiles
abhro Jul 16, 2024
8935f9a
Use separate Project.toml for tests
abhro Jul 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 99
labels:
- "dependencies"
- "github-actions"
Comment on lines +8 to +10
Copy link
Member

Choose a reason for hiding this comment

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

These labels don't exist at all: #49.

13 changes: 10 additions & 3 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@ name: CompatHelper
on:
schedule:
- cron: '05 20 * * *'
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
- name: "Install CompatHelper"
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
- name: "Run CompatHelper"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
shell: julia --color=yes {0}
run: using CompatHelper; CompatHelper.main()
42 changes: 14 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@ on:
tags: ["*"]
pull_request:
branches: [master]

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:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.0'
- '1.6'
- '1'
- 'nightly'
os:
Expand All @@ -28,8 +31,8 @@ jobs:
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
Expand All @@ -39,37 +42,20 @@ jobs:
env:
DATADEPS_ALWAYS_ACCEPT: true
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}

aqua:
name: Aqua tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v1
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- run: julia -e 'using Pkg; Pkg.add("Aqua")'
- run: julia --project=@. -e 'using Aqua, DustExtinction; Aqua.test_all(DustExtinction, ambiguities=false)'
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: julia-actions/cache@v1
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: julia --project=docs docs/make.jl
env:
GKSwstype: nul
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- run: julia --color=yes -e 'using Pkg; Pkg.add("Aqua")'
- run: julia --color=yes --project=@. -e 'using Aqua, DustExtinction; Aqua.test_all(DustExtinction, ambiguities=false)'
26 changes: 26 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Documentation

on:
push:
branches: [master]
tags: ["*"]
pull_request:
branches: [master]

jobs:

docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-docdeploy@v1
env:
GKSwstype: nul
DATADEPS_ALWAYS_ACCEPT: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
11 changes: 2 additions & 9 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,10 @@ UnitfulAstro = "6112ee07-acf9-5e0f-b108-d242c714bf9f"

[compat]
DataDeps = "0.7"
DelimitedFiles = "1"
Dierckx = "0.4, 0.5"
FITSIO = "0.13.0, 0.14, 0.15, 0.16.1, 0.17"
Parameters = "0.12"
Unitful = "0.17.0, 1"
UnitfulAstro = "0.3.0, 0.4, 1"
julia = "1.0"

[extras]
Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Measurements", "Random", "Test"]
julia = "1.6"
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,61 +17,63 @@ Documentation: [DustExtinction](https://JuliaAstro.github.io/DustExtinction.jl/s

## Installation

From package manager (``` ]``` key)
From package manager (`]` key)

``` add DustExtinction```
```julia-repl
pkg> add DustExtinction
```

## Usage

Color laws:

```julia
```julia-repl
julia> using DustExtinction

julia> CCM89(Rv=3.1)(4000)
1.4645557029425842

julia> CCM89(Rv=3.1).([4000, 5000])
2-element Array{Float64,1}:
2-element Vector{Float64}:
1.46456
1.12225
```

Dust maps:

```julia
```julia-repl
julia> dustmap = SFD98Map()
SFD98Map("[...]")

julia> dustmap(0.1, 0.1)
0.793093095733043

julia> dustmap.([0.1, 0.2], [0.1, 0.2])
2-element Array{Float64,1}:
2-element Vector{Float64}:
0.793093
0.539507
```

Reddening:

```julia
```julia-repl
julia> wave = [4000., 5000.]
2-element Array{Float64,1}:
2-element Vector{Float64}:
4000.0
5000.0

julia> flux = [1.0, 1.5]
2-element Array{Float64,1}:
2-element Vector{Float64}:
1.0
1.5

julia> red = redden.(CCM89, wave, flux; Av=0.3, Rv=3.1)
2-element Array{Float64,1}:
2-element Vector{Float64}:
0.6671958182723856
1.1000733242882896

julia> deredden.(CCM89(Rv=3.1), wave, red; Av=0.3)
2-element Array{Float64,1}:
2-element Vector{Float64}:
1.0
1.5
```
Expand Down
8 changes: 8 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
UnitfulAstro = "6112ee07-acf9-5e0f-b108-d242c714bf9f"

[compat]
Documenter = "1"
LaTeXStrings = "1"
Measurements = "2"
Plots = "1"
Unitful = "1"
UnitfulAstro = "1"
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ makedocs(modules = [DustExtinction],
sitename = "DustExtinction.jl",
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
authors = "Kyle Barbary, Mosé Giordano, Miles Lucas",
pages = pages
pages = pages,
warnonly = [:missing_docs],
)

deploydocs(repo = "github.com/JuliaAstro/DustExtinction.jl.git", push_preview = true)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 1 addition & 5 deletions docs/src/assets/m14.bib → docs/src/assets/bibtex/m14.bib
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
@ARTICLE{2014A&A...564A..63M,
author = {{Ma{\'\i}z Apell{\'a}niz}, J. and {Evans}, C.~J. and {Barb{\'a}}, R.~H. and
{Gr{\"a}fener}, G. and {Bestenlehner}, J.~M. and {Crowther}, P.~A. and
{Garc{\'\i}a}, M. and {Herrero}, A. and {Sana}, H. and
{Sim{\'o}n-D{\'\i}az}, S. and {Taylor}, W.~D. and {van Loon}, J. Th. and
{Vink}, J.~S. and {Walborn}, N.~R.},
author = {{Ma{\'\i}z Apell{\'a}niz}, J. and {Evans}, C.~J. and {Barb{\'a}}, R.~H. and {Gr{\"a}fener}, G. and {Bestenlehner}, J.~M. and {Crowther}, P.~A. and {Garc{\'\i}a}, M. and {Herrero}, A. and {Sana}, H. and {Sim{\'o}n-D{\'\i}az}, S. and {Taylor}, W.~D. and {van Loon}, J. Th. and {Vink}, J.~S. and {Walborn}, N.~R.},
title = "{The VLT-FLAMES Tarantula Survey. XVI. The optical and NIR extinction laws in 30 Doradus and the photometric determination of the effective temperatures of OB stars}",
journal = {\aap},
keywords = {open clusters and associations: individual: 30 Doradus, dust, extinction, Magellanic Clouds, stars: early-type, stars: fundamental parameters, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Solar and Stellar Astrophysics},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading