Implement the standard/non-standard/not-macrolactone classification layer and integrate it into analyzer, fragmenter, and CLI outputs. Port the remaining legacy package capabilities into new visualization and workflow modules, restore batch/statistics/SDF scripts on top of the flat CSV workflow, and update active docs to the new package API.
2.7 KiB
2.7 KiB
快速命令参考
📚 查看文档
# 启动文档服务器(推荐)
pixi run mkdocs serve
# 访问:http://localhost:8000
# 构建静态文档
pixi run mkdocs build
# 部署到 GitHub Pages
pixi run mkdocs gh-deploy
📦 安装项目
# 方式 1: 使用 Pixi(推荐)
pixi install
pixi shell
# 方式 2: 使用 Pip(需要先安装 RDKit)
conda install -c conda-forge rdkit
pip install -e . # 开发模式
# 方式 3: 常规安装
pip install .
🧪 测试安装
from macro_lactone_toolkit import MacroLactoneAnalyzer, MacrolactoneFragmenter
from macro_lactone_toolkit.workflows import fragment_csv, results_to_dataframe
analyzer = MacroLactoneAnalyzer()
fragmenter = MacrolactoneFragmenter()
print("✓ 安装成功!")
📓 运行示例
pixi run macro-lactone-toolkit analyze --smiles 'O=C1CCCCCCCCCCCCCCO1'
python scripts/batch_process.py --input molecules.csv --output fragments.csv --errors-output errors.csv
python scripts/analyze_fragments.py --input fragments.csv --output-dir analysis
🔍 项目结构
# 查看文档文件
find docs -type f -name "*.md" | sort
# 查看源代码
ls -la src/
# 查看配置文件
cat pyproject.toml
cat mkdocs.yml
📝 文档编辑
# 编辑文档
vim docs/user-guide/fragmenter-usage.md
# 实时预览
pixi run mkdocs serve
# 构建验证
pixi run mkdocs build
🚀 发布准备
# 构建分发包
python -m build
# 检查包
twine check dist/*
# 上传到 TestPyPI(测试)
twine upload --repository testpypi dist/*
# 上传到 PyPI(正式发布)
twine upload dist/*
🛠️ 开发工具
# 格式化代码
pixi run black src/
# 检查代码质量
pixi run flake8 src/
# 运行测试
pixi run pytest
# 测试覆盖率
pixi run pytest --cov=src
📊 项目信息
# 查看 Pixi 环境
pixi list
# 查看项目信息
cat pyproject.toml | grep -A 10 '\[project\]'
# 查看版本
cat pyproject.toml | grep version
🔗 重要文件
| 文件 | 说明 |
|---|---|
README.md |
项目主文档 |
docs/SUMMARY.md |
当前 API 和工作流摘要 |
scripts/README.md |
脚本工作流说明 |
src/macro_lactone_toolkit/ |
正式包实现 |
pyproject.toml |
Python 项目配置 |
mkdocs.yml |
文档配置 |
pixi.toml |
Pixi 环境配置 |
💡 常用链接
- 本地文档: http://localhost:8000 (运行
pixi run mkdocs serve) - GitHub: https://github.com/yourusername/macro_split
- PyPI: https://pypi.org/project/macrolactone-fragmenter/
需要帮助? 查看 docs/SUMMARY.md、scripts/README.md 或运行 pixi run mkdocs serve