Skip to content

Commit

Permalink
Fix documentation generation, version bump, update deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
James.Hester committed Jan 3, 2025
1 parent 0317827 commit 6e4885a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CrystalInfoFramework"
uuid = "6007d9b0-c6b2-11e8-0510-1d10e825f3f1"
authors = ["James.Hester <[email protected]>"]
version = "0.7.0"
version = "0.8.0"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "0.25"
Documenter = "1.8.0"
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ makedocs(sitename="CrystalInfoFramework documentation",
"API" => "api.md"
],
#doctest = :fix
warnonly = (:cross_references)
)

deploydocs(
Expand Down
5 changes: 3 additions & 2 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ haskey(c::Cif,name)
getindex(c::Cif,n)
setindex!(c::Cif,v,n)
show(io::IO,::MIME"text/plain",c::Cif)
show(io::IO,::MIME"text/cif",c::Cif)
```

## CIF blocks
Expand Down Expand Up @@ -89,7 +90,7 @@ get_categories(d::DDLm_Dictionary)
get_keys_for_cat(d::DDLm_Dictionary,cat;aliases=false)
get_default(d::DDLm_Dictionary,s)
lookup_default(dict::DDLm_Dictionary,dataname::String,cp)
show(io::IO,::MIME"text/cif",ddlm_dic::DDLm_Dictionary)
show(io::IOContext,::MIME"text/cif",ddlm_dic::DDLm_Dictionary;header="")
```

### DDL2 Dictionaries
Expand All @@ -105,6 +106,6 @@ keys(d::DDL2_Dictionary)
getindex(d::DDL2_Dictionary,k)
get_categories(d::DDL2_Dictionary)
get_default(d::DDL2_Dictionary,dataname)
show(io::IO,::MIME"text/cif",ddl2_dic::DDL2_Dictionary)
show(io::IOContext,::MIME"text/cif",ddl2_dic::DDL2_Dictionary)
```

12 changes: 6 additions & 6 deletions src/cif_output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ end
Write the contents of `c` as a CIF file to `io`, ordering each of
the CifContainers according to `ordering`.
"""
show(io::IO,::MIME"text/cif",c::Cif; ordering=[]) = begin
Base.show(io::IO,::MIME"text/cif",c::Cif; ordering=[]) = begin

for k in keys(c)
write(io,"data_$k\n")
Expand Down Expand Up @@ -953,7 +953,7 @@ Output `ddlm_dic` in CIF format. `header` contains text that will
be output in a comment box at the top of the file, which will replace
any header comment stored in `ddlm_dic`.
"""
show(io::IOContext,::MIME"text/cif",ddlm_dic::DDLm_Dictionary;header="") = begin
Base.show(io::IOContext,::MIME"text/cif",ddlm_dic::DDLm_Dictionary;header="") = begin
dicname = ddlm_dic[:dictionary].title[]
#
# Header
Expand Down Expand Up @@ -1121,7 +1121,7 @@ output layout using the following keywords:
strict: follow the IUCr layout rules
"""
show(io::IOContext,::MIME"text/cif",ddl2_dic::DDL2_Dictionary) = begin
Base.show(io::IOContext,::MIME"text/cif",ddl2_dic::DDL2_Dictionary) = begin
dicname = ddl2_dic[:dictionary].title[]
write(io,"#")
write(io,"""
Expand Down Expand Up @@ -1158,11 +1158,11 @@ show(io::IOContext,::MIME"text/cif",ddl2_dic::DDL2_Dictionary) = begin
end

"""
show(io::IO,::MIME"text/cif",ddl2_dic::AbstractCifDictionary)
show(io::IO,::MIME"text/cif",ddl_dic::AbstractCifDictionary;strict=false, kwargs...)
Output `ddl2_dic` to `IO` in CIF format
"""
show(io::IO,x::MIME"text/cif",ddl2_dic::AbstractCifDictionary;strict=false,kwargs...) = begin
Base.show(io::IO,x::MIME"text/cif",ddl_dic::AbstractCifDictionary;strict=false,kwargs...) = begin
ic = IOContext(io,:strict=>strict)
show(ic,x,ddl2_dic;kwargs...)
show(ic,x,ddl_dic;kwargs...)
end

0 comments on commit 6e4885a

Please sign in to comment.