Files
CleverRDFlib/features/version_management.feature
CoreRasurae e828acf175
CI / lint (push) Successful in 1m32s
CI / typecheck (push) Successful in 1m38s
CI / lint (pull_request) Successful in 1m30s
CI / typecheck (pull_request) Successful in 1m30s
CI / behave (3.11) (pull_request) Successful in 1m39s
CI / behave (3.12) (pull_request) Successful in 1m39s
CI / build (pull_request) Successful in 1m29s
CI / behave (3.13) (pull_request) Successful in 1m39s
CI / behave (3.11) (push) Successful in 1m39s
CI / behave (3.12) (push) Successful in 1m41s
CI / behave (3.13) (push) Successful in 1m37s
CI / build (push) Successful in 1m30s
feat: Initial version of CleverRDFLib
ISSUES CLOSED: #1
2025-12-19 22:26:14 +00:00

103 lines
4.5 KiB
Gherkin

Feature: Version Management
As a developer using CleverRDFLib
I want to manage ontology versioning information
So that I can track versions, check compatibility, and manage version relationships
Background:
Given I have a test data directory
Scenario: Extract version information from ontology
Given I have an ontology with version information for management
When I create a VersionManager for the ontology
And I extract version information
Then I should receive an OntologyVersion object
And the version should contain ontology IRI
And the version should contain version IRI when available
And the version should contain version info when available
Scenario: Extract version relationships
Given I have an ontology with version relationships
When I extract version relationships
Then I should receive a list of VersionRelationship objects
And the relationships should include prior versions
And the relationships should include backward compatible versions when available
And the relationships should include incompatible versions when available
Scenario: Check version compatibility
Given I have an ontology with version relationships
When I check compatibility with a backward compatible version
Then I should receive True
When I check compatibility with an incompatible version
Then I should receive False
When I check compatibility with an unknown version
Then I should receive None
Scenario: Get version chain
Given I have an ontology with prior versions
When I get the version chain
Then I should receive a list of version IRIs
And the chain should include prior versions
And the chain should include the current version IRI when available
Scenario: Get all ontology versions
Given I have an ontology with version relationships
When I get all ontology versions
Then I should receive a list of version IRIs
And the list should include related version IRIs
Scenario: Check if ontology has version information
Given I have an ontology with version information for management
When I check if version information exists
Then I should receive True
Given I have an ontology without version information for management
When I check if version information exists
Then I should receive False
Scenario: Extract version from LoadingResult
Given I have a loaded ontology with version information
When I access the version manager from LoadingResult
And I extract version information
Then I should receive an OntologyVersion object
Scenario: Version caching returns same instance
Given I have an ontology with version information for management
When I create a VersionManager for the ontology
And I extract version information twice
Then both extractions should return the same instance
Scenario: Extract version info from versionInfo property when no OWL.Ontology declaration
Given I have an ontology with versionInfo but no OWL.Ontology declaration
When I create a VersionManager for the ontology
And I extract version information
Then I should receive an OntologyVersion object
And the version should contain ontology IRI from versionInfo
Scenario: Extract version info from versionIRI property when no OWL.Ontology declaration
Given I have an ontology with versionIRI but no OWL.Ontology declaration
When I create a VersionManager for the ontology
And I extract version information
Then I should receive an OntologyVersion object
And the version should contain ontology IRI from versionIRI
Scenario: Extract relationships from priorVersion when no OWL.Ontology declaration
Given I have an ontology with priorVersion but no OWL.Ontology declaration
When I create a VersionManager for the ontology
And I extract version relationships
Then I should receive a list of VersionRelationship objects
And the relationships should include prior versions
Scenario: Access OntologyVersion __repr__
Given I have an ontology with version information for management
When I create a VersionManager for the ontology
And I extract version information
When I call __repr__ on the version object
Then I should receive a string representation
Scenario: Access VersionRelationship __repr__
Given I have an ontology with version relationships
When I create a VersionManager for the ontology
And I extract version relationships
When I call __repr__ on a relationship object
Then I should receive a string representation