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

allow using either --file or --sync-dir + allow use of relative path in args #236

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Araxeus
Copy link

@Araxeus Araxeus commented Feb 17, 2023

  • allow using either --file or --sync-dir without needing the other

  • allow use of relative path in args

those changes combined can for example enable the following command in a monorepo:ㅤ

peru reup --file="./packages/$target_package/peru.yml"

fix #235

Note

  • This is my first time writing any code in Python, so please excuse me if I made some mistake
  • I'm not sure why both of those options were not allowed in the first place? weird… maybe I'm missing something?

affects the following args:
[ file, sync-dir,, state-dir, cache-dir ]
@Araxeus Araxeus force-pushed the allow-using-either-file-or-sync-dir branch from 97ae5a1 to 50d5540 Compare February 22, 2023 21:27
@Araxeus
Copy link
Author

Araxeus commented Feb 23, 2023

Good thing that tests exist

Forgot to add the following line so cache dir wasnt properly set
env.get('PERU_CACHE_DIR')

And one test is failing because it checked that settings --file and --sync-dir together should throw

I'll push a fix later today

* remove `test_peru_file_and_sync_dir_must_be_set_together` since that rule is removed

* fix the behavior and formatting of `--cache-dir` and `--state-dir` params
@Araxeus Araxeus force-pushed the allow-using-either-file-or-sync-dir branch from 08d2962 to 7e27bd3 Compare February 23, 2023 16:43
@Araxeus
Copy link
Author

Araxeus commented Feb 23, 2023

@oconnor663 I Pushed fixes for the failing tests,
could you approve the running the tests again, please?
And also on the other PR? 😅

(tho the current matrix testing is broken since it requires some older python versions that don't exist on the GitHub runner)

@Araxeus
Copy link
Author

Araxeus commented Mar 16, 2023

@oconnor663 heyo :)

@oconnor663
Copy link
Member

Thanks for the ping. Apologies for leaving this hanging so long. I've been spending less time on open source stuff in general this year.

@Araxeus
Copy link
Author

Araxeus commented Mar 20, 2023

All test are passing except those that depand on non-existant local python versions 🎉

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

Successfully merging this pull request may close these issues.

Why If --file or --sync-dir is set, the other must also be set?
2 participants