-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: establish SPASE conversion strategy (#213)
Establish a new conversion strategy for the SPASE metadata standard, laying the groundwork for future development. This includes: - Connecting metadata to the test suite - Updating relevant utility functions - Modifying test fixtures - Temporarily skipping tests for undeveloped conversion methods
- Loading branch information
Showing
6 changed files
with
78 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"@context": {"@vocab": "https://schema.org/"}, "@type": "Dataset"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"""Test additional SPASE module functions and methods.""" | ||
|
||
from lxml import etree | ||
from soso.strategies.spase import get_schema_version | ||
from soso.utilities import get_empty_metadata_file_path, get_example_metadata_file_path | ||
|
||
|
||
def test_get_schema_version_returns_expected_value(): | ||
"""Test that the get_schema_version function returns the expected value.""" | ||
|
||
# Positive case: The function will return the schema version of the EML | ||
# file. | ||
spase = etree.parse(get_example_metadata_file_path("SPASE")) | ||
assert get_schema_version(spase) == "2.5.0" | ||
|
||
# Negative case: If the schema version is not present, the function will | ||
# return None. | ||
spase = etree.parse(get_empty_metadata_file_path("SPASE")) | ||
assert get_schema_version(spase) is None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters