diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7979679..2338726 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,15 +77,16 @@ jobs: - name: Run tests run: ./scripts/test-python.sh - test-r: - name: πŸ“ˆ Test R - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-r@v2 - - run: rustup update - - name: Run tests - run: ./scripts/test-r.sh --install + # TODO: Error in loadNamespace(x) : there is no package called β€˜devtools’ + # test-r: + # name: πŸ“ˆ Test R + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: r-lib/actions/setup-r@v2 + # - run: rustup update + # - name: Run tests + # run: ./scripts/test-r.sh --install docs: name: πŸ“š Update docs website diff --git a/lib/docs/docs/index.md b/lib/docs/docs/index.md index 60a903f..29775d4 100644 --- a/lib/docs/docs/index.md +++ b/lib/docs/docs/index.md @@ -10,7 +10,7 @@ Whether you're a developer looking to work with CURIEs (e.g. expand or compress) ## ✨ CURIEs management -- πŸ“₯ **Import converters** from JSON or JSON-LD context, with helper functions for popular converters, such as `get_obo_converter()`, or create a custom converter programmatically. +- πŸ“₯ **Import converters** from JSON prefix maps or JSON-LD context, with helper functions for popular converters, such as `get_obo_converter()`, or create a custom converter programmatically. - πŸ”— **Expand CURIEs** from their compressed form to URIs. - πŸ—œοΈ **Compress URIs** to CURIEs. @@ -28,7 +28,7 @@ This library is packaged for easy use across various interfaces and languages: - πŸ¦€ **Rust developers**: available as a Rust crate `curies` - 🐍 **Python programmers**: available as a Python pip package `curies-rs` - 🌐 **Web developers**: available as a NPM package `@biopragmatics/curies`, compiled to [WebAssembly](https://webassembly.org/), for browser integrations with JavaScript, or NodeJS. -- πŸ“ˆ **R data scientists**: soon available as a R package `curies.r` +- πŸ“ˆ **R data scientists**: soon available as a R package `curies` ## βš”οΈ Cross-platform support diff --git a/lib/docs/docs/r.md b/lib/docs/docs/r.md index 78ad149..578d7e1 100644 --- a/lib/docs/docs/r.md +++ b/lib/docs/docs/r.md @@ -21,7 +21,7 @@ Rscript -e 'rextendr::document("./r")' Initialize a converter, then use it to `compress` URIs to CURIEs, or `expand` CURIEs to URIs: ```r title="curies_conversion.R" -library(curiesr) +library(curies) converter <- Converter$new() diff --git a/lib/docs/mkdocs.yml b/lib/docs/mkdocs.yml index 2c6776a..1a510f9 100644 --- a/lib/docs/mkdocs.yml +++ b/lib/docs/mkdocs.yml @@ -120,7 +120,7 @@ extra: - icon: fontawesome/brands/npm link: https://www.npmjs.com/package/@biopragmatics/curies - icon: fontawesome/brands/r-project - link: https://cran.r-project.org/web/packages/curies.r + link: https://cran.r-project.org/web/packages/curies - icon: fontawesome/brands/github link: https://github.com/biopragmatics # - icon: fontawesome/brands/docker diff --git a/python/Cargo.toml b/python/Cargo.toml index fae085e..7c80d3f 100644 --- a/python/Cargo.toml +++ b/python/Cargo.toml @@ -18,7 +18,7 @@ crate-type = ["cdylib"] [dependencies] curies.workspace = true serde.workspace = true -pyo3 = { version = "0.20", features = ["extension-module"] } +pyo3 = { version = "0.21", features = ["extension-module"] } # pyo3-asyncio = { version = "0.20", features = ["tokio-runtime"] } -pythonize = "0.20" +pythonize = "0.21" tokio = { version = "1.34", features = ["rt-multi-thread"] } diff --git a/python/src/api.rs b/python/src/api.rs index ed09777..4fce577 100644 --- a/python/src/api.rs +++ b/python/src/api.rs @@ -143,14 +143,16 @@ impl ConverterPy { /// Expand a list of CURIEs #[pyo3(text_signature = "($self, curies)")] - fn expand_list(&self, curies: Vec<&str>) -> Vec> { - self.converter.expand_list(curies) + fn expand_list(&self, curies: Vec) -> Vec> { + self.converter + .expand_list(curies.iter().map(|s| s.as_str()).collect()) } /// Compress a list of URIs #[pyo3(text_signature = "($self, uris)")] - fn compress_list(&self, uris: Vec<&str>) -> Vec> { - self.converter.compress_list(uris) + fn compress_list(&self, uris: Vec) -> Vec> { + self.converter + .compress_list(uris.iter().map(|s| s.as_str()).collect()) } /// Chain with another `Converter` diff --git a/r/README.md b/r/README.md index e3e34e6..f03622c 100644 --- a/r/README.md +++ b/r/README.md @@ -68,7 +68,8 @@ rextendr::document("r") After installation, the following should work: ```r -library(curiesr) +library(curies) + converter <- Converter$new() curie <- converter$compress("http://purl.obolibrary.org/obo/DOID_1234") print(curie)