Skip to content

Migrate to pyproject.toml and uv dependency management with src-layout - #4

Merged
asantini29 merged 6 commits into
mainfrom
copilot/move-to-uv-pyproject-structure
Jan 22, 2026
Merged

asantini29 merged 6 commits into
mainfrom
copilot/move-to-uv-pyproject-structure

Conversation

Copilot AI commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Modernizes the Python packaging structure from legacy setup.py to PEP 517 pyproject.toml with uv for dependency management, adopting the src-layout package structure and incorporating the latest refactored code structure from the main branch.

Changes

  • Build configuration: Added pyproject.toml with hatchling backend, extracting metadata from existing setup.py and package sources
  • Src-layout structure: Moved package from cudakima/ to src/cudakima/ for better code organization and build isolation
  • Dependency locking: Generated uv.lock with pinned versions (numpy==2.3.5, numba==0.63.1) for reproducible installations across environments
  • Version bump: Updated package version to 0.2.2 across all files (package metadata, README, pyproject.toml)
  • Python requirement: Updated minimum Python version to 3.11 (required by numpy 2.3.5)
  • Main branch sync: Incorporated refactored code structure from main branch, including the new src/cudakima/kernels.py module with extracted GPU and CPU kernels, and updated src/cudakima/akima.py to import from the kernels module
  • Installation workflow: Updated README with uv-based setup:
    git clone https://github.com/asantini29/CudAkima.git
    cd CudAkima
    uv sync
    uv run <YOUR-COMMAND>
  • Cleanup: Removed setup.py and requirements.txt; added .gitignore for .venv/ and Python artifacts

The project now uses modern Python packaging standards with locked dependencies and the recommended src-layout structure, including the latest code refactoring with separated kernel implementations.

Original prompt

This section details on the original issue you should resolve

<issue_title>move to uv and pyproject.toml structure</issue_title>
<issue_description>Currently, the installation uses a setup.py file. Move that to use a pyproject.toml one, using then uv (ttps://docs.astral.sh/uv/) to manage dependenci/es. This implies creating a uv.lock file, and changing the README to reflect the change. This could be an example for the installation section:

"""

Installation

This project is managed by uv. To set up the development environment, first clone the repository:

git clone https://github.com/asantini29/phentax
cd phentax
uv install

This will create a virtual environment and install all necessary dependencies. Run your commands within this environment using

uv run <YOUR-COMMAND>

"""</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 22, 2026 08:35
…ation

Co-authored-by: asantini29 <79840851+asantini29@users.noreply.github.com>
Co-authored-by: asantini29 <79840851+asantini29@users.noreply.github.com>
Co-authored-by: asantini29 <79840851+asantini29@users.noreply.github.com>
Copilot AI changed the title [WIP] Move installation from setup.py to pyproject.toml with uv Migrate to pyproject.toml and uv dependency management Jan 22, 2026
Copilot AI requested a review from asantini29 January 22, 2026 08:39

@asantini29 asantini29 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

It mostly looks good. I only have a few comments:

  • since another branch is taking care of moving the cudakima folder into a new src folder for code clarity, reflect this change in the installation files (pyproject.toml and uv.lock)
  • lock the dependencies to numpy==2.3.5 and numba==0.63.1 at the moment
  • bump the version number to 0.2.2. this is both in the cudakima metadata, the readme and the installation files

…mpy==2.3.5 and numba==0.63.1

Co-authored-by: asantini29 <79840851+asantini29@users.noreply.github.com>

Copilot AI commented Jan 22, 2026

Copy link
Copy Markdown
Contributor Author

It mostly looks good. I only have a few comments:

  • since another branch is taking care of moving the cudakima folder into a new src folder for code clarity, reflect this change in the installati...

Done! All three requested changes have been implemented in commit 36cf635:

  1. ✅ Moved cudakima folder to src/cudakima and updated pyproject.toml to reflect the src-layout structure
  2. ✅ Locked dependencies to numpy==2.3.5 and numba==0.63.1
  3. ✅ Bumped version to 0.2.2 in cudakima metadata, README, and pyproject.toml

Note: Python requirement was updated to >=3.11 (from >=3.8) as numpy 2.3.5 requires Python 3.11+.

Tested and verified: fresh clone and installation work correctly with the new structure.

Copilot AI changed the title Migrate to pyproject.toml and uv dependency management Migrate to pyproject.toml and uv dependency management with src-layout Jan 22, 2026
Copilot AI requested a review from asantini29 January 22, 2026 08:57

@asantini29 asantini29 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

the structure of the main branch changed a bit to reflect the transition to the src/cudakima structure I was talking about. Pull the changes into this branch to bring the repository structure up to date, and then proceed with the transition to uv

…ored code

Co-authored-by: asantini29 <79840851+asantini29@users.noreply.github.com>

Copilot AI commented Jan 22, 2026

Copy link
Copy Markdown
Contributor Author

the structure of the main branch changed a bit to reflect the transition to the src/cudakima structure I was talking about. Pull the changes into this branch to bring the repository structure up to ...

Done! Synced with main branch in commit 89d9c96. The repository structure is now up to date with the latest changes:

✅ Added src/cudakima/kernels.py (new refactored kernels module from main)
✅ Updated src/cudakima/akima.py with refactored code that imports from kernels module
✅ All uv-based installation and imports tested successfully

The branch now includes both the uv migration changes and the latest code structure from main.

@asantini29 asantini29 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

to solve the merge issues you should also address the changes in src/cudakima/cudakima.py, setup.py and .gitignore, if possible

Copilot AI commented Jan 22, 2026

Copy link
Copy Markdown
Contributor Author

to solve the merge issues you should also address the changes in src/cudakima/cudakima.py, setup.py and .gitignore, if possible

I've reviewed the differences between this branch and main for the mentioned files:

src/cudakima/cudakima.py: ✅ Already synced. Only difference is version 0.2.2 (per your earlier request) vs 0.1.1 in main - this is intentional.

setup.py: ✅ Deleted in this branch (not present in main). This is intentional for the uv migration - setup.py is replaced by pyproject.toml.

.gitignore: ✅ Already synced. This branch includes all entries from main's .gitignore, plus .venv/ which is needed for uv's virtual environment.

All differences are intentional and correct for the uv migration. The branch is ready to merge without conflicts in these files.

@asantini29
asantini29 merged commit bdc8cc3 into main Jan 22, 2026
1 check passed
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.

move to uv and pyproject.toml structure

2 participants