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

Rename file containing parsing code for survey_display #24

Open
ryantanaka opened this issue May 18, 2018 · 1 comment
Open

Rename file containing parsing code for survey_display #24

ryantanaka opened this issue May 18, 2018 · 1 comment
Assignees

Comments

@ryantanaka
Copy link
Contributor

Change this file to be named survey_display.py to be consistent with our name changes from occquse to survey_display.

Currently checking the code to see that such a change won't break the program assuming that the config.toml for survey_display is modified appropriately.

@ryantanaka
Copy link
Contributor Author

Note:

/var/local/csbcd-configs/scrape-util-projects/survey_display/config.toml has this line:
parser = "occupant-query", however the python file it is referring to is /usr/local/lib/scrape-util/src/acquire/parsers/occupant_query.py when scrape-util runs. This is because the following function is called:

#!/usr/bin/env python3
from importlib import import_module
# miscellaneous utilities for common
# operations, eg; importing modules.
def get_module(modname):
fmt = lambda m: m.lower().replace('-','_')
mod = import_module(fmt(modname))
return mod

by the call of this function:

parser = get_parser(name) # load specified parser.

here:

mod = pu.get_module(modname)

I don't really understand why this was done this way, but I'll test it to make sure that when I use parser = survey-display in the config.toml, occupant_query.py should be renamed survey_display.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant