Skip to content

Add SBOL export regression tests - #1

Merged
Gonza10V merged 3 commits into
masterfrom
codex/add-tests-for-genetic-network-creation-and-export
Jun 30, 2026
Merged

Gonza10V merged 3 commits into
masterfrom
codex/add-tests-for-genetic-network-creation-and-export

Conversation

@Gonza10V

Copy link
Copy Markdown

Motivation

  • Ensure SBOL3 export functionality continues to work for common LOICA constructs and detect regressions in generation/serialization of SBOL documents.
  • Validate end-to-end export for a representative set of genetic networks including Source, Hill1 (buffer and NOT), Receiver, Hill2 (NOR), and a 3-node repressilator.

Description

  • Added a new test module tests/test_sbol_export.py that builds networks from Regulator, Reporter, Supplement, Source, Hill1, Hill2, and Receiver and exercises GeneticNetwork.to_sbol().
  • Introduced test helpers: an autouse fixture to set an SBOL namespace with sbol3.set_namespace, dna_part() to create DNA Components, convenience constructors regulator(), reporter(), and supplement(), and assert_exports_to_sbol() to validate the produced sbol3.Document and serialized output file.
  • Added tests for an empty network, a source, Hill1 buffer, Hill1 NOT, receiver (chemical input), Hill2 NOR, and a repressilator network that assert the document is produced, contains a top-level geneticnetwork, and can be written to sorted N-Triples.
  • Tests rely on the existing loica API and sbol3 for serialization and inspect the document object counts as a basic sanity check.

Testing

  • Ran python -m py_compile tests/test_sbol_export.py to validate the test file compiles successfully (passed).
  • Ran pytest -q to execute the new tests and existing suite, resulting in all tests passing (7 passed).

Codex Task

@Gonza10V
Gonza10V merged commit 27eb18e into master Jun 30, 2026
4 checks passed
@Gonza10V
Gonza10V deleted the codex/add-tests-for-genetic-network-creation-and-export branch June 30, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant