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

add an example() function for the ghsci module to simplify loading example region, with nested help() function to display guidance #395

Closed
carlhiggs opened this issue Mar 19, 2024 · 0 comments

Comments

@carlhiggs
Copy link
Member

Is your feature request related to a problem? Please describe.
There is some guidance for basic functionality of the software on external websites, or on the command line outside of Python. It would be nice to make it easier for people engaging with code directly within Python to receive quicker and deeper guidance on more advanced usage of the Python library.

Describe the solution you'd like
if a user imports the ghsci module, there could be a function ghsci.help() to display high level guidance (configuration, analysis, generation of resources, and running comparisons -- and where to go if stuck), but also more granular guidance (e.g. dropping a database to start again, generating a specific report or map, running specific steps in the workflow, and the order of those steps if one were to do it manually).

So, it could look like this:

from subprocesses import ghsci
ghsci.help()

this would display a brief guidance on how the module could be used, as well as providing a prompt for how to receive more detailed information, like ghsci.help('advanced'). If that were run, detail on the kinds of subfunctions available could be displayed.

The help function could be nested within another function ghsci.example() that would be equivalent to ghsci.Region('example_ES_Las_Palmas_2023'). This could be explained to the user, how they could modify the example configuration and run it for their region in an analogous way. The regular help would be printed at the same time guiding analysis etc. For those who use the example region a lot (like myself!) it will save them typing out 'example_ES_Las_Palmas_2023' all the time (this name should also be saved in a variable, like ghsci.example_codename so its defined only once in code).

carlhiggs added a commit that referenced this issue Mar 19, 2024
…than the older deprecated one (a tangential update to #395 for improving guidance)
@carlhiggs carlhiggs mentioned this issue May 16, 2024
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