你是一名 DevOps 与工程化专家。你的目标是根据这套代码配置为一套具有自动化构建、容器化封装和标准部署能力的工程化项目。 - #125
Open
chenziqi66 wants to merge 1 commit into
Open
你是一名 DevOps 与工程化专家。你的目标是根据这套代码配置为一套具有自动化构建、容器化封装和标准部署能力的工程化项目。#125chenziqi66 wants to merge 1 commit into
chenziqi66 wants to merge 1 commit into
Conversation
项目现状分析: scikit-plot 是一个用于机器学习的可视化库,基于 scikit-learn 和 matplotlib。目前项目结构较为传统,存在一些需要现代化的方面 工程化需求清单: 1. 构建系统现代化 迁移从 setup.py 到 pyproject.toml (PEP 517/518) 使用 setuptools 或 hatchling / poetry 作为构建后端 完善依赖管理(区分 runtime/dev/test 依赖) 添加 MANIFEST.in 优化打包内容 2. 代码质量与规范 Linting : ruff 或 flake8 + pylint 格式化 : black + isort 类型检查 : mypy (可选,因为项目较老) 预提交钩子 : pre-commit 配置 3. 测试体系完善 更新 pytest 配置 添加代码覆盖率 pytest-cov 多版本 Python 测试矩阵(3.9/3.10/3.11/3.12) 添加测试报告和覆盖率报告 4. CI/CD 流水线(GitHub Actions) 持续集成 : 多平台测试(Ubuntu/macOS/Windows) 多 Python 版本测试 代码质量检查 测试覆盖率上传(Codecov) 持续部署 : 自动发布到 PyPI(基于 tag) 自动生成 Release Notes 文档自动构建部署 5. 容器化支持 Dockerfile : 多阶段构建,支持开发和生产环境 Docker Compose : 本地开发环境一键启动 .dockerignore : 优化镜像大小 6. 文档工程化 更新 Sphinx 配置 添加文档构建 CI 示例 Notebook 自动化测试 7. 发布管理 版本号自动化管理 Changelog 自动生成 GitHub Release 自动化 8. 开发体验优化 Makefile 或 Taskfile 封装常用命令 VS Code 开发容器配置(Dev Containers) 开发环境文档 现在,请开始分析该仓库并输出所有工程化配置文件
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
项目现状分析:
scikit-plot 是一个用于机器学习的可视化库,基于 scikit-learn 和 matplotlib。目前项目结构较为传统,存在一些需要现代化的方面 工程化需求清单:
使用 setuptools 或 hatchling / poetry 作为构建后端
完善依赖管理(区分 runtime/dev/test 依赖)
添加 MANIFEST.in 优化打包内容
格式化 : black + isort
类型检查 : mypy (可选,因为项目较老)
预提交钩子 : pre-commit 配置
添加代码覆盖率 pytest-cov
多版本 Python 测试矩阵(3.9/3.10/3.11/3.12)
添加测试报告和覆盖率报告
多平台测试(Ubuntu/macOS/Windows)
多 Python 版本测试
代码质量检查
测试覆盖率上传(Codecov)
持续部署 :
自动发布到 PyPI(基于 tag)
自动生成 Release Notes
文档自动构建部署
Docker Compose : 本地开发环境一键启动
.dockerignore : 优化镜像大小
添加文档构建 CI
示例 Notebook 自动化测试
GitHub Release 自动化
VS Code 开发容器配置(Dev Containers)
开发环境文档
现在,请开始分析该仓库并输出所有工程化配置文件