Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwood committed Feb 14, 2024
1 parent 91e091e commit 4fef491
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
13 changes: 4 additions & 9 deletions lib360dataquality/cove/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Schema360(SchemaJsonMixin):
codelists = config["codelists_host"]
schema_name = config["schema_item_name"]
pkg_schema_name = config["schema_name"]
pkg_schema_url = "" # required by libcove but not in use
schema_host = "" # required by libcove but not in use
extended = False # required by libcove but not in use
pkg_schema_url = "" # required by libcove but not in use
schema_host = "" # required by libcove but not in use
extended = False # required by libcove but not in use
extension_codelist_urls = []

_pkg_schema_obj = {}
Expand All @@ -33,7 +33,7 @@ class Schema360(SchemaJsonMixin):
def __init__(self, working_dir) -> None:
self.working_dir = working_dir

self.schema_host = self.working_dir # required by lib-cove
self.schema_host = self.working_dir # required by lib-cove

schema_url = urljoin(config["schema_host"], self.schema_name)
pkg_schema_url = urljoin(config["schema_host"], self.pkg_schema_name)
Expand All @@ -52,7 +52,6 @@ def __init__(self, working_dir) -> None:

super().__init__()


@property
def schema_file(self):
return os.path.join(self.working_dir, self.schema_name)
Expand Down Expand Up @@ -84,10 +83,6 @@ def process_codelists(self):
self, use_extensions=False
)

import pdb
pdb.set_trace()


extension_unique_files = frozenset(
url.split("/")[-1] for url in self.extension_codelist_urls
)
Expand Down
2 changes: 1 addition & 1 deletion lib360dataquality/cove/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
'hashcomments': True,
"flatten_tool": {
"disable_local_refs": False,
}, # TODO Should we toggle this based on extension being applied?
},
}
3 changes: 1 addition & 2 deletions tools/cove_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@
)
from lib360dataquality.cove.settings import COVE_CONFIG
from lib360dataquality.cove.schema import Schema360
from lib360dataquality.extensions import resolve_extension

from libcove.lib.converters import convert_spreadsheet
from libcove.config import LibCoveConfig


def main():
parser = argparse.ArgumentParser(
description="Check the data quality of some 360Giving standard data"
description="Check the data quality of some 360Giving standard data. This tool currently doesn't support extensions."
)
parser.add_argument("file_path", type=str, nargs=1, help="File for checking")
parser.add_argument(
Expand Down

0 comments on commit 4fef491

Please sign in to comment.