llnl / llnl/scr

python: Add and double check docstrings for ResourceManager and JobLauncher

Open
#409 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

python
Dominant language
C
Stars
108
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Let's add docstrings to fully specify the behavior of the methods that one has to implement in order to define a new ResourceManager and JobLauncher. We should specify the meaning and types of any input parameters and return values as well as any exceptions raised. Let's use the same docstring format as we do in the scr.py.in file:

https://github.com/LLNL/scr/blob/develop/python/scr.py.in

Once the interfaces are documented, let's then double check our code to make sure we are passing the input params and using the return values consistently. For example, in most spots we expect ResourceManager.get_job_nodes() to return a string but some spots seem to expect that the output could be a list, like here:

https://github.com/LLNL/scr/blob/0803edda40475278eaadce34f8050ee49376e992/scripts/pyfe/pyfe/list_down_nodes.py#L31-L32

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the ResourceManager and JobLauncher interfaces with the docstring format in python/scr.py.in. Review the usage example in scripts/pyfe/pyfe/list_down_nodes.py, especially lines 31-32, and check related call sites for consistent parameter and return-value handling. Done means the required methods document inputs, outputs, and exceptions, and their callers use those interfaces consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.