From a96db58d39cedcc072302aac3134b74bd17813ac Mon Sep 17 00:00:00 2001 From: Ankur_Anand Date: Mon, 30 Oct 2023 11:06:00 +0530 Subject: [PATCH 1/3] Adding codecov for python Signed-off-by: Ankur_Anand --- .github/workflows/python_test.yml | 4 ++++ .gitignore | 3 ++- Cargo.toml | 34 +++++++++++++++---------------- tox.ini | 5 +++-- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/python_test.yml b/.github/workflows/python_test.yml index 624c12d..a7d6152 100644 --- a/.github/workflows/python_test.yml +++ b/.github/workflows/python_test.yml @@ -47,6 +47,10 @@ jobs: run: pip install 'maturin>=0.14,<0.15' virtualenv tox==3.28.0 tox-pyo3 - name: Test with tox run: tox -c tox.ini + - uses: codecov/codecov-action@v3 + with: + files: coverage.xml + name: ${{github.job}}-reports - name: Upload Pravega standalone logs uses: actions/upload-artifact@v2 if: always() diff --git a/.gitignore b/.gitignore index 4628878..77ca438 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,5 @@ __pycache__/ book/book html/ python_binding/.tox/ - +.coverage +coverage.xml diff --git a/Cargo.toml b/Cargo.toml index d689853..e9a0a16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,24 +23,24 @@ python_binding = ["pyo3", "pyo3-asyncio"] #Run tests for bindings using command cargo test --no-default-features [dependencies] -tracing = "0.1.17" -tracing-futures = "0.2.4" -tracing-subscriber = "0.2.2" -pravega-client = {version = "0.3"} -pravega-client-shared = {version = "0.3"} -pravega-controller-client = {version = "0.3"} -pravega-wire-protocol = {version = "0.3"} -pravega-client-retry = {version = "0.3"} -pravega-connection-pool = {version = "0.3"} -pravega-client-config = {version = "0.3"} -tokio = "1.1" +tracing = "0.1.40" +tracing-futures = "0.2.5" +tracing-subscriber = "0.3.17" +pravega-client = {version = "0.3.2"} +pravega-client-shared = {version = "0.3.5"} +pravega-controller-client = {version = "0.3.5"} +pravega-wire-protocol = {version = "0.3.5"} +pravega-client-retry = {version = "0.3.5"} +pravega-connection-pool = {version = "0.3.5"} +pravega-client-config = {version = "0.3.5"} +tokio = "1.33.0" lazy_static = "1.4.0" -uuid = {version = "0.8", features = ["v4"]} -futures = "0.3.5" -derive-new = "0.5" +uuid = {version = "1.5.0", features = ["v4"]} +futures = "0.3.28" +derive-new = "0.5.9" #Python bindings pyo3 = { version = "0.14.5" , features = ["extension-module", "multiple-pymethods"], optional = true } -pyo3-asyncio = { version = "0.14", features = ["tokio-runtime"], optional = true } +pyo3-asyncio = { version = "0.14.0", features = ["tokio-runtime"], optional = true } #WASM bindings -wasm-bindgen = { version = "0.2.63", optional = true } -cfg-if = "0.1.10" +wasm-bindgen = { version = "0.2.87", optional = true } +cfg-if = "1.0.0" diff --git a/tox.ini b/tox.ini index f37b0a6..250e778 100644 --- a/tox.ini +++ b/tox.ini @@ -7,11 +7,12 @@ requires = tox-pyo3 [testenv] pyo3 = True setenv = - RUST_LOG=debug + python3.10: COVERAGE_FILE = .coverage deps = pytest pytest-timeout aiounittest -commands = pytest {posargs:tests} --timeout=300 -vvvvv + pytest-cov +commands = pytest --cov --cov-report xml {posargs:tests} --timeout=300 -vvvvv skip_install = True \ No newline at end of file From 11462dcc423b44fc9eaa6bde58692a0186a17aee Mon Sep 17 00:00:00 2001 From: Ankur_Anand Date: Mon, 30 Oct 2023 11:28:32 +0530 Subject: [PATCH 2/3] updating version Signed-off-by: Ankur_Anand --- Cargo.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e9a0a16..8028681 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pravega" -version = "0.3.5" +version = "0.3.6" edition = "2018" categories = ["network-programming"] keywords = ["streaming", "client", "pravega"] @@ -26,13 +26,13 @@ python_binding = ["pyo3", "pyo3-asyncio"] tracing = "0.1.40" tracing-futures = "0.2.5" tracing-subscriber = "0.3.17" -pravega-client = {version = "0.3.2"} -pravega-client-shared = {version = "0.3.5"} -pravega-controller-client = {version = "0.3.5"} -pravega-wire-protocol = {version = "0.3.5"} -pravega-client-retry = {version = "0.3.5"} -pravega-connection-pool = {version = "0.3.5"} -pravega-client-config = {version = "0.3.5"} +pravega-client = {version = "0.3"} +pravega-client-shared = {version = "0.3"} +pravega-controller-client = {version = "0.3"} +pravega-wire-protocol = {version = "0.3"} +pravega-client-retry = {version = "0.3"} +pravega-connection-pool = {version = "0.3"} +pravega-client-config = {version = "0.3"} tokio = "1.33.0" lazy_static = "1.4.0" uuid = {version = "1.5.0", features = ["v4"]} From a72b2e4aba13ffbfb4484a768581aa31b0665aa3 Mon Sep 17 00:00:00 2001 From: Ankur_Anand Date: Tue, 31 Oct 2023 10:14:51 +0530 Subject: [PATCH 3/3] revert Signed-off-by: Ankur_Anand --- Cargo.toml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8028681..0cc27c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,9 +23,9 @@ python_binding = ["pyo3", "pyo3-asyncio"] #Run tests for bindings using command cargo test --no-default-features [dependencies] -tracing = "0.1.40" -tracing-futures = "0.2.5" -tracing-subscriber = "0.3.17" +tracing = "0.1.17" +tracing-futures = "0.2.4" +tracing-subscriber = "0.2.2" pravega-client = {version = "0.3"} pravega-client-shared = {version = "0.3"} pravega-controller-client = {version = "0.3"} @@ -33,14 +33,14 @@ pravega-wire-protocol = {version = "0.3"} pravega-client-retry = {version = "0.3"} pravega-connection-pool = {version = "0.3"} pravega-client-config = {version = "0.3"} -tokio = "1.33.0" +tokio = "1.1" lazy_static = "1.4.0" -uuid = {version = "1.5.0", features = ["v4"]} -futures = "0.3.28" -derive-new = "0.5.9" +uuid = {version = "0.8", features = ["v4"]} +futures = "0.3.5" +derive-new = "0.5" #Python bindings pyo3 = { version = "0.14.5" , features = ["extension-module", "multiple-pymethods"], optional = true } -pyo3-asyncio = { version = "0.14.0", features = ["tokio-runtime"], optional = true } +pyo3-asyncio = { version = "0.14", features = ["tokio-runtime"], optional = true } #WASM bindings -wasm-bindgen = { version = "0.2.87", optional = true } -cfg-if = "1.0.0" +wasm-bindgen = { version = "0.2.63", optional = true } +cfg-if = "0.1.10"