Files
speckle-embodied-carbon-cal…/src/applications/revit/revit_source_validator.py
T
2025-02-10 09:25:51 +01:00

13 lines
620 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from src.core.base.source_validator import SourceApplicationValidator
class RevitSourceValidator(SourceApplicationValidator):
"""Validates that the source application is Revit"""
# ️ sourceApplication value for v2: AppName + Version => Revit2024, Revit2023 etc.
# ️ sourceApplication value for v3: slug => revit
# ⚠️ We're just working with v3 data - adapt commit_processor for v2 data structure if you want
# ⚠️ Alternatively, write a model factory that injects the correct CommitProcessor()
def validate(self, source_app: str) -> bool:
return source_app == "revit"