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

Repackage server as proper Python package, removing pipenv #604

Merged
merged 8 commits into from
Aug 19, 2024

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented Feb 19, 2024

Supersedes #582 and addresses #168

Moves around some config files and expands pyproject to be the single source of truth, with a dynamic version from the git tags. Also hacks the docker build so that this version info gets passed in production, and switches to using uv inside the docker builds.

For now, I'd like this PR to retain Pipfile and Pipfile.lock so that existing developer workflows should still work. In the future, we will switch to purely using uv-generated lockfiles for dependencies, which will allow us to use dependabot again properly, and make our dependency management less fraught with issues when wanting to update only one dep.

Warning: the deps in Pipfile.lock will not exactly match the uv generated lock files.

Copy link

cypress bot commented Feb 19, 2024



Test summary

132 0 0 0


Run details

Project datalab
Status Passed
Commit 464745a ℹ️
Started Aug 19, 2024 7:08 PM
Ended Aug 19, 2024 7:13 PM
Duration 05:16 💡
OS Linux Ubuntu -
Browser Multiple

View run in Cypress Cloud ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 67.26%. Comparing base (f98ff00) to head (1ebb520).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #604      +/-   ##
==========================================
+ Coverage   66.89%   67.26%   +0.37%     
==========================================
  Files          62       62              
  Lines        3727     3748      +21     
==========================================
+ Hits         2493     2521      +28     
+ Misses       1234     1227       -7     
Files Coverage Δ
pydatalab/pydatalab/main.py 65.54% <ø> (+1.20%) ⬆️
pydatalab/pydatalab/__init__.py 60.00% <60.00%> (-40.00%) ⬇️

... and 12 files with indirect coverage changes

@ml-evs ml-evs force-pushed the ml-evs/update-pyproject branch 2 times, most recently from 771d2fd to 317dffd Compare May 15, 2024 16:03
@ml-evs ml-evs marked this pull request as ready for review May 15, 2024 17:14
@ml-evs ml-evs requested a review from jdbocarsly as a code owner May 15, 2024 17:14
@ml-evs ml-evs force-pushed the ml-evs/update-pyproject branch 3 times, most recently from 5e6c1ad to 0fe4bb8 Compare May 16, 2024 17:01
@ml-evs ml-evs added the blocked label May 16, 2024
@ml-evs
Copy link
Member Author

ml-evs commented May 16, 2024

Decision is to merge this PR immediately after the next release, to avoid breaking deployments.

INSTALL.md Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 68.10%. Comparing base (5cbbe5e) to head (ddd27d7).
Report is 8 commits behind head on main.

Files Patch % Lines
pydatalab/pydatalab/__init__.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #604      +/-   ##
==========================================
+ Coverage   68.09%   68.10%   +0.01%     
==========================================
  Files          62       62              
  Lines        3880     3882       +2     
==========================================
+ Hits         2642     2644       +2     
  Misses       1238     1238              
Files Coverage Δ
pydatalab/pydatalab/config.py 82.14% <100.00%> (+0.12%) ⬆️
pydatalab/pydatalab/main.py 65.41% <ø> (+0.70%) ⬆️
pydatalab/pydatalab/__init__.py 60.00% <60.00%> (-40.00%) ⬇️

@ml-evs ml-evs force-pushed the ml-evs/update-pyproject branch 3 times, most recently from b6100af to 11f7051 Compare August 19, 2024 13:37
Remove .env from dockerignore

Force recreate containers

Debug print env

Debug env

Add app healthcheck
- More cleaning of dependencies

- Add missing dep and fix package name in version finder

- Add chat deps as an extra

- Add pip-compile style lockfiles generated by uv

- Update lock files

- Tweak navani dep

Use uv for docker builds and reintroduce hot-reload in dev container after flask update

Resync pip compile and pyproject
- Switch to setuptool-scm instead of versioningit, bump dotenv

- Reinstate dotenv loading for non-config options
@ml-evs ml-evs added documentation Improvements or additions to documentation build For issues/PRs pertaining to the build or deployment of the package refactoring For issues/PRs that refactor existing code/features Python labels Aug 19, 2024
@ml-evs ml-evs changed the title Refactor Python package and build Repackage server as proper Python package, removing pipenv Aug 19, 2024
@ml-evs ml-evs mentioned this pull request Aug 19, 2024
@ml-evs ml-evs merged commit ac6553a into main Aug 19, 2024
19 checks passed
@ml-evs ml-evs deleted the ml-evs/update-pyproject branch August 19, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build For issues/PRs pertaining to the build or deployment of the package documentation Improvements or additions to documentation Python refactoring For issues/PRs that refactor existing code/features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant