Skip to content

Commit f8d4a31

Browse files
authored
docs: improve documentation (#14)
- Simplify installation section to single line format - Update documentation index to match README badge ordering - Clarify ecosystem integration mentions DimensionalData instead of generic Tables - Remove return type annotation from `get_capabilities` docstring - Remove unused `columns` function from HAPIVariable
1 parent 35b9d1c commit f8d4a31

6 files changed

Lines changed: 16 additions & 14 deletions

File tree

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# HAPIClient
22

3-
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaSpacePhysics.github.io/HAPIClient.jl/dev/)
43
[![DOI](https://zenodo.org/badge/935193759.svg)](https://doi.org/10.5281/zenodo.15108960)
4+
55
[![Build Status](https://github.com/JuliaSpacePhysics/HAPIClient.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaSpacePhysics/HAPIClient.jl/actions/workflows/CI.yml?query=branch%3Amain)
66
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
77
[![Coverage](https://codecov.io/gh/JuliaSpacePhysics/HAPIClient.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaSpacePhysics/HAPIClient.jl)
@@ -10,12 +10,7 @@ A Julia client for the Heliophysics Application Programmer's Interface (HAPI).
1010

1111
For information on using the package, see the [documentation](https://JuliaSpacePhysics.github.io/HAPIClient.jl/dev/). For the list of HAPI servers and datasets, see [HAPI Server Browser](https://hapi-server.org/servers/).
1212

13-
## Installation
14-
15-
```julia
16-
using Pkg
17-
Pkg.add("HAPIClient")
18-
```
13+
**Installation**: at the Julia REPL, run `using Pkg; Pkg.add("HAPIClient")`
1914

2015
## Usage Example
2116

@@ -57,4 +52,8 @@ parent(var)
5752
times(var)
5853
# to retrieve the metadata
5954
meta(var)
60-
```
55+
```
56+
57+
## Elsewhere
58+
59+
- [HAPI GitHub](https://github.com/hapi-server): Official HAPI GitHub organization

docs/src/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# HAPIClient.jl
22

3-
[![Build Status](https://github.com/JuliaSpacePhysics/HAPIClient.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaSpacePhysics/HAPIClient.jl/actions/workflows/CI.yml?query=branch%3Amain)
43
[![DOI](https://zenodo.org/badge/935193759.svg)](https://doi.org/10.5281/zenodo.15108960)
4+
5+
[![Build Status](https://github.com/JuliaSpacePhysics/HAPIClient.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaSpacePhysics/HAPIClient.jl/actions/workflows/CI.yml?query=branch%3Amain)
56
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
67
[![Coverage](https://codecov.io/gh/JuliaSpacePhysics/HAPIClient.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaSpacePhysics/HAPIClient.jl)
78

@@ -13,7 +14,7 @@ HAPIClient.jl makes it easy to access heliophysics data from HAPI-compliant serv
1314
- Browsing catalogs of datasets
1415
- Retrieving parameter information
1516
- Downloading time series data
16-
- Integration with Julia's ecosystem (Dates, Tables, Unitful)
17+
- Integration with Julia's ecosystem (Unitful, [DimensionalData](https://github.com/rafaqz/DimensionalData.jl))
1718

1819
## Installation
1920

src/server.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ format(s::Server) = getfield(s, :format)
3333
format(s) = DEFAULT_FORMAT
3434

3535
"""
36-
get_capabilities(server) -> Dict
36+
get_capabilities(server)
3737
3838
Get server capabilities.
3939
"""

src/types.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ end
114114

115115
HAPIVariable(d::AbstractDict, meta, i::Integer) = HAPIVariable(d, i)
116116

117-
columns(var::HAPIVariable) = meta(var)["columns"]
118117
colsize(var::HAPIVariable) = colsize(meta(var))
119118

120119
# when units have more than one value, return an array

test/data.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
@testitem "get_data" begin
44
id = "CDAWeb/AC_H0_MFI/Magnitude,BGSEc"
55
tmin = "2001-01-01T05"
6-
tmax = "2001-01-01T06"
7-
data = get_data(id, [tmin, tmax]; verbose=1)
6+
tmax = "2001-01-01T06"
7+
data = get_data(id, [tmin, tmax]; verbose = 1)
88
@test data.Magnitude == data[1]
99
@test length(data) == 2
1010
@test length(times(data)) == 225
@@ -104,4 +104,5 @@ end
104104
tmax = "2001-01-01T06:00:00"
105105

106106
@test_nowarn hapi(server, dataset, parameters, tmin, tmax)
107+
@time hapi(server, dataset, parameters, tmin, tmax)
107108
end

test/metadata.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
servers = hapi()
33
@test "https://cdaweb.gsfc.nasa.gov/hapi" in servers
44
@test length(servers) > 0
5+
6+
@test HAPIClient.get_capabilities(CDAWeb)["status"]["code"] == 1200
57
end
68

79
@testitem "Catalog" begin

0 commit comments

Comments
 (0)