feat!: generalize script by removing organizational metadata
All checks were successful
Test pipeline / test (push) Successful in 14s
All checks were successful
Test pipeline / test (push) Successful in 14s
Remove Phase class, organizational metadata blocks, and unused project fields. Update configuration to use 'default_grants' and simplify PI usage to fallback corresponding author determination only. BREAKING CHANGES: - Remove 'phase' and 'project' fields from configuration - Use 'default_grants' instead of 'default_grant' - Generate only standard Dataverse citation metadata
This commit is contained in:
parent
01bc537bd8
commit
67b46d5140
11 changed files with 207 additions and 269 deletions
|
@ -3,21 +3,9 @@ import sys
|
|||
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
from doi2dataset import NameProcessor, Phase, sanitize_filename, validate_email_address
|
||||
from doi2dataset import NameProcessor, sanitize_filename, validate_email_address
|
||||
|
||||
|
||||
def test_phase_check_year():
|
||||
"""Test that check_year correctly determines if a year is within the phase boundaries."""
|
||||
phase = Phase("TestPhase", 2000, 2010)
|
||||
# Within boundaries
|
||||
assert phase.check_year(2005) is True
|
||||
# Outside boundaries
|
||||
assert phase.check_year(1999) is False
|
||||
assert phase.check_year(2011) is False
|
||||
# Boundary cases
|
||||
assert phase.check_year(2000) is True
|
||||
assert phase.check_year(2010) is True
|
||||
|
||||
def test_sanitize_filename():
|
||||
"""Test the sanitize_filename function to convert DOI to a valid filename."""
|
||||
doi = "10.1234/abc.def"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue