From 0817b792cbf19c7a3b6d4eb00f42ab200b34c045 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2024 21:23:16 +0000 Subject: [PATCH 1/4] build(deps): update pyo3 requirement from 0.21.2 to 0.22.2 Updates the requirements on [pyo3](https://github.com/pyo3/pyo3) to permit the latest version. - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.21.2...v0.22.2) --- updated-dependencies: - dependency-name: pyo3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 00a4caa..037291a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ futures = "0.3.24" indicatif = "0.17.5" mysql = "25.0.1" polars = { version = "0.42.0", default-features = false, features = ["json"] } -pyo3 = { version = "0.21.2", features = ["extension-module", "anyhow"] } +pyo3 = { version = "0.22.2", features = ["extension-module", "anyhow"] } regex = "1.6.0" reqwest = { version = "0.12.5", features = [ "json", From 8b604f913d916ee21db935be20eda8926a0b0e51 Mon Sep 17 00:00:00 2001 From: noam teyssier <22600644+noamteyssier@users.noreply.github.com> Date: Fri, 6 Sep 2024 14:29:15 -0700 Subject: [PATCH 2/4] fix: import pymodulemethods trait needed for add_function --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index cc49acb..8b844da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -use pyo3::{pymodule, types::PyModule, wrap_pyfunction, Bound, PyResult, Python}; +use pyo3::{pymodule, types::{PyModule, PyModuleMethods}, wrap_pyfunction, Bound, PyResult, Python}; /// `Enrichr` submodule pub mod enrichr; From e986a3f3a1b9ef3a9ad820cbb890d0fb7961e3b9 Mon Sep 17 00:00:00 2001 From: noam teyssier <22600644+noamteyssier@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:32:26 -0700 Subject: [PATCH 3/4] fix: update warnings by using pyo3 signature instead of deprecated text signature for optional args --- src/blast/python.rs | 3 ++- src/ensembl/python.rs | 4 ++++ src/info/python.rs | 2 +- src/lib.rs | 6 +++++- src/seq/python.rs | 2 +- src/ucsc/python.rs | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/blast/python.rs b/src/blast/python.rs index dabe85c..c523c69 100644 --- a/src/blast/python.rs +++ b/src/blast/python.rs @@ -12,9 +12,10 @@ use pyo3::{ #[pyfunction(name = "blast")] #[pyo3( - text_signature = "(query, program = None, database = None, limit = 50, expect = 10.0, low_comp_filter = False, megablast = True)" + signature = (query, program = None, database = None, limit = None, expect = None, low_comp_filter = None, megablast = None) )] #[allow(clippy::too_many_arguments)] + pub fn python_blast<'py>( py: Python<'py>, query: &str, diff --git a/src/ensembl/python.rs b/src/ensembl/python.rs index a0a189e..b0297bc 100644 --- a/src/ensembl/python.rs +++ b/src/ensembl/python.rs @@ -9,6 +9,7 @@ use pyo3::{ #[pyfunction(name = "search")] #[allow(clippy::needless_pass_by_value)] +#[pyo3(signature = (search_terms, database = None, species = None, db_type = None, release = None, assembly = None))] pub fn python_ensembl_search<'py>( py: Python<'py>, search_terms: Vec, @@ -39,6 +40,7 @@ pub fn python_ensembl_search<'py>( #[pyfunction(name = "database")] #[must_use] #[allow(clippy::needless_pass_by_value)] +#[pyo3(signature = (filter = None))] pub fn python_ensembl_database(_py: Python, filter: Option) -> Vec { let results = database(&filter).expect("Could not query ensembl SQL"); results.as_vec() @@ -50,6 +52,7 @@ pub fn python_ensembl_release(_py: Python) -> usize { } #[pyfunction(name = "reference")] +#[pyo3(signature = (species = None, release = None, datatype = None))] pub fn python_ensembl_reference<'py>( py: Python<'py>, species: Option<&str>, @@ -87,6 +90,7 @@ pub fn python_ensembl_reference<'py>( } #[pyfunction(name = "species")] +#[pyo3(signature = (release = None, datatype = None))] pub fn python_ensembl_species( _py: Python, release: Option, diff --git a/src/info/python.rs b/src/info/python.rs index 28d7e4c..7b84fd4 100644 --- a/src/info/python.rs +++ b/src/info/python.rs @@ -7,7 +7,7 @@ use pyo3::{ }; #[pyfunction(name = "info")] -#[pyo3(text_signature = "(search_terms, species = 'homo_sapiens', taxon_id = 9606)")] +#[pyo3(signature = (search_terms, species = None, taxon_id = None))] #[allow(clippy::needless_pass_by_value)] pub fn python_info( py: Python<'_>, diff --git a/src/lib.rs b/src/lib.rs index 8b844da..95f7fe5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,8 @@ -use pyo3::{pymodule, types::{PyModule, PyModuleMethods}, wrap_pyfunction, Bound, PyResult, Python}; +use pyo3::{ + pymodule, + types::{PyModule, PyModuleMethods}, + wrap_pyfunction, Bound, PyResult, Python, +}; /// `Enrichr` submodule pub mod enrichr; diff --git a/src/seq/python.rs b/src/seq/python.rs index 0b10b35..94670d4 100644 --- a/src/seq/python.rs +++ b/src/seq/python.rs @@ -4,7 +4,7 @@ use anyhow::{bail, Result}; use pyo3::{pyfunction, types::PyList, Bound, Python}; #[pyfunction(name = "seq")] -#[pyo3(text_signature = "(search_terms, translate = False, db_name = 'homo_sapiens')")] +#[pyo3(signature = (search_terms, translate = None, species = None))] #[allow(clippy::needless_pass_by_value)] pub fn python_seq( py: Python<'_>, diff --git a/src/ucsc/python.rs b/src/ucsc/python.rs index 494ab90..eca05e2 100644 --- a/src/ucsc/python.rs +++ b/src/ucsc/python.rs @@ -8,7 +8,7 @@ use pyo3::{ }; #[pyfunction(name = "blat")] -#[pyo3(text_signature = "(sequence, seqtype = 'dna', db_name = 'hg38')")] +#[pyo3(signature = (sequence, seqtype = None, db_name = None))] pub fn python_ucsc_blat<'py>( py: Python<'py>, sequence: &str, From 255bab57c37534ea93697cee388fdca215c9d85d Mon Sep 17 00:00:00 2001 From: noam teyssier <22600644+noamteyssier@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:39:34 -0700 Subject: [PATCH 4/4] chore: update semver --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 037291a..d13577c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ggetrs" -version = "0.1.81" +version = "0.1.82" edition = "2021" license = "MIT" description = "Efficient querying of biological databases from the command line"