Skip to content

Commit

Permalink
Revert "feat: Initial implementation of tool/dataset version check"
Browse files Browse the repository at this point in the history
This reverts commit ef9b405.
  • Loading branch information
GeorgeFI committed Oct 22, 2023
1 parent ef9b405 commit ecc28f7
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/sec_certs/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from typing import Any, Generic, Iterator, TypeVar, cast

import pandas as pd
from setuptools_scm import get_version

from sec_certs import constants
from sec_certs.configuration import config
Expand Down Expand Up @@ -51,7 +50,6 @@ class Dataset(Generic[CertSubType, AuxiliaryDatasetsSubType], ComplexSerializabl

@dataclass
class DatasetInternalState(ComplexSerializableType):
sec_certs_version: str = get_version(root="..", local_scheme="no-local-version")
meta_sources_parsed: bool = False
artifacts_downloaded: bool = False
pdfs_converted: bool = False
Expand Down Expand Up @@ -206,12 +204,6 @@ def from_dict(cls: type[DatasetSubType], dct: dict) -> DatasetSubType:
@classmethod
def from_json(cls: type[DatasetSubType], input_path: str | Path, is_compressed: bool = False) -> DatasetSubType:
dset = cast("DatasetSubType", ComplexSerializableType.from_json(input_path, is_compressed))
dset_version = dset.state.sec_certs_version
tool_version = get_version(root="..", local_scheme="no-local-version")

if dset_version != tool_version:
logger.warning(f"Dataset version: {dset_version} does not match current version of tool: {tool_version}!")

dset._root_dir = Path(input_path).parent.absolute()
dset._set_local_paths()
return dset
Expand Down

0 comments on commit ecc28f7

Please sign in to comment.