-
Notifications
You must be signed in to change notification settings - Fork 23
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
Addition of Python function call 'scrape' #70
base: main
Are you sure you want to change the base?
Conversation
…from another Python script and returning the JSON output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stuchalk - this looks good overall.. Do you think this would be good to adapt the main script to use this method as well? Just for consistency?
f = open(configfile) | ||
config_json = json.load(f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f = open(configfile) | |
config_json = json.load(f) | |
with open(configfile) as fp: | |
config_json = json.load(fp) |
# process | ||
code_json = code_gov.process_config(config_json) | ||
code_gov.force_attributes(code_json, config_json) | ||
logger.info("Number of Projects: %s", len(code_json["releases"])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this logger call should move in to code_gov.process_config(...)
so that the message happens at the time the objects are parsed? Thoughts?
Addition of Python a bare bones function call 'scrape' (functions.py file) for processing config file from another Python script and returning the JSON output.