Skip to content

Commit

Permalink
Merge pull request #41 from EcoJulia/doc/hotfix
Browse files Browse the repository at this point in the history
Doc/hotfix
  • Loading branch information
tpoisot authored Jul 22, 2021
2 parents 36b42df + ecf5e41 commit 4e50021
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
experimental: [false]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }} # For authentication with GitHub Actions token
run: julia --project=docs/ docs/make.jl
GKSwstype: nul
run: julia --project=docs/ docs/make.jl
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NCBITaxonomy"
uuid = "f88b31d2-eb98-4433-b52d-2dd32bc6efce"
authors = ["Timothée Poisot <timothee.poisot@umontreal.ca>"]
version = "0.2.0"
version = "0.2.1"

[deps]
Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"
Expand Down
2 changes: 1 addition & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ ispath(tables) || mkpath(tables)

include(joinpath(@__DIR__, "..", "src", "types.jl"))

function _class_to_enum(c::T) where { T <: String}
function _class_to_enum(c::T) where {T <: String}
c = replace(c, " " => "_")
c = replace(c, "-" => "_")
return getproperty(@__MODULE__, Symbol("class_$(c)"))
Expand Down
28 changes: 14 additions & 14 deletions docs/src/namefinding.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,41 @@ The `taxon` function will return a `NCBITaxon` object, which has two fields:
`name` and `id`. We do not return the `class` attribute, because the package
will always return the scientific name, as the examples below illustrate:

```@example taxid
```@example taxon
using NCBITaxonomy
taxid("Bos taurus")
taxon("Bos taurus")
```

There is a convenience string macro to replace the `taxid` function:
There is a convenience string macro to replace the `taxon` function:

```@example taxid
```@example taxon
ncbi"Bos taurus"
```

Note that because the names database contains vernacular and deprecated names,
the *scientific name* will be returned, no matter what you search

```@example taxid
taxid("cow")
```@example taxon
taxon("cow")
```

This may be a good point to note that we can use the `vernacular` function to
get a list of NCBI-known vernacular names:

```@example taxid
taxid("cow") |> vernacular
```@example taxon
taxon("cow") |> vernacular
```

It also work with authorities:

```@example taxid
taxid("cow") |> authority
```@example taxon
taxon("cow") |> authority
```

You can pass an additional `strict=false` keyword argument to the `taxon`
function to perform fuzzy name matching using the Levenshtein distance:

```@example taxid
```@example taxon
taxon("Paradiplozon homion", strict=false)
```

Expand Down Expand Up @@ -79,21 +79,21 @@ namefilter
Here is an illustration of why using namefilters makes sense. Let's say we have
to search for a potentially misspelled name:

```@example taxid
```@example taxon
@time taxon("Ebulavurus"; strict=false);
```

We can use the `virusfilter()` function to generate a table with viruses only:

```@example taxid
```@example taxon
viruses = virusfilter()
@time taxon(viruses, "Bumbulu ebolavirus"; strict=false);
```

A `namefilter` can be built in a number of ways, including by passing a list of
taxa:

```@example taxid
```@example taxon
diplectanids = namefilter(descendants(ncbi"Diplectanidae"))
taxon(diplectanids, "Lamellodiscus")
```
Expand Down

2 comments on commit 4e50021

@tpoisot
Copy link
Member Author

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

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.1 -m "<description of version>" 4e50021c5ba542eef60345e8a9ec31ad2141a6dd
git push origin v0.2.1

Please sign in to comment.