mistake in python-icebreaker/src/icebreaker/cli/ib_group.py

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

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
cli

Research direction

Inspect python-icebreaker/src/icebreaker/cli/ib_group.py, starting in main() and following the arguments passed to ib_igroups.main(). Verify the input path is constructed with the project directory only once, then exercise the CLI with an in_mics input to confirm the resulting path is correct.

Written by the indexing model from the issue text.

Description

There seems to be a mistake in ib_group.py.

In main(), the group_star variable is made from prepending the project_dir path to the in_mics input flag value.

group_star = os.path.join(project_dir, args.in_mics)

However, when this variable is used in the call to ib_igroups.main(), it is again prepended to the project_dir path:

ib_igroups.main( os.path.join(project_dir, parts_star), os.path.join(project_dir, group_star) )

This would result in the second argument to ib_igroups.main() being <path_to_project_dir>/<path_to_project_dir>/<path_to_in_mics_star_file>

Code seems to work if I change from:

group_star = os.path.join(project_dir, args.in_mics)

to

group_star = args.in_mics

Dominant language
Python
Stars
11
Forks
6
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from DiamondLightSource/python-icebreaker

All issues in DiamondLightSource/python-icebreaker

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.