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

Standalone function to generate a policy report without configuring a study region #462

Open
carlhiggs opened this issue Jun 21, 2024 · 1 comment

Comments

@carlhiggs
Copy link
Collaborator

Some users will complete policy reviews and not undertake spatial indicator analysis.

Currently reporting assumes that configuration for undertaking spatial indicator analysis will be completed, but this will not work for those users only completing a policy review. It would involved completing information not relevant to their task (or our task, generating the policy report on their behalf).

Instead, what is required is a stand-alone function to generate a policy report without configuring a study region.

This should be able to be called like,

import ghsci
ghsci.generate_policy_report(path='path_to_excel_checklist_file.xlsx', language='English', options={})

Language (str) and options (dict) would be optional.

The options dictionary would optionally allow users to pass on reporting parameters, specifically, the locations of custom images and any additional language overrides that may be desired.

The generate_policy_report() function might be best defined in _utils.py (where reporting functionality is currently operationalised), but implemented using a wrapper function in ghsci so it is readily callable upon import of the software.

If no checklist were supplied, it should fall back to using the demo region. This can be implemented in the first instance for prototyping purposes.

The idea under the hood would be, given an Excel file, a ghsci.Region object would be synthesised to have all the required information to otherwise generate a report using our existing functionality. So, the user doesn't have to set up their configuration file; we do it for them, only just using the information required to produce the policy report they are interested in.

carlhiggs added a commit that referenced this issue Jun 21, 2024
…n a completed policy checklist excel file, as per #462
carlhiggs added a commit that referenced this issue Jun 21, 2024
…n a completed policy checklist excel file, as per #462
@carlhiggs carlhiggs mentioned this issue Jul 17, 2024
carlhiggs added a commit that referenced this issue Sep 23, 2024
…t (failed on attempt to split on semicolon that didn't exist)
@carlhiggs
Copy link
Collaborator Author

This has been implemented, but requires more testing with other languages and documentation on usage

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

No branches or pull requests

1 participant