Skip to content

Commit

Permalink
Parse HDF5 doxygen tag file
Browse files Browse the repository at this point in the history
Capture group URLs as well

Allow for default URL if function name is not found

Use new URLs in docstrings

Grab api_defs.jl from master

Rebase generated files

Link VFL page as H5FD

Apply formatting

Switch to v1.14 documentation links

Fix URLs to C API rather than Java API

Update API bindings
  • Loading branch information
mkitti committed Aug 27, 2023
1 parent b5a5268 commit ba74758
Show file tree
Hide file tree
Showing 7 changed files with 811 additions and 910 deletions.
2 changes: 1 addition & 1 deletion docs/src/api_bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ h5z_unregister

---

## [[`H5FD`](https://docs.hdfgroup.org/hdf5/develop/_v_f_l.html) — File Drivers](@id H5FD)
## [[`H5FD`](https://docs.hdfgroup.org/hdf5/v1_14/_v_f_l.html) — File Drivers](@id H5FD)
- [`h5fd_core_init`](@ref h5fd_core_init)
- [`h5fd_family_init`](@ref h5fd_family_init)
- [`h5fd_log_init`](@ref h5fd_log_init)
Expand Down
746 changes: 328 additions & 418 deletions gen/DoxygenTagParser/hdf5_func_urls.tsv

Large diffs are not rendered by default.

420 changes: 201 additions & 219 deletions gen/DoxygenTagParser/hdf5_group_urls.tsv

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion gen/DoxygenTagParser/src/DoxygenTagParser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,26 @@ function parse_tag_file(hdf5_tag_url=HDF5_TAG_URL)
func_arglist = content(func_child)
end
end
if func_name == "H5Pget_chunk"
println(compound_element)
end
funcdict[func_name] = HDF5FunctionInfo(
func_name, func_anchorfile, func_anchor, func_arglist
)
elseif name(compound_child) == "name"
group_name = content(compound_child)
elseif name(compound_child) == "title"
group_title = content(compound_child)
if startswith(group_title, "Java")
break
end
elseif name(compound_child) == "filename"
group_filename = content(compound_child)
end
end
if startswith(group_title, "Java")
continue
end
groupdict[group_name] = HDF5GroupInfo(group_name, group_title, group_filename)
end
end
Expand All @@ -92,7 +101,7 @@ function hdf5_func_url(info::HDF5FunctionInfo; prefix=DEFAULT_URL_PREFIX)
end

function hdf5_group_url(
info::HDF5GroupInfo; prefix="https://docs.hdfgroup.org/hdf5/develop/"
info::HDF5GroupInfo; prefix="https://docs.hdfgroup.org/hdf5/v1_14/"
)
return prefix * info.filename
end
Expand Down
2 changes: 1 addition & 1 deletion gen/bind_generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function _bind(__module__, __source__, sig::Expr, err::Union{String,Expr,Nothing
docstr *=
"\n\nSee `libhdf5` documentation for [`$cfuncname`]" *
"(" *
get(urldict, string(cfuncname), "https://docs.hdfgroup.org/hdf5/develop/") *
get(urldict, string(cfuncname), "https://docs.hdfgroup.org/hdf5/v1_14/") *
").\n"
end
# Then assemble the pieces. Doing it through explicit Expr() objects
Expand Down
2 changes: 1 addition & 1 deletion gen/gen_wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ for (mod, desc, urltail) in (
apidocs *= """
---
## [[`$mod`]($(get(group_url_dict, mod, "https://docs.hdfgroup.org/hdf5/develop/"))) — $desc](@id $mod)
## [[`$mod`]($(get(group_url_dict, mod, "https://docs.hdfgroup.org/hdf5/v1_14/"))) — $desc](@id $mod)
$index
```@docs
$funcs
Expand Down
538 changes: 269 additions & 269 deletions src/api/functions.jl

Large diffs are not rendered by default.

0 comments on commit ba74758

Please sign in to comment.