-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
new: Add Python tier 2 and 3 support. #1694
base: develop-1.30
Are you sure you want to change the base?
new: Add Python tier 2 and 3 support. #1694
Conversation
@harlequin Awesome stuff! I don't know Python at all, so I'll probably be asking a bunch of dumb questions. Also, since this is a pretty large feature, it should merge into a dev branch. I've created |
let args = vec![ | ||
"-m", | ||
"venv", | ||
virtual_environment.as_os_str().to_str().unwrap(), |
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.
Does this need an absolute path? Could it just be &python.config.venv_name
?
* Add workspace crate. * Add projects loading. * Add build. * Clean up build data. * Flesh out build. * Add caching. * Add to session. * Use focused graphs. * Add workspace mocker. * Delete old graph builder. * Polish. * Fix tests. * Fix tests.
Can you rebase |
Hey @milesj I have done the re-work you have suggested and from my point of view it shall be complete. Rebase to the |
- remove yarn version modification - remove version configuration for pip, if user want's to update the pip dependency he can do this via the requirements.txt or installArgs method - add root_requirements_only, to be able to create venv in project scope or in workspace scope - pip_requirements fixed the occupied/vaccant - clean up Cargo.toml - reworked and rethinked the install_deps and setup_tool function; install_deps phase is absolute sufficient - remove not needed comments - remove all references to get_workspace_root - Cleaned up CHANGELOG.md
I have updated today again main parts of the implementation, and also re-thought about the setup_tools and other areas. Additional I have removed all the dead code and not needed comments. These are the areas were I have had a look into ... hope that I didn't missed something ;)
|
#[setting(nested)] | ||
pub pip: Option<PipConfig>, | ||
|
||
#[setting(default = ".venv", skip)] |
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.
Can you add a description then run just schemas
.
); | ||
} | ||
|
||
if let Some(install_args) = &pip_config.install_args { |
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.
This should probably still pip install
even if there are no custom args yeah? The args from the config should just append.
} | ||
} | ||
|
||
if let Some(req) = requirements_path { |
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.
Actually what's the difference between this block, and the one above? They both pip install.
hasher: &mut ContentHasher, | ||
_hasher_config: &HasherConfig, | ||
) -> miette::Result<()> { | ||
if let Some(python_version) = &self.config.version { |
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.
We should probably still hash the dependencies, even if no version is configured.
hasher: &mut ContentHasher, | ||
_hasher_config: &HasherConfig, | ||
) -> miette::Result<()> { | ||
if let Some(python_version) = &self.config.version { |
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.
Same here.
@harlequin Awesome work, just left a few more comments/questions. |
Support python as a tier level 3 language in moon.
version
is configured.requirements.txt
to resolve and install dependencies.python.version
setting to.moon/toolchain.yml
.toolchain.python
setting tomoon.yml
.moon bin
commands to support Python.Would close Issues
virtual environment is used
poetry would be installed via requirements.txt