glam/fix_financial_statement_precise.py
kempersc f7bf1cc5ae Refactor schema slots and classes
- Deleted obsolete slot definitions: statement_summary, statement_text, statement_type, status_name, supersede_articles, supersede_condition, supersede_name, temporal_dynamics, total_amount, typical_contents, use_cases, was_acquired_through, was_fetched_at, was_retrieved_at.
- Updated existing slot definitions for states_or_stated to enhance clarity and structure.
- Introduced new classes: Article, ConditionofAccess, FinancialStatementType, MaximumQuantity, Series, Summary, Type, and their respective slots to improve schema organization and usability.
- Added new slots: changes_or_changed_through, has_or_had_condition_of_access, has_or_had_heritage_type, is_or_was_part_of_series, is_or_was_retrieved_at, maximum_of_maximum to capture additional metadata and relationships.
2026-01-30 00:29:31 +01:00

26 lines
800 B
Python

import os
filepath = 'schemas/20251121/linkml/modules/classes/FinancialStatement.yaml'
with open(filepath, 'r') as f:
lines = f.readlines()
new_lines = []
for i, line in enumerate(lines):
# Locate the specific misplaced line
# It was (8 spaces) under (6 spaces).
# It should be (6 spaces) as a sibling slot_usage.
# BUT wait, the previous inspection showed followed by .
# That suggests it was an EXAMPLE inside slot_usage? No, slot_usage defines constraints.
# examples are under key.
# If was under in , it's invalid unless it's a property of that slot (it isn't).
# If it was an example, it should be under .
# Let's look at the file content again (after revert).
pass
# We need to read it first to know what to fix.