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

docs: Update python documentation #4260

Merged
merged 10 commits into from
Jan 29, 2025
Merged

Conversation

hverlin
Copy link
Contributor

@hverlin hverlin commented Jan 29, 2025

  • Update python documentation.
  • Indicate how one might use it with uv in the cookbook (at least according to my understanding and after experimenting a bit with it)
  • Re-order the sections in the python page with the section about uv, .python-version and virtual env first
  • Update the mise json schema to match the documentation (and observed behavior)

@jdx
Copy link
Owner

jdx commented Jan 29, 2025

this code seems completely wrong and I think it should just be deleted which would fix the issue

mise/src/config/settings.rs

Lines 123 to 127 in a8ea4f3

if !settings.idiomatic_version_file_disable_tools.is_empty() {
settings
.disable_tools
.extend(settings.idiomatic_version_file_disable_tools.clone());
}

we use the setting here which should be the only place we need it:

mise/src/config/mod.rs

Lines 759 to 777 in a8ea4f3

let idiomatic = backend::list()
.into_par_iter()
.filter(|tool| {
!SETTINGS
.idiomatic_version_file_disable_tools
.contains(tool.id())
})
.filter_map(|tool| match tool.idiomatic_filenames() {
Ok(filenames) => Some(
filenames
.iter()
.map(|f| (f.to_string(), tool.id().to_string()))
.collect_vec(),
),
Err(err) => {
eprintln!("Error: {err}");
None
}
})

@hverlin
Copy link
Contributor Author

hverlin commented Jan 29, 2025

@jdx yes, after removing the code you mentioned, it's working 👍 Added a test as well

@jdx
Copy link
Owner

jdx commented Jan 29, 2025

I added that code, I bet it was the result of using copilot lol

@hverlin hverlin marked this pull request as ready for review January 29, 2025 14:03
@jdx jdx merged commit 3156d3c into jdx:main Jan 29, 2025
19 checks passed
@@ -274,7 +274,7 @@ in mise and nvm. Here are some of the supported idiomatic version files:
| terraform | `.terraform-version`, `.packer-version`, `main.tf` |
| yarn | `.yarnrc` |

In mise these are enabled by default. You can disable them with [`mise settings idiomatic_version_file=false`](/configuration/settings.html#idiomatic_version_file) or for specific tools with [`mise settings idiomatic_version_file_disable_tools=['python']`](/configuration/settings.html#idiomatic_version_file_disable_tools).
In mise these are enabled by default. You can disable them with [`mise settings idiomatic_version_file false](/configuration/settings.html#idiomatic_version_file) or for specific tools with [`mise settings idiomatic_version_file_disable_tools python`](/configuration/settings.html#idiomatic_version_file_disable_tools).
Copy link
Owner

Choose a reason for hiding this comment

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

is this right? I would think you'd need to use mise settings add|set

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, it works without add/set https://mise.jdx.dev/cli/settings.html#arguments. It's in the e2e test also now

jdx pushed a commit that referenced this pull request Jan 31, 2025
### 🚀 Features

- **(registry)** use aqua for duckdb by
[@mangkoran](https://github.com/mangkoran) in
[#4270](#4270)

### 🐛 Bug Fixes

- mise does not operate well under Git Bash on Windows by
[@roele](https://github.com/roele) in
[#4048](#4048)
- mise rm removes/reports wrong version of tool by
[@roele](https://github.com/roele) in
[#4272](#4272)

### 📚 Documentation

- Update python documentation by [@hverlin](https://github.com/hverlin)
in [#4260](#4260)
- fix postinstall typo in nodejs cookbook by
[@arafays](https://github.com/arafays) in
[#4251](#4251)
- Fix typo by [@henrebotha](https://github.com/henrebotha) in
[#4277](#4277)

### Hooks.md

- MISE_PROJECT_DIR -> MISE_PROJECT_ROOT by
[@jubr](https://github.com/jubr) in
[#4269](#4269)

### New Contributors

- @mangkoran made their first contribution in
[#4270](#4270)
- @jubr made their first contribution in
[#4269](#4269)
- @arafays made their first contribution in
[#4251](#4251)
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.

3 participants