datasnakes / datasnakes/OrthoEvolution
Qstat parsing will error on jobs that use characters that need to be escaped.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 28
- Forks
- 5
- Avg merge
- 23m
- Merged PRs (30d)
- 3
Description
When parsing jobs I came across something interesting. If someone names a job using a coma, then there will be an index error at https://github.com/datasnakes/OrthoEvolution/blob/86a3953ae85a274e499ec7c9173fcd2e78e28d0a/OrthoEvol/Tools/pbs/qstat.py#L386
After doing some experimental analysis to debug, I found that the job name was Mg4O4c,try4. Either PBS, linux, or python is adding an escape character (maybe twice). So the variable list shows PBS_O_WORKDIR=/ddn/.../mg404c\\,try4.
When just using the qstat -f <job_id> -F json command the output looks fine.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in OrthoEvol/Tools/pbs/qstat.py at the parsing code around line 386, using qstat -f <job_id> -F json and a job name such as Mg4O4c,try4 to reproduce the escaped value. Trace how the escaped comma in PBS_O_WORKDIR is split and ensure parsing completes without an index error while retaining the job data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100