-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dependencies: add phylopic * feat: add GBIF search to Phylopic * doc: update vignette to show GBIF search in Phylopic * semver(sdt): 0.0.6 * compat(phylopic): update HTTP * semver(phylopic): 0.0.2 * ci: add Phylopic to CompatHelper run * feat(phylopic): add function to get raster images Closes #171 * doc(phylopic): add the docstrings for new raster methods * semver(sdt): 0.0.6
- Loading branch information
Showing
8 changed files
with
86 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
""" | ||
Phylopic.imagesof(taxon::GBIF.GBIFTaxon; kwargs...) | ||
Performs a search in phylopic for a given GBIF taxon object, walking from the lowermost taxonomic level up to the top. This is not guaranteed to give the best results. | ||
""" | ||
function Phylopic.imagesof(tax::GBIF.GBIFTaxon; kwargs...) | ||
for rank in [:species, :genus, :family, :order, :class, :phylum, :kingdom] | ||
if ~ismissing(getfield(tax, rank)) | ||
rankinfo = getfield(tax, rank) | ||
phylopic_matches = Phylopic.imagesof(rankinfo.first; kwargs...) | ||
if ~isnothing(phylopic_matches) | ||
return phylopic_matches | ||
end | ||
end | ||
end | ||
return nothing | ||
end |
02dcb2c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register subdir="Phylopic"
02dcb2c
There was a problem hiding this comment.
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/82587
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: