From 17ed7aa901e2f99f9a8d719c3670ecf47434ffa0 Mon Sep 17 00:00:00 2001 From: mathleur Date: Fri, 19 Jun 2026 14:19:25 +0200 Subject: [PATCH 1/8] add py_qubed_meteo under qubed_meteo workspace --- qubed_meteo/Cargo.toml | 2 +- {py_qubed_meteo => qubed_meteo/py_qubed_meteo}/Cargo.toml | 0 {py_qubed_meteo => qubed_meteo/py_qubed_meteo}/pyproject.toml | 0 {py_qubed_meteo => qubed_meteo/py_qubed_meteo}/src/lib.rs | 0 .../py_qubed_meteo}/tests/test_api.py | 0 .../py_qubed_meteo}/tests/test_qubed_meteo_api.py | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename {py_qubed_meteo => qubed_meteo/py_qubed_meteo}/Cargo.toml (100%) rename {py_qubed_meteo => qubed_meteo/py_qubed_meteo}/pyproject.toml (100%) rename {py_qubed_meteo => qubed_meteo/py_qubed_meteo}/src/lib.rs (100%) rename {py_qubed_meteo => qubed_meteo/py_qubed_meteo}/tests/test_api.py (100%) rename {py_qubed_meteo => qubed_meteo/py_qubed_meteo}/tests/test_qubed_meteo_api.py (100%) diff --git a/qubed_meteo/Cargo.toml b/qubed_meteo/Cargo.toml index a34d6849..3c2ebf54 100644 --- a/qubed_meteo/Cargo.toml +++ b/qubed_meteo/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://ecmwf.github.io/qubed/" [workspace] members = [ - "../py_qubed_meteo", + "py_qubed_meteo", ] [dependencies] diff --git a/py_qubed_meteo/Cargo.toml b/qubed_meteo/py_qubed_meteo/Cargo.toml similarity index 100% rename from py_qubed_meteo/Cargo.toml rename to qubed_meteo/py_qubed_meteo/Cargo.toml diff --git a/py_qubed_meteo/pyproject.toml b/qubed_meteo/py_qubed_meteo/pyproject.toml similarity index 100% rename from py_qubed_meteo/pyproject.toml rename to qubed_meteo/py_qubed_meteo/pyproject.toml diff --git a/py_qubed_meteo/src/lib.rs b/qubed_meteo/py_qubed_meteo/src/lib.rs similarity index 100% rename from py_qubed_meteo/src/lib.rs rename to qubed_meteo/py_qubed_meteo/src/lib.rs diff --git a/py_qubed_meteo/tests/test_api.py b/qubed_meteo/py_qubed_meteo/tests/test_api.py similarity index 100% rename from py_qubed_meteo/tests/test_api.py rename to qubed_meteo/py_qubed_meteo/tests/test_api.py diff --git a/py_qubed_meteo/tests/test_qubed_meteo_api.py b/qubed_meteo/py_qubed_meteo/tests/test_qubed_meteo_api.py similarity index 100% rename from py_qubed_meteo/tests/test_qubed_meteo_api.py rename to qubed_meteo/py_qubed_meteo/tests/test_qubed_meteo_api.py From f22b6b46c7ad050942e6630195030e56f1055a2d Mon Sep 17 00:00:00 2001 From: mathleur Date: Fri, 19 Jun 2026 14:38:36 +0200 Subject: [PATCH 2/8] fix ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3abebdba..439916bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: working-directory: qubed_meteo run: | uv tool run maturin build \ - -m ../py_qubed_meteo/Cargo.toml + -m qubed_meteo/py_qubed_meteo/Cargo.toml # Install built wheels into an isolated uv-managed venv and run pytest. - name: Run Python binding tests From 3119525480e5d6e93a1b16038fff62c2cdf355fc Mon Sep 17 00:00:00 2001 From: mathleur Date: Fri, 19 Jun 2026 14:39:47 +0200 Subject: [PATCH 3/8] fix ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 439916bc..f3a7ebaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: working-directory: qubed_meteo run: | uv tool run maturin build \ - -m qubed_meteo/py_qubed_meteo/Cargo.toml + -m py_qubed_meteo/Cargo.toml # Install built wheels into an isolated uv-managed venv and run pytest. - name: Run Python binding tests From 4d50c7ba06b148d9673d984eeccf66a3d9963e7f Mon Sep 17 00:00:00 2001 From: mathleur Date: Fri, 19 Jun 2026 14:42:38 +0200 Subject: [PATCH 4/8] fix ci.yml --- qubed_meteo/py_qubed_meteo/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubed_meteo/py_qubed_meteo/Cargo.toml b/qubed_meteo/py_qubed_meteo/Cargo.toml index 9a50b0e1..e1a92200 100644 --- a/qubed_meteo/py_qubed_meteo/Cargo.toml +++ b/qubed_meteo/py_qubed_meteo/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.1" edition = "2024" [dependencies] -qubed = { path = "../qubed" } +qubed = { path = "../../qubed" } qubed_meteo = { path = "../qubed_meteo" } serde_json = "1.0.145" pyo3 = { version = "0.28", features = ["extension-module", "abi3-py38"] } From 4816fd453ab9ecf9c1a3afeb3424f9936104f98e Mon Sep 17 00:00:00 2001 From: mathleur Date: Fri, 19 Jun 2026 15:01:23 +0200 Subject: [PATCH 5/8] restructure workspaces --- .github/workflows/ci.yml | 22 +++++++++----- .github/workflows/publish-crates.yml | 2 +- .github/workflows/publish-pypi.yml | 7 ++++- Cargo.toml | 1 - py_qubed/Cargo.toml | 2 -- pyproject.toml | 1 - qubed_meteo/Cargo.toml | 29 ++----------------- qubed_meteo/py_qubed_meteo/pyproject.toml | 4 --- qubed_meteo/pyproject.toml | 10 +++++++ qubed_meteo/qubed_meteo/Cargo.toml | 23 +++++++++++++++ .../{ => qubed_meteo}/bin/fdb_db_reader.rs | 0 .../examples/read_from_dss_constraints.rs | 0 .../examples/read_from_fdb_list.rs | 0 .../examples/read_from_mars_list.rs | 0 .../src/adapters/dss_constraints.rs | 0 .../{ => qubed_meteo}/src/adapters/fdb.rs | 0 .../src/adapters/mars_list.rs | 0 .../{ => qubed_meteo}/src/adapters/mod.rs | 0 .../src/adapters/to_constraints.rs | 0 qubed_meteo/{ => qubed_meteo}/src/lib.rs | 0 20 files changed, 58 insertions(+), 43 deletions(-) create mode 100644 qubed_meteo/pyproject.toml create mode 100644 qubed_meteo/qubed_meteo/Cargo.toml rename qubed_meteo/{ => qubed_meteo}/bin/fdb_db_reader.rs (100%) rename qubed_meteo/{ => qubed_meteo}/examples/read_from_dss_constraints.rs (100%) rename qubed_meteo/{ => qubed_meteo}/examples/read_from_fdb_list.rs (100%) rename qubed_meteo/{ => qubed_meteo}/examples/read_from_mars_list.rs (100%) rename qubed_meteo/{ => qubed_meteo}/src/adapters/dss_constraints.rs (100%) rename qubed_meteo/{ => qubed_meteo}/src/adapters/fdb.rs (100%) rename qubed_meteo/{ => qubed_meteo}/src/adapters/mars_list.rs (100%) rename qubed_meteo/{ => qubed_meteo}/src/adapters/mod.rs (100%) rename qubed_meteo/{ => qubed_meteo}/src/adapters/to_constraints.rs (100%) rename qubed_meteo/{ => qubed_meteo}/src/lib.rs (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3a7ebaf..89cb13bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,11 +45,17 @@ jobs: - name: Install maturin run: uv tool install maturin - - name: Check Rust formatting + - name: Check Rust formatting (qubed workspace) run: cargo fmt -- --check - - name: Run Rust tests - run: cargo test -p qubed qubed_meteo + - name: Check Rust formatting (qubed_meteo workspace) + run: cargo fmt --manifest-path qubed_meteo/Cargo.toml -- --check + + - name: Run Rust tests (qubed workspace) + run: cargo test -p qubed + + - name: Run Rust tests (qubed_meteo workspace) + run: cargo test --manifest-path qubed_meteo/qubed_meteo/Cargo.toml # Build the two Python extension packages that wrap the Rust crates. - name: Build qubed wheel @@ -65,13 +71,15 @@ jobs: - name: Run Python binding tests run: | uv venv .ci-venv - uv pip install --python .ci-venv pytest target/wheels/qubed-*.whl + uv pip install --python .ci-venv pytest target/wheels/qubed-*.whl .ci-venv/bin/python -m pytest -q py_qubed/tests - uv pip install --python .ci-venv pytest py_qubed_meteo/target/wheels/qubed_meteo-*.whl - .ci-venv/bin/python -m pytest -q py_qubed_meteo/tests + uv pip install --python .ci-venv qubed_meteo/target/wheels/qubed_meteo-*.whl + .ci-venv/bin/python -m pytest -q qubed_meteo/py_qubed_meteo/tests - name: Upload wheel artifacts uses: actions/upload-artifact@v4 with: name: wheels-linux - path: target/wheels/*.whl + path: | + target/wheels/*.whl + qubed_meteo/target/wheels/*.whl diff --git a/.github/workflows/publish-crates.yml b/.github/workflows/publish-crates.yml index 69adb02e..a0d98e68 100644 --- a/.github/workflows/publish-crates.yml +++ b/.github/workflows/publish-crates.yml @@ -27,4 +27,4 @@ jobs: - name: Publish qubed_meteo env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - run: cargo publish --manifest-path qubed_meteo/Cargo.toml \ No newline at end of file + run: cargo publish --manifest-path qubed_meteo/qubed_meteo/Cargo.toml \ No newline at end of file diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 60571dc3..80d62514 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -19,6 +19,11 @@ jobs: matrix: target: [x86_64, aarch64] package: [py_qubed, py_qubed_meteo] + include: + - package: py_qubed + manifest_path: py_qubed/Cargo.toml + - package: py_qubed_meteo + manifest_path: qubed_meteo/py_qubed_meteo/Cargo.toml steps: - uses: actions/checkout@v4 @@ -33,7 +38,7 @@ jobs: manylinux: auto args: > --release - --manifest-path ${{ matrix.package }}/Cargo.toml + --manifest-path ${{ matrix.manifest_path }} --out dist - name: Upload wheels diff --git a/Cargo.toml b/Cargo.toml index 16d8a413..29323e56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,5 +8,4 @@ members = [ exclude = [ "qubed_meteo", - "py_qubed_meteo", ] \ No newline at end of file diff --git a/py_qubed/Cargo.toml b/py_qubed/Cargo.toml index 2a52d477..dcc8c982 100644 --- a/py_qubed/Cargo.toml +++ b/py_qubed/Cargo.toml @@ -13,5 +13,3 @@ name = "qubed" path = "src/lib.rs" crate-type = ["cdylib"] -[tool.maturin] -module-name = "qubed" diff --git a/pyproject.toml b/pyproject.toml index b6e7dd76..3c33841a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,6 @@ dependencies = [] [tool.uv.workspace] members = [ "py_qubed", - "py_qubed_meteo", ] # optional shared dev deps diff --git a/qubed_meteo/Cargo.toml b/qubed_meteo/Cargo.toml index 3c2ebf54..a9b44819 100644 --- a/qubed_meteo/Cargo.toml +++ b/qubed_meteo/Cargo.toml @@ -1,30 +1,7 @@ -[package] -name = "qubed_meteo" -version = "0.1.1" -edition = "2024" -description = "Meteorological adapters to the Qubed library." -license = "Apache-2.0" -readme = "../README.md" -repository = "https://github.com/ecmwf/qubed" -homepage = "https://github.com/ecmwf/qubed" -documentation = "https://ecmwf.github.io/qubed/" - [workspace] +resolver = "3" + members = [ + "qubed_meteo", "py_qubed_meteo", ] - -[dependencies] -qubed = { path = "../qubed" } -serde = "1.0.228" -serde_json = "1.0.145" -rsfdb = { git = "https://github.com/ecmwf/rsfdb" , optional = true} - -[features] -default = [] -rsfdb-support = ["dep:rsfdb"] - -[lib] -path = "src/lib.rs" -crate-type = ["rlib"] - diff --git a/qubed_meteo/py_qubed_meteo/pyproject.toml b/qubed_meteo/py_qubed_meteo/pyproject.toml index b30e5322..6a816681 100644 --- a/qubed_meteo/py_qubed_meteo/pyproject.toml +++ b/qubed_meteo/py_qubed_meteo/pyproject.toml @@ -13,10 +13,6 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", ] -[features] -default = [] -rsfdb-support = ["dep:rsfdb"] - [tool.maturin] manifest-path = "Cargo.toml" features = [] diff --git a/qubed_meteo/pyproject.toml b/qubed_meteo/pyproject.toml new file mode 100644 index 00000000..cabe730b --- /dev/null +++ b/qubed_meteo/pyproject.toml @@ -0,0 +1,10 @@ +[tool.uv.workspace] +members = [ + "py_qubed_meteo", +] + +[dependency-groups] +dev = [ + "pytest", + "maturin", +] diff --git a/qubed_meteo/qubed_meteo/Cargo.toml b/qubed_meteo/qubed_meteo/Cargo.toml new file mode 100644 index 00000000..e5c7970a --- /dev/null +++ b/qubed_meteo/qubed_meteo/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "qubed_meteo" +version = "0.1.1" +edition = "2024" +description = "Meteorological adapters to the Qubed library." +license = "Apache-2.0" +repository = "https://github.com/ecmwf/qubed" +homepage = "https://github.com/ecmwf/qubed" +documentation = "https://ecmwf.github.io/qubed/" + +[dependencies] +qubed = { path = "../../qubed", version = "0.1.1" } +serde = "1.0.228" +serde_json = "1.0.145" +rsfdb = { git = "https://github.com/ecmwf/rsfdb", optional = true } + +[features] +default = [] +rsfdb-support = ["dep:rsfdb"] + +[lib] +path = "src/lib.rs" +crate-type = ["rlib"] diff --git a/qubed_meteo/bin/fdb_db_reader.rs b/qubed_meteo/qubed_meteo/bin/fdb_db_reader.rs similarity index 100% rename from qubed_meteo/bin/fdb_db_reader.rs rename to qubed_meteo/qubed_meteo/bin/fdb_db_reader.rs diff --git a/qubed_meteo/examples/read_from_dss_constraints.rs b/qubed_meteo/qubed_meteo/examples/read_from_dss_constraints.rs similarity index 100% rename from qubed_meteo/examples/read_from_dss_constraints.rs rename to qubed_meteo/qubed_meteo/examples/read_from_dss_constraints.rs diff --git a/qubed_meteo/examples/read_from_fdb_list.rs b/qubed_meteo/qubed_meteo/examples/read_from_fdb_list.rs similarity index 100% rename from qubed_meteo/examples/read_from_fdb_list.rs rename to qubed_meteo/qubed_meteo/examples/read_from_fdb_list.rs diff --git a/qubed_meteo/examples/read_from_mars_list.rs b/qubed_meteo/qubed_meteo/examples/read_from_mars_list.rs similarity index 100% rename from qubed_meteo/examples/read_from_mars_list.rs rename to qubed_meteo/qubed_meteo/examples/read_from_mars_list.rs diff --git a/qubed_meteo/src/adapters/dss_constraints.rs b/qubed_meteo/qubed_meteo/src/adapters/dss_constraints.rs similarity index 100% rename from qubed_meteo/src/adapters/dss_constraints.rs rename to qubed_meteo/qubed_meteo/src/adapters/dss_constraints.rs diff --git a/qubed_meteo/src/adapters/fdb.rs b/qubed_meteo/qubed_meteo/src/adapters/fdb.rs similarity index 100% rename from qubed_meteo/src/adapters/fdb.rs rename to qubed_meteo/qubed_meteo/src/adapters/fdb.rs diff --git a/qubed_meteo/src/adapters/mars_list.rs b/qubed_meteo/qubed_meteo/src/adapters/mars_list.rs similarity index 100% rename from qubed_meteo/src/adapters/mars_list.rs rename to qubed_meteo/qubed_meteo/src/adapters/mars_list.rs diff --git a/qubed_meteo/src/adapters/mod.rs b/qubed_meteo/qubed_meteo/src/adapters/mod.rs similarity index 100% rename from qubed_meteo/src/adapters/mod.rs rename to qubed_meteo/qubed_meteo/src/adapters/mod.rs diff --git a/qubed_meteo/src/adapters/to_constraints.rs b/qubed_meteo/qubed_meteo/src/adapters/to_constraints.rs similarity index 100% rename from qubed_meteo/src/adapters/to_constraints.rs rename to qubed_meteo/qubed_meteo/src/adapters/to_constraints.rs diff --git a/qubed_meteo/src/lib.rs b/qubed_meteo/qubed_meteo/src/lib.rs similarity index 100% rename from qubed_meteo/src/lib.rs rename to qubed_meteo/qubed_meteo/src/lib.rs From dd6902e4a470000377aaca065e3d399f471b4929 Mon Sep 17 00:00:00 2001 From: mathleur Date: Fri, 19 Jun 2026 15:05:19 +0200 Subject: [PATCH 6/8] fix CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89cb13bb..61b5df2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: run: cargo fmt -- --check - name: Check Rust formatting (qubed_meteo workspace) - run: cargo fmt --manifest-path qubed_meteo/Cargo.toml -- --check + run: cargo fmt --manifest-path qubed_meteo/qubed_meteo/Cargo.toml -- --check - name: Run Rust tests (qubed workspace) run: cargo test -p qubed From b8628814581092ce0b747d9924a7b7089a084785 Mon Sep 17 00:00:00 2001 From: mathleur Date: Fri, 19 Jun 2026 15:39:38 +0200 Subject: [PATCH 7/8] fix CI --- qubed_meteo/qubed_meteo/Cargo.toml | 9 +++++++-- qubed_meteo/qubed_meteo/src/adapters/mod.rs | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/qubed_meteo/qubed_meteo/Cargo.toml b/qubed_meteo/qubed_meteo/Cargo.toml index e5c7970a..a1f465f3 100644 --- a/qubed_meteo/qubed_meteo/Cargo.toml +++ b/qubed_meteo/qubed_meteo/Cargo.toml @@ -12,11 +12,16 @@ documentation = "https://ecmwf.github.io/qubed/" qubed = { path = "../../qubed", version = "0.1.1" } serde = "1.0.228" serde_json = "1.0.145" -rsfdb = { git = "https://github.com/ecmwf/rsfdb", optional = true } [features] default = [] -rsfdb-support = ["dep:rsfdb"] +# Enable FDB (Fields DataBase) support via rsfdb. +# When enabling this feature you must also add rsfdb to your own workspace +# dependencies, e.g.: +# rsfdb = { git = "https://github.com/ecmwf/rsfdb" } +# rsfdb is intentionally not declared here so Cargo does not attempt to +# fetch the private git repository during normal CI builds. +rsfdb-support = [] [lib] path = "src/lib.rs" diff --git a/qubed_meteo/qubed_meteo/src/adapters/mod.rs b/qubed_meteo/qubed_meteo/src/adapters/mod.rs index 1038e331..b860c0bc 100644 --- a/qubed_meteo/qubed_meteo/src/adapters/mod.rs +++ b/qubed_meteo/qubed_meteo/src/adapters/mod.rs @@ -1,4 +1,5 @@ pub mod dss_constraints; +#[cfg(feature = "rsfdb-support")] pub mod fdb; pub mod mars_list; pub mod to_constraints; From 2f199f9d8792e6b29d6ac05be996cad3a9cea1f6 Mon Sep 17 00:00:00 2001 From: mathleur Date: Fri, 19 Jun 2026 15:58:10 +0200 Subject: [PATCH 8/8] fix CI --- qubed_meteo/qubed_meteo/Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qubed_meteo/qubed_meteo/Cargo.toml b/qubed_meteo/qubed_meteo/Cargo.toml index a1f465f3..3513bb02 100644 --- a/qubed_meteo/qubed_meteo/Cargo.toml +++ b/qubed_meteo/qubed_meteo/Cargo.toml @@ -26,3 +26,8 @@ rsfdb-support = [] [lib] path = "src/lib.rs" crate-type = ["rlib"] + +[[example]] +name = "read_from_fdb_list" +required-features = ["rsfdb-support"] +