Skip to content

ci: the wheel check reads the model's connection by its current name - #9

Closed
VladislavYar wants to merge 4 commits into
mainfrom
dev
Closed

VladislavYar wants to merge 4 commits into
mainfrom
dev

Conversation

@VladislavYar

Copy link
Copy Markdown
Contributor

Brings #8 into main for the 0.9.0 release: check_wheel.py read the model's client through MetaInfo.db, which hare doesn't have, so every wheel check of the release failed.

The whole code base, documentation and test suite of hare-orm as of its earlier private
development, prepared for the first public release, 0.9.0 - see CHANGELOG.md.

Benchmark results for 0.9.0 are included. benchmarks/bench.py writes every text about the
benchmark from its results and its own settings - the docs benchmark pages, the Benchmarks section
of both READMEs and the scenario and method lists of benchmarks/README - so a run updates all of
them. Each chart has its own background, and the docs pages use the GitHub light/dark image
fragments, which Material also understands.

Signed-off-by: Vladislav Yaremenko <vlad.yaremenko.98@yandex.ru>
…t in make check (#3)

The strict documentation build refused eight lines of the 0.9.0 docs - a hyphen written for a dash
and lines past 110 characters - and only the deploy on a push to dev built the docs, so neither a
pull request nor make check caught it. make _check (and so the check job of every CI run) now
builds the documentation in strict mode too.

Signed-off-by: Vladislav Yaremenko <vlad.yaremenko.98@yandex.ru>
…onger committed (#4)

deploy-docs published on a push to dev, which the github-pages environment doesn't deploy from - main
is the default branch and holds the released code. commit-native-binary committed the nine compiled
rust.native files back to dev and main: the branches are protected now, so the push is refused, and
the Rust build isn't byte-reproducible, so every push would commit them again (some 60 MB a time).
The test jobs and the release wheels build rust.native from the commit themselves; a checkout builds
it with make build_native. The files are untracked and ignored.

Signed-off-by: Vladislav Yaremenko <vlad.yaremenko.98@yandex.ru>
)

check_wheel.py read the client of its model through MetaInfo.db, an attribute hare doesn't have - it
is MetaInfo.connection - so every wheel check of the release failed after installing the wheel, and
nothing could be published.

Signed-off-by: Vladislav Yaremenko <vlad.yaremenko.98@yandex.ru>
@VladislavYar

Copy link
Copy Markdown
Contributor Author

Replaced by a PR from a branch of main: dev and main share no history after the squash merges, so dev into main conflicts.

Value::Array(items) => Shape::Nested(items.iter().map(to_shape).collect()),
Value::Int(number) => Shape::Leaf(Some(*number)),
Value::Null => Shape::Leaf(None),
other => panic!("unexpected leaf variant in this test: {other:?}"),
let decoded = decode_value(&Type::INT4_ARRAY, &raw, &mut ServerTextForms::collecting()).expect("must decode");
match decoded {
Value::Array(items) => assert!(items.is_empty()),
other => panic!("expected an empty Value::Array, got {other:?}"),
let negative = i64::MIN.to_be_bytes();
match decode(&Type::TIMESTAMPTZ, &positive) {
Value::TimestampTz(value) => assert_eq!(value.naive_utc(), python_max_datetime()),
other => panic!("unexpected {other:?}"),
}
match decode(&Type::TIMESTAMP, &negative) {
Value::Timestamp(value) => assert_eq!(value, python_min_datetime()),
other => panic!("unexpected {other:?}"),
}
match decode(&Type::DATE, &i32::MAX.to_be_bytes()) {
Value::Date(value) => assert_eq!(value, python_max_date()),
other => panic!("unexpected {other:?}"),
raw.extend_from_slice(&100i32.to_be_bytes());
raw.extend_from_slice(&[0x00, 0x00]);
let result = decode_range(&Type::INT4_RANGE, &raw, &mut ServerTextForms::collecting());
assert!(result.is_err(), "expected Err when the claimed length exceeds the remaining bytes, got {result:?}");
let mut raw = vec![RANGE_LB_INC];
raw.extend_from_slice(&(-1i32).to_be_bytes());
let result = decode_range(&Type::INT4_RANGE, &raw, &mut ServerTextForms::collecting());
assert!(result.is_err(), "expected Err for a negative length prefix, got {result:?}");
matches!(&items[..], [Value::Range(range)] if matches!(range.lower.as_deref(), Some(Value::Int(1))))
);
}
other => panic!("unexpected {other:?}"),
encode_multirange(&[range(1, 3), range(5, 7)], &Type::INT4MULTI_RANGE, &mut out).expect("must encode");
match decode(&Type::INT4MULTI_RANGE, &out) {
Value::Array(items) => assert_eq!(items.len(), 2),
other => panic!("unexpected {other:?}"),
raw.extend_from_slice(&(-1i32).to_be_bytes());
match decode(&Type::RECORD, &raw) {
Value::Composite(items) => assert!(matches!(items[..], [Value::Int(1), Value::Null])),
other => panic!("unexpected {other:?}"),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants