MNT: Decouple and Extract `Function` Class to Standalone Repository

Đang mở
#665 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@Gui-FernandesBR đang làm issue này rồi.

Từ ngày 14/8/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Function Git housekeeping Refactor

Rationale
The Function class has evolved into a powerful, general-purpose tool for handling 1D/ND interpolation, algebra, FFTs, and plotting. It is mathematically robust and useful outside the context of rocketry simulations.

Currently, a user who wants to use Function for general engineering tasks must install the entire RocketPy library (and its heavy dependencies). By extracting Function into its own repository and PyPI package:

  1. Broader Usage: It can be used in other scientific projects without the RocketPy overhead.
  2. Cleaner Architecture: RocketPy becomes a consumer of this new package, adhering to the "Separation of Concerns" principle.
  3. Independent Lifecycle: The Function class can be versioned, tested, and released independently of RocketPy's flight physics engine.

Task List
This migration should be performed in phases to minimize disruption.

Phase 1: Setup New Infrastructure

  • Create a new repository within the RocketPy-Team organization (suggested name: function-toolbox or pylib-function).
  • Port the Function class code, utilities.py (if relevant), and associated unit tests to the new repository.
  • Set up a dedicated CI/CD pipeline (GitHub Actions) for the new repo.
  • Create pyproject.toml / setup.py and publish the initial version to TestPyPI and eventually PyPI.

Phase 2: Integration

  • Add the new package as a dependency in RocketPy's pyproject.toml.
  • Refactor RocketPy codebase to import Function from the new external package instead of rocketpy.Function.
  • Run the full RocketPy test suite to ensure no behavior has changed (Regression Testing).

Phase 3: Cleanup

  • Deprecate/Remove the internal Function class file from the main RocketPy repository.
  • Update documentation to point users to the new repository for Function specific details.

Final Comments

  • Naming: We need to decide on a PyPI package name that isn't taken (e.g., rocketpy-function or math-function).
  • Breaking Change: This is a breaking change for users who import Function. We should consider a transition period where from rocketpy import Function wraps the new library with a deprecation warning before being removed in v2.0.
  • Git History: Ideally, we should try to preserve the git commit history of the Function class when moving it to the new repo (using git subtree or filter-branch).
Ngôn ngữ chính
Python
Star
1.1k
Fork
280
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
24

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RocketPy-Team/RocketPy

Tất cả issue của RocketPy-Team/RocketPy

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.