Skip to content

Commit

Permalink
Merge pull request #45 from JuliaAstro/abhro-patch-1
Browse files Browse the repository at this point in the history
Aggregated updates
  • Loading branch information
abhro authored Jul 16, 2024
2 parents 0e06286 + 8935f9a commit d829131
Show file tree
Hide file tree
Showing 38 changed files with 940 additions and 808 deletions.
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"
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

0 comments on commit d829131

Please sign in to comment.