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
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"jobs": {
"release": {
"runs-on": "ubuntu-latest",
"env": {
"CARGO_REGISTRY_TOKEN": "${{ secrets.CARGO_REGISTRY_TOKEN }}"
},
"environment": "release",
"steps": [
{
"uses": "actions/checkout@v4"
Expand Down Expand Up @@ -152,10 +150,18 @@
"name": "Test",
"run": "cargo test --all-features"
},
{
"name": "Auth with crates.io",
"uses": "rust-lang/crates-io-auth-action@v1",
"id": "auth"
},
{
"name": "Publish to crates.io",
"working-directory": "marrow",
"run": "cargo publish"
"run": "cargo publish",
"env": {
"CARGO_REGISTRY_TOKEN": "${{ steps.auth.outputs.token }}"
}
}
]
}
Expand Down
1 change: 1 addition & 0 deletions marrow/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use crate::{
};

// assert that the `Array` implements the expected traits
#[allow(unused)]
const _: () = {
trait AssertExpectedTraits: Clone + std::fmt::Debug + PartialEq + Send + Sync {}
impl AssertExpectedTraits for Array {}
Expand Down
2 changes: 2 additions & 0 deletions marrow/src/datatypes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ use std::collections::HashMap;
use crate::error::{fail, ErrorKind, MarrowError, Result};

// assert that the `DataType` implements the expected traits
#[allow(unused)]
const _: () = {
trait AssertExpectedTraits: Clone + std::fmt::Debug + PartialEq + Send + Sync {}
impl AssertExpectedTraits for DataType {}
};

// assert that the `Field`, `FieldMeta`, etc. implement the expected traits
#[allow(unused)]
const _: () = {
trait AssertExpectedTraits: Clone + std::fmt::Debug + Default + PartialEq + Send + Sync {}
impl AssertExpectedTraits for Field {}
Expand Down
1 change: 1 addition & 0 deletions marrow/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use crate::{
};

// assert that the `Array` implements the expected traits
#[allow(unused)]
const _: () = {
trait AssertExpectedTraits: Clone + std::fmt::Debug + PartialEq + Send + Sync {}
impl AssertExpectedTraits for View<'_> {}
Expand Down
20 changes: 15 additions & 5 deletions x.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# /// script
# requires-python = ">=3.11"
# dependencies = []
# ///
self_path = __import__("pathlib").Path(__file__).parent.resolve()
python = __import__("shlex").quote(__import__("sys").executable)

Expand Down Expand Up @@ -69,16 +73,22 @@
"jobs": {
"release": {
"runs-on": "ubuntu-latest",
"env": {
"CARGO_REGISTRY_TOKEN": "${{ secrets.CARGO_REGISTRY_TOKEN }}",
},
"environment": "release",
"steps": [
{"uses": "actions/checkout@v4"},
*_workflow_check_steps(),
{
"name": "Auth with crates.io",
"uses": "rust-lang/crates-io-auth-action@v1",
"id": "auth",
},
{
"name": "Publish to crates.io",
"working-directory": "marrow",
"run": "cargo publish",
"env": {
"CARGO_REGISTRY_TOKEN": "${{ steps.auth.outputs.token }}",
},
},
],
}
Expand Down Expand Up @@ -212,11 +222,11 @@ def doc(private=False, open=False):

@cmd()
def check_cargo_toml():
import tomli
import tomllib

print(":: check Cargo.toml")
with open(self_path / "marrow" / "Cargo.toml", "rb") as fobj:
config = tomli.load(fobj)
config = tomllib.load(fobj)

for label, features in [
(
Expand Down