Skip to content

Commit

Permalink
docstring nit & conversion of example to jldoctest
Browse files Browse the repository at this point in the history
  • Loading branch information
thchr committed Sep 17, 2024
1 parent f302213 commit c944cff
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/types_symmetryvectors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,20 @@ num(n::SymmetryVector) = num(first(first(irreps(n))))
s::AbstractString,
lgirsv::Vector{Collection{LGIrrep{D}}}) -> SymmetryVector{D}
Parse a string `s` to a `SymmetryVector` over the irreps provided in `lgirsv`. The labels of
`lgirsv` and `s` must be provided in a shared convention.
Parse a string `s` to a `SymmetryVector` over the irreps provided in `lgirsv`.
The irrep labels of `lgirsv` and `s` must use the same convention.
## Example
```julia
```jldoctest
julia> brs = calc_bandreps(220);
julia> lgirsv = irreps(brs); # irreps at P, H, Γ, & PA
julia> s = "[2P₃, 4N₁, H₁H₂+H₄H₅, Γ₁+Γ₂+Γ₄+Γ₅, 2PA₃]"
julia> s = "[2P₃, 4N₁, H₁H₂+H₄H₅, Γ₁+Γ₂+Γ₄+Γ₅, 2PA₃]";
julia> parse(SymmetryVector, s, lgirsv)
15-irrep SymmetryVector{3}:
[2P₃, 4N₁, H₁H₂+H₄H₅, Γ₁+Γ₂+Γ₄+Γ₅, 2PA₃] (8 bands)
```
"""
function Base.parse(
Expand Down

2 comments on commit c944cff

@thchr
Copy link
Owner Author

@thchr thchr commented on c944cff Sep 17, 2024

Choose a reason for hiding this comment

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

@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/115332

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.6.3 -m "<description of version>" c944cfff6a7274ec33464ed2f77553c86cf4dd26
git push origin v0.6.3

Please sign in to comment.