Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAINTENANCE] Saved output of usage stats schema script in repo #5053

Merged
merged 4 commits into from May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 21 additions & 2 deletions great_expectations/core/usage_statistics/schemas.py
Expand Up @@ -1189,8 +1189,27 @@
],
}

if __name__ == "__main__":

def write_schema_to_file(target_dir: str) -> None:
"""Utility to write schema to disk.

The file name will always be "usage_statistics_record_schema.json" but the target directory can be specified.

Args:
target_dir (str): The dir you wish to write the schema to.
"""
import json
import os

file: str = "usage_statistics_record_schema.json"
out: str = os.path.join(target_dir, file)

with open("usage_statistics_record_schema.json", "w") as outfile:
with open(out, "w") as outfile:
json.dump(anonymized_usage_statistics_record_schema, outfile, indent=2)


if __name__ == "__main__":
import sys

target_dir = sys.argv[1] if len(sys.argv) >= 2 else "."
write_schema_to_file(target_dir)