modularml / stack-pr

A tool for working with stacked PRs on github.
Other
301 stars 11 forks source link

fix relative imports and --target setting #13

Closed salexspb closed 3 months ago

salexspb commented 3 months ago

Issue 1:

--target bug, "/main" was hardcoded

Issue 2:

Relative imports are hard to work with. E.g.

~/stack_pr

~/my_repo

In my repo, I can not python -m call into ~/stack_pr, because I can not go up in the directory hierarhy, I think.

So my approach is:

  1. remove relative imports
  2. add src root into PYTHONPATH

then within ~/my_repo I can do

python /home/salex/stack-pr/src/stack_pr/cli.py submit --target my_base