Skip to content

Conversation

@JR-1991
Copy link
Member

@JR-1991 JR-1991 commented Jul 18, 2025

This pull request introduces multiple changes across the codebase, focusing on dependency updates, improved formatting, new functionality for handling COMBINE archives, and expanded test coverage. Key updates include the addition of test modules for annotations, the introduction of a CombineArchiveError enum for better error handling, and the inclusion of new dependencies for enhanced functionality.

Dependency Updates:

  • Updated quick-xml to version 0.38.0 and added zip version 4.0.0 as a new dependency in Cargo.toml. Added tempfile version 3.20.0 to dev-dependencies. [1] [2]

Formatting Improvements:

  • Replaced format! calls with inline formatting syntax (e.g., format!("{metadata}")) in build.rs and various test files to improve code readability. [1] [2] [3] [4] [5] [6] [7] [8] [9]

New Features:

  • Added support for saving SBML documents in COMBINE archives, including methods for adding entries and saving archives in examples/create.rs.
  • Introduced CombineArchiveError enum for detailed error handling when working with COMBINE archives.

Test Coverage:

  • Added test modules for annotations in various collection files (compartments.rs, parameters.rs, reactions.rs, rules.rs, species.rs, unitdefs.rs) to validate serialization and deserialization of annotations. [1] [2] [3] [4] [5] [6]

Codebase Organization:

  • Added a new combine module in src/lib.rs to centralize COMBINE-related functionality.
  • Introduced a get_unit_definition! macro in localparameter.rs to retrieve unit definitions for local parameters.

JR-1991 added 24 commits May 29, 2025 16:07
Windows doing its best to be the biggest headache at cross-platform development again ☕️
Enhanced the Wrapper struct to support custom deserialization logic that iterates through all child elements in an annotation and attempts to deserialize each into the target type, using the first successful match. Added a new test to verify complex annotation deserialization and updated documentation for clarity.
Updated the quick-xml dependency from 0.37.2 to 0.38.0 in Cargo.toml to keep dependencies up to date and benefit from the latest fixes and features.
Replaces instances of format!(...) and println!(...) with inline string interpolation (e.g., println!("{var}")). This modernizes the codebase for improved readability and consistency, without changing functionality.
Introduces methods to retrieve, add, and remove XML namespaces in SBMLDocument, enabling better handling of SBML package extension namespaces. Includes corresponding unit tests for these new methods.
Added #[allow(clippy::mut_from_ref)] to the base() method in the SBase trait to suppress Clippy lint warning. This is necessary due to the method's signature returning a mutable reference from an immutable one, which is required for interoperability with C++ code.
@JR-1991 JR-1991 self-assigned this Jul 18, 2025
@JR-1991 JR-1991 added the enhancement New feature or request label Jul 18, 2025
@JR-1991 JR-1991 added this to EnzymeML Jul 18, 2025
@JR-1991 JR-1991 merged commit bc64f9c into master Jul 18, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this to Done in EnzymeML Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants