Skip to content

Commit

Permalink
allow strings in args (#24)
Browse files Browse the repository at this point in the history
* allow strings in args

* Update CHANGELOG.md

* Update Project.toml

* Update make.jl
  • Loading branch information
ba2tro authored Nov 30, 2023
1 parent e06c171 commit f37a9a1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
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

4 comments on commit f37a9a1

@ba2tro
Copy link
Member Author

@ba2tro ba2tro commented on f37a9a1 Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: Register Failed
@Abhishek-1Bhatt, it looks like you are not a publicly listed member/owner in the parent organization (QuantumSavory).
If you are a member/owner, you will need to change your membership to public. See GitHub Help

@ba2tro
Copy link
Member Author

@ba2tro ba2tro commented on f37a9a1 Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/96195

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.5 -m "<description of version>" f37a9a179d071861b1debe0ad72c07114899a242
git push origin v0.2.5

Please sign in to comment.