-
Notifications
You must be signed in to change notification settings - Fork 23
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
Auto-install dependencies for build and deploy and rework for #174 #204
base: main
Are you sure you want to change the base?
Conversation
- added get types packages requirements - added get dependencies to install in mox install - wip detect updates or new installations
…lling - refacto pip and github install with dependency utils - getDependencies util and also get only the one needed to be installed or updated - run install only if they are new/to update pip or github packages - new constants added for test purposes - added one test for now to check if a classic install pass Need to up the tests and apply to compile and build cmd
still issue on updating package pip
oooooo exciting!! Give me a few days to review |
Yeah there are a lot of changes to take in. Feel free to ask if anything! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the direction, I've left a number of comments on how we can improve this, but this is going in the right direction!
Let's not do this
Agreed, but it's ok if we don't optimize them for now. I think we probably could add a test case about multiple installs at once? Maybe we have that and I missed it.
Yeah, we should aim for this to be pretty performant. For example, we don't want to be making API calls to github if we don't have to, that can waste a LOT of time as a project gets bigger.
yes. If they have strict versioning, we should not update their packages. Or, if they have major version changes we should not auto-update. I left a comment about updates in general. |
Thanks for the feebacks and I'll respond to each demand 👍 I'll make some task on my own |
- output from logging install in other commands are force to quiet while install runs - helper created to for install process in other commands - fixed `RuntimeError: context has already been set` when running compile with install by moving multiprocessing set context as first process just test-all OK just format done
feat: quiet output for other commands like compile, run fd1d900
just test-all OK |
…cess - install command logs are quiet by default in other commands except `mox install` - `mox compile --no-install` - `mox compile` only run install package but no update - `mox compile --update-packages` will intall and check if updates are available - install code has been reworked to classify each package in upper level - conditions has been made to optimize installation process depending on option activated - used SpecifierSet from python packaging to check for status update pip package
feat: options to command compile and run to optimize installation process 3235441
just test-all OK
TODO
|
- ``mox install`` added to ``deploy`` and ``test`` commands - helper available for rewriting moccasin dependencies while keeping config for tests - doc cli updated with ``--update-packages`` available - removed unecessary constant toml tests - fixed check mox install util just test-all OK format done
feat: add install to deploy and test and improve tests f875d24
just test-all OK |
- reworked parsing - reworked write dependencies to mocassin toml - added new tests with ``@pytest.mark.parametrize`` just test-all OK and format
refactor: parsing dep and writing new dependencies 1d6c3ba
just test-all OK and format Review is possible @PatrickAlphaC 👍 |
Related issue: #174
This is my solution for the issue/feature. It is open to any feedback, to improve in my journey since I have done it with my current experience level. It might not be suited to the original demand, so I am not against closing this PR or improve it if needed!
Thanks for your time!
just test-all
-> OKlive test -> OK
Main Features Implemented: Automatic Dependency Management
build
anddeploy
commandsKey Components
Installation System (mox_install)
Dependency Utilities (_dependency_utils.py)
versions.toml
inside each lib folders with Pypi SpecifierSet formatPackage Managers
Improvements proposed
Code Organization
Test cases
Configuration Management
Potential next features/refacto
config.dependencies
anymore (removed frommoccasin.toml
)?[package==0.0.5, package==0.1.0]
whenpackage==0.1.2
is already installed and triggers the uv pip error (yes the user has to intentionally add this error). But the fact is, maybe add a better filtering at first when we addconf_dependencies + requirements
?