Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/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
Expand All @@ -59,19 +65,21 @@ jobs:
working-directory: qubed_meteo
run: |
uv tool run maturin build \
-m ../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
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
2 changes: 1 addition & 1 deletion .github/workflows/publish-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
run: cargo publish --manifest-path qubed_meteo/qubed_meteo/Cargo.toml
7 changes: 6 additions & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ members = [

exclude = [
"qubed_meteo",
"py_qubed_meteo",
]
2 changes: 0 additions & 2 deletions py_qubed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ name = "qubed"
path = "src/lib.rs"
crate-type = ["cdylib"]

[tool.maturin]
module-name = "qubed"
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies = []
[tool.uv.workspace]
members = [
"py_qubed",
"py_qubed_meteo",
]

# optional shared dev deps
Expand Down
31 changes: 4 additions & 27 deletions qubed_meteo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 = [
"../py_qubed_meteo",
"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"]

Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
]

[features]
default = []
rsfdb-support = ["dep:rsfdb"]

[tool.maturin]
manifest-path = "Cargo.toml"
features = []
File renamed without changes.
10 changes: 10 additions & 0 deletions qubed_meteo/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[tool.uv.workspace]
members = [
"py_qubed_meteo",
]

[dependency-groups]
dev = [
"pytest",
"maturin",
]
33 changes: 33 additions & 0 deletions qubed_meteo/qubed_meteo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[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"

[features]
default = []
# 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"
crate-type = ["rlib"]

[[example]]
name = "read_from_fdb_list"
required-features = ["rsfdb-support"]

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub mod dss_constraints;
#[cfg(feature = "rsfdb-support")]
pub mod fdb;
pub mod mars_list;
pub mod to_constraints;
File renamed without changes.
Loading