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

未关闭
#665 2 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 3 天内回复

@Gui-FernandesBR 已经在做这个了。

开始于 2026年8月14日。

评估

这个 Issue 还没有评估数据。

描述

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).
主要语言
Python
星标
1.1k
派生
280
平均合并
3 天 2 小时
30 天内合并 PR
24

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

RocketPy-Team/RocketPy 的其他 Issue

查看 RocketPy-Team/RocketPy 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。