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

feat: configurable package manager + uv, rye support #971

Merged
merged 5 commits into from
Mar 21, 2024

Conversation

akshayka
Copy link
Contributor

This PR adds a key package_management to our marimo.toml-based user config, and an option to select the package manager.

It also adds support for rye and uv.

Add a key package_management to marimo.toml-based user config, and an
option to select the package manager.

Adds support for uv and rye.
Copy link

vercel bot commented Mar 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 21, 2024 2:38am
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 21, 2024 2:38am

{children}
</div>
);
};

export const SettingSubtitle: React.FC<PropsWithChildren> = ({ children }) => {
return (
<div className="text-sm font-semibold underline decoration-solid decoration-gray-400 underline-offset-2 text-muted-foreground uppercase tracking-wide">
<div className="text-sm font-semibold underline-offset-2 text-accent-foreground uppercase tracking-wide">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated but makes the sections more readable

@@ -214,6 +217,7 @@ const ProgressIcon = ({

async function installPackages(
packages: string[],
manager: "pip" | "uv" | "rye",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any TypeScript tips you can share to avoid retyping "pip", "uv", and "rye" here, in the zod schema, and elsewhere?

Copy link
Contributor

Choose a reason for hiding this comment

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

I can fix this later, but fine to keep this for now

) -> None:
self.kernel_task: Optional[threading.Thread] | Optional[mp.Process]
self.queue_manager = queue_manager
self.mode = mode
self.configs = configs
self.app_metadata = app_metadata
self.package_manager = package_manager
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The kernel doesn't have access to the user config, so I plumbed down what we needed from it

mscolnick
mscolnick previously approved these changes Mar 21, 2024
marimo/_runtime/packages/pypi_package_manager.py Outdated Show resolved Hide resolved
@akshayka
Copy link
Contributor Author

CLI tests failing due to a uvicorn upgrade, unrelated to this PR

@akshayka akshayka merged commit 7831f92 into main Mar 21, 2024
26 of 29 checks passed
@akshayka akshayka deleted the aka/package-config branch March 21, 2024 02:48
@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants