fix(ci): schema test counts + notebooks build context
Some checks failed
CI / skinny-install (aco) (push) Successful in 1m8s
CI / skinny-install (api) (push) Successful in 32s
CI / skinny-install (bcda) (push) Successful in 32s
CI / skinny-install (bib) (push) Successful in 38s
CI / skinny-install (conf) (push) Successful in 37s
CI / skinny-install (opps) (push) Successful in 39s
CI / skinny-install (perf) (push) Successful in 37s
CI / skinny-install (pfs) (push) Successful in 33s
CI / skinny-install (bls) (push) Successful in 27s
CI / skinny-install (ccw) (push) Successful in 33s
CI / skinny-install (cli) (push) Successful in 39s
CI / skinny-install (cms) (push) Successful in 36s
CI / skinny-install (rex) (push) Successful in 36s
CI / lint-test (push) Failing after 12m24s
Deploy / build-scan-report (push) Successful in 13m45s
Some checks failed
CI / skinny-install (aco) (push) Successful in 1m8s
CI / skinny-install (api) (push) Successful in 32s
CI / skinny-install (bcda) (push) Successful in 32s
CI / skinny-install (bib) (push) Successful in 38s
CI / skinny-install (conf) (push) Successful in 37s
CI / skinny-install (opps) (push) Successful in 39s
CI / skinny-install (perf) (push) Successful in 37s
CI / skinny-install (pfs) (push) Successful in 33s
CI / skinny-install (bls) (push) Successful in 27s
CI / skinny-install (ccw) (push) Successful in 33s
CI / skinny-install (cli) (push) Successful in 39s
CI / skinny-install (cms) (push) Successful in 36s
CI / skinny-install (rex) (push) Successful in 36s
CI / lint-test (push) Failing after 12m24s
Deploy / build-scan-report (push) Successful in 13m45s
- tests/zot/test_schema.py: update hardcoded counts (itemTypes 36→40, fields 104→123, creatorTypes 29→37, itemTypeFields 582→770, baseFieldMappings 54→72) and field IDs (publicationTitle 12→41) to match the Zotero 7 schema dump. - deploy.yml + infra-ci.yml: change notebooks build context from `notebooks/` to `.` — the Dockerfile COPYs `infra/marimo/theme` which lives outside the notebooks dir and was invisible with the narrow context.
This commit is contained in:
@@ -34,7 +34,7 @@ jobs:
|
||||
run: echo "SHORT_SHA=$(echo $GITHUB_SHA | head -c 8)" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build notebooks
|
||||
run: docker build -f infra/images/notebooks.Dockerfile -t local/notebooks:build notebooks/
|
||||
run: docker build -f infra/images/notebooks.Dockerfile -t local/notebooks:build .
|
||||
|
||||
- name: Push notebooks
|
||||
run: |
|
||||
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
|
||||
|
||||
- name: Build notebooks
|
||||
run: docker build -f infra/images/notebooks.Dockerfile -t local/notebooks:build notebooks/
|
||||
run: docker build -f infra/images/notebooks.Dockerfile -t local/notebooks:build .
|
||||
|
||||
- name: File failure issue
|
||||
if: failure()
|
||||
|
||||
@@ -34,27 +34,27 @@ class TestCreateDb:
|
||||
def test_item_types_seeded(self):
|
||||
con = create_db()
|
||||
count = con.execute("SELECT count(*) FROM itemTypes").fetchone()[0]
|
||||
assert count == 36
|
||||
assert count == 40
|
||||
|
||||
def test_fields_seeded(self):
|
||||
con = create_db()
|
||||
count = con.execute("SELECT count(*) FROM fields").fetchone()[0]
|
||||
assert count == 104
|
||||
assert count == 123
|
||||
|
||||
def test_creator_types_seeded(self):
|
||||
con = create_db()
|
||||
count = con.execute("SELECT count(*) FROM creatorTypes").fetchone()[0]
|
||||
assert count == 29
|
||||
assert count == 37
|
||||
|
||||
def test_item_type_fields_seeded(self):
|
||||
con = create_db()
|
||||
count = con.execute("SELECT count(*) FROM itemTypeFields").fetchone()[0]
|
||||
assert count == 582
|
||||
assert count == 770
|
||||
|
||||
def test_base_field_mappings_seeded(self):
|
||||
con = create_db()
|
||||
count = con.execute("SELECT count(*) FROM baseFieldMappings").fetchone()[0]
|
||||
assert count == 54
|
||||
assert count == 72
|
||||
|
||||
def test_library_exists(self):
|
||||
con = create_db()
|
||||
@@ -119,14 +119,15 @@ class TestCreateDb:
|
||||
with Db(p) as db:
|
||||
# statute type — set a field that's NOT valid for statute
|
||||
item_id = db.create_item(TYPE_MAP["statute"])
|
||||
# publicationTitle (12) is not valid for statute (20)
|
||||
# publicationTitle (41) is not valid for statute (36)
|
||||
pub_field_id = FIELD_MAP["publicationTitle"]
|
||||
db.con.execute("INSERT INTO itemDataValues (value) VALUES ('Bad Journal')")
|
||||
vid = db.con.execute(
|
||||
"SELECT valueID FROM itemDataValues WHERE value = 'Bad Journal'"
|
||||
).fetchone()[0]
|
||||
db.con.execute(
|
||||
"INSERT INTO itemData (itemID, fieldID, valueID) VALUES (?, 12, ?)",
|
||||
(item_id, vid),
|
||||
"INSERT INTO itemData (itemID, fieldID, valueID) VALUES (?, ?, ?)",
|
||||
(item_id, pub_field_id, vid),
|
||||
)
|
||||
issues = db.validate_item(item_id)
|
||||
assert len(issues) == 1
|
||||
|
||||
Reference in New Issue
Block a user