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

allow strings in args #24

Merged
merged 5 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# News

## v0.2.5 - 2023-11-28

- Improvements to testing and documentation support.

## v0.2.4 - 2023-08-10

- Minor internal improvements to doc builder and interactions with QuantumSavory.jl
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "QuantumSymbolics"
uuid = "efa7fd63-0460-4890-beb7-be1bbdfbaeae"
authors = ["QuantumSymbolics.jl contributors"]
version = "0.2.4"
version = "0.2.5"

[deps]
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
Expand Down
5 changes: 3 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ DocMeta.setdocmeta!(QuantumSymbolics, :DocTestSetup, :(using QuantumSymbolics, Q

function main()
bib = CitationBibliography(joinpath(@__DIR__,"src/references.bib"), style=:authoryear)

makedocs(
bib,
plugins=[bib],
doctest = false,
strict = Documenter.except(:missing_docs),
clean = true,
sitename = "QuantumSymbolics.jl",
format = Documenter.HTML(
assets=["assets/init.js"]
),
modules = [QuantumSymbolics],
warnonly = [:missing_docs],
authors = "Stefan Krastanov",
pages = [
"QuantumSymbolics.jl" => "index.md",
Expand Down
2 changes: 1 addition & 1 deletion src/QSymbolicsBase/QSymbolicsBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function withmetadata(strct) # TODO this should really use MacroTools instead of
end
end
struct_args = strct.args[end].args
if all(x->x isa Symbol || x isa LineNumberNode || x.head==:(::), struct_args)
if all(x->x isa Symbol || x isa LineNumberNode || x isa String || x.head==:(::), struct_args)
# add constructor
args = [x for x in struct_args if x isa Symbol || x isa Expr] # the arguments required for the constructor
args = [a isa Symbol ? a : (a.head==:(::) ? a.args[1] : a) for a in args] # drop typeasserts
Expand Down
Loading