Skip to content

Add pyproject.toml template with framework-specific dependency system#2

Open
moarshy wants to merge 2 commits intomasterfrom
pyproject
Open

Add pyproject.toml template with framework-specific dependency system#2
moarshy wants to merge 2 commits intomasterfrom
pyproject

Conversation

@moarshy
Copy link
Copy Markdown
Collaborator

@moarshy moarshy commented May 13, 2025

Overview
This PR adds a system for generating customized pyproject.toml files based on the selected framework. It introduces a template-based approach with a central framework dependencies YAML file for easier maintenance.

Changes

  • Added pyproject.toml.jinja2 template to common templates directory
  • Created framework_dependencies.yaml to store framework-specific dependencies
  • Updated CLI to conditionally render pyproject.toml only if it doesn't already exist
  • Added framework dependency loader function

moarshy added 2 commits May 13, 2025 19:01
- Introduced `framework_dependencies.yaml` to manage dependencies for various frameworks.
- Created `pyproject.toml.jinja2` template to define project metadata, including name, version, and dependencies.
- Ensured compatibility with Python 3.12 and specified build system requirements.
- Added a new function `load_framework_dependencies` to load dependencies from a YAML file based on the selected framework.
- Updated the `init` command to render a `pyproject.toml` file using a Jinja2 template, incorporating framework-specific dependencies.
- Improved error handling for loading dependencies and ensured existing files are not overwritten.
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.

1 participant