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

Add pydeps Makefile target for installing Python dependencies #6890

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

justinclift
Copy link
Member

@justinclift justinclift commented Apr 14, 2024

What type of PR is this?

  • Other

Description

This combines the manual steps needed for installing the Python dependencies into a single Makefile target, simplifying the dev environment setup process a bit.

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually

This has also been manually tested to ensure the new pydeps Makefile target runs the same commands as the documented manual steps.

@justinclift
Copy link
Member Author

Once this is merged, I'll update our wiki page to use this new make pydeps step rather than having to manually cut-n-paste these ones:

(redashvenv1) $ pip3 install wheel  # "wheel" needs to be installed by itself first
(redashvenv1) $ pip3 install --upgrade black==23.12.1 ruff==0.3.5 launchpadlib pip setuptools
(redashvenv1) $ pip3 install poetry
(redashvenv1) $ poetry install --only main,all_ds,dev

@AndrewChubatiuk
Copy link
Contributor

Once this is merged, I'll update our wiki page to use this new make pydeps step rather than having to manually cut-n-paste these ones:

(redashvenv1) $ pip3 install wheel  # "wheel" needs to be installed by itself first
(redashvenv1) $ pip3 install --upgrade black==23.12.1 ruff==0.3.5 launchpadlib pip setuptools
(redashvenv1) $ pip3 install poetry
(redashvenv1) $ poetry install --only main,all_ds,dev

have you looked at https://python-poetry.org/docs/managing-dependencies/ for this purpose?
black and ruff are also present in pyproject and poetry files, maybe makes sense to use them for deployment, but keep them in a separate dependency group?

@justinclift
Copy link
Member Author

justinclift commented Apr 17, 2024

Oh, we only added the specific black and ruff versions to the wiki page instructions recently, due to some change in the lint checking output of the newer versions.

I suspect we could drop the version numbers now, as from rough memory we've already upgraded the ones in the poetry file past those anyway.

Hmmm, I can probably check that pretty easily. Gimme a bit of time and I'll try things out without the hard coded numbers there. 😄

This combines the manual steps needed for installing the Python
dependencies into a single Makefile target.
@justinclift
Copy link
Member Author

@AndrewChubatiuk Finally had a few spare minutes to test this properly. We don't need the hard coded version numbers any more after all, so those have been removed. 😄

Copy link
Contributor

@AndrewChubatiuk AndrewChubatiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@justinclift
Copy link
Member Author

Thanks @AndrewChubatiuk. 😄

@justinclift justinclift merged commit 6c68b48 into master Apr 18, 2024
14 checks passed
@justinclift justinclift deleted the make_pydeps_v1 branch April 18, 2024 12:35
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.

2 participants