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

Improve usability of rez_pip as python library. #89

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from

Commits on Jan 12, 2024

  1. refacto(cli): extract the main "_run" function to new module

    by exposing this private function publicly, this improves usability of rez-pip as a python library and not simply a CLI.
    
    This also make it clear of what really are the input of the function.
    
    An improvement over the function argument name was also performed with a focus on explicity.
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    aa456b9 View commit details
    Browse the repository at this point in the history
  2. refacto(main): set sensible defaults

    - rezRelease: to False because to True would be the most "destructive" action, with the biggest consequences.
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    c11a086 View commit details
    Browse the repository at this point in the history
  3. refacto(main): extract new pip_install_packages function

    reduce the size of the rez_install_pip_packages and allow for more re-usability as a python library
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    9a76574 View commit details
    Browse the repository at this point in the history
  4. refacto(main): use pathlib.Path when possible

    make it more explicit that we are expecting path like object
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    13b7ee4 View commit details
    Browse the repository at this point in the history
  5. chore: fix tests following refacto of cli module

    fix mentions of `rez.cli._run`
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    d41daba View commit details
    Browse the repository at this point in the history
  6. feat(rez): return package created in createPackage

    again in effort to make rez_pip more usable as a python library where its function could be re-used
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    69964a9 View commit details
    Browse the repository at this point in the history
  7. feat(main): return rez package created

    again in effort to make rez_pip more usable as a python library where its function could be re-used
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    aa4b1b9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6e1244b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    134256c View commit details
    Browse the repository at this point in the history
  10. refacto(main): rename pipPackages parameter

    to avoid confusion when the list[str] is converted to a list[PackageInfo] which trigger mypy
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    a970df4 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    de5cf17 View commit details
    Browse the repository at this point in the history
  12. refacto(main): simplify pip_install_package

    address issue introduced in 9a76574 where type were not as expected for the "list of pip packages"
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    049c580 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a30aed9 View commit details
    Browse the repository at this point in the history
  14. refacto(main): simplify os.fspath call

    as we are now using pathlib objects
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    a184ebf View commit details
    Browse the repository at this point in the history
  15. refacto(main): revert back pip_install_packages function

    is actually not that useful, let's keep smaller changes for now
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    9c1bc97 View commit details
    Browse the repository at this point in the history
  16. chore(main): improve docstring

    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    845e61f View commit details
    Browse the repository at this point in the history
  17. feat(rez): add "rezPackageCreationCallback"

    help at achieving specific override per rez package when using rez_pip as python library
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    f7b6519 View commit details
    Browse the repository at this point in the history
  18. refacto(main): separate python executable lookup

    the intention is to try to provide as low-level function as possible for a library-use
    
    This new function should also provide a workaround for JeanChristopheMorinPerso#46
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    6c2cfb5 View commit details
    Browse the repository at this point in the history
  19. refacto(rez): remove "release" arg in creation callback

    I have the feeling that the "release" parameter shouldn't part of the createPackage function, so to avoid an annoying refacto in the future that remove this arg, it is best to do it now.
    
    It is anyway easier to add arg to the callback than removing some.
    MrLixm committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    05a38fc View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2024

  1. feat(rez): extract getPythonExecutable from getPythonExecutables

    again in the effort to make it easier to use rez_pip as a python library
    MrLixm committed Jan 13, 2024
    Configuration menu
    Copy the full SHA
    94466f3 View commit details
    Browse the repository at this point in the history
  2. feat(rez): extract findPythonPackages from getPythonExecutables

    again in the effort to make it easier to use rez_pip as a python library
    MrLixm committed Jan 13, 2024
    Configuration menu
    Copy the full SHA
    3dc8b08 View commit details
    Browse the repository at this point in the history