Skip to content

Conversation

@Giulero
Copy link
Collaborator

@Giulero Giulero commented May 5, 2025

This pull request modernizes the Python project's configuration by replacing legacy setup.cfg and setup.py files with a pyproject.toml file. This change aligns the project with the latest Python packaging standards (PEP 517/518) and introduces additional metadata and configuration improvements.

Migration to pyproject.toml:

  • Consolidated all metadata and configuration from setup.cfg and setup.py into pyproject.toml, including project name, description, authors, license, dependencies, and optional dependencies. This change simplifies the project's configuration and adheres to modern packaging standards. [1] [2] [3]

Dependency Management:

  • Defined core dependencies (numpy, scipy, casadi, etc.) and optional dependencies (jax, pytorch, etc.) in pyproject.toml. Added a new conversion optional dependency group and included an all group for convenience.

Tool Configuration Updates:

  • Replaced isort configuration with ruff for linting, aligning with modern Python tooling. Updated pytest configuration to set test paths and options directly in pyproject.toml.

Additional Enhancements:

  • Introduced project URLs for documentation and source code, improving discoverability.
  • Adopted the src layout for package organization, ensuring a clear separation of source code and other files.…o pyproject.toml

📚 Documentation preview 📚: https://adam-docs--126.org.readthedocs.build/en/126/

@Giulero Giulero requested a review from Copilot May 5, 2025 16:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the project configuration by removing legacy setup files and consolidating all packaging metadata and tool configurations into a modern pyproject.toml in line with PEP 517/518 standards.

  • Removed the legacy setup.py file.
  • Consolidated metadata, dependency definitions, and tool configurations (like ruff for linting and pytest settings) into pyproject.toml.
  • Adopted the src/ package layout for clearer code organization.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
setup.py Removed legacy file as its contents have been migrated to pyproject.toml.
pyproject.toml Introduced project metadata, core and optional dependency definitions, and updated tool configurations (ruff, pytest, etc.).
Files not reviewed (1)
  • setup.cfg: Language not supported
Comments suppressed due to low confidence (1)

setup.py:1

  • The removal of setup.py seems complete; please ensure that all necessary build settings have been correctly migrated to pyproject.toml.
from setuptools import setup

@Giulero Giulero requested review from GiulioRomualdi and xela-95 May 5, 2025 16:59
Copy link
Contributor

@xela-95 xela-95 left a comment

Choose a reason for hiding this comment

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

LGTM!!

@Giulero Giulero merged commit c48cce2 into main May 6, 2025
19 checks passed
@Giulero Giulero deleted the modernize-pyproject branch May 6, 2025 13:18
@Giulero
Copy link
Collaborator Author

Giulero commented May 6, 2025

Thanks a lot @xela-95! :)

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