Skip to content

Commit

Permalink
add uniquekeys methods for layer keys naming (#384)
Browse files Browse the repository at this point in the history
* add uniquekeys methods for layer keys naming

* bump patch version to 0.20.9
  • Loading branch information
rafaqz authored Jun 28, 2022
1 parent a712d63 commit 472813d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DimensionalData"
uuid = "0703355e-b756-11e9-17c0-8b28908087d0"
authors = ["Rafael Schouten <[email protected]>"]
version = "0.20.8"
version = "0.20.9"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
2 changes: 2 additions & 0 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,5 @@ function uniquekeys(keys::Tuple{Symbol,Vararg{<:Symbol}})
count(k1 -> k == k1, keys) > 1 ? Symbol(:layer, id) : k
end
end
uniquekeys(t::Tuple) = ntuple(i -> Symbol(:layer, i), length(t))
uniquekeys(nt::NamedTuple) = keys(nt)

2 comments on commit 472813d

@rafaqz
Copy link
Owner Author

@rafaqz rafaqz commented on 472813d Jun 28, 2022

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/63301

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.20.9 -m "<description of version>" 472813db5bc36e365afc812c862f09ab8430c789
git push origin v0.20.9

Please sign in to comment.