Files
macro_split/QUICK_COMMANDS.md
2025-11-14 20:34:58 +08:00

150 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 快速命令参考
## 📚 查看文档
```bash
# 启动文档服务器(推荐)
pixi run mkdocs serve
# 访问http://localhost:8000
# 构建静态文档
pixi run mkdocs build
# 部署到 GitHub Pages
pixi run mkdocs gh-deploy
```
## 📦 安装项目
```bash
# 方式 1: 使用 Pixi推荐
pixi install
pixi shell
# 方式 2: 使用 Pip需要先安装 RDKit
conda install -c conda-forge rdkit
pip install -e . # 开发模式
# 方式 3: 常规安装
pip install .
```
## 🧪 测试安装
```python
# 测试导入
from src.macrolactone_fragmenter import MacrolactoneFragmenter
print("✓ 安装成功!")
# 快速测试
fragmenter = MacrolactoneFragmenter(ring_size=16)
print(f"✓ 初始化成功ring_size={fragmenter.ring_size}")
```
## 📓 运行示例
```bash
# Jupyter Notebook
pixi run jupyter notebook notebooks/filter_molecules.ipynb
# 或启动 Jupyter Lab
pixi run jupyter lab
```
## 🔍 项目结构
```bash
# 查看文档文件
find docs -type f -name "*.md" | sort
# 查看源代码
ls -la src/
# 查看配置文件
cat pyproject.toml
cat mkdocs.yml
```
## 📝 文档编辑
```bash
# 编辑文档
vim docs/user-guide/fragmenter-usage.md
# 实时预览
pixi run mkdocs serve
# 构建验证
pixi run mkdocs build
```
## 🚀 发布准备
```bash
# 构建分发包
python -m build
# 检查包
twine check dist/*
# 上传到 TestPyPI测试
twine upload --repository testpypi dist/*
# 上传到 PyPI正式发布
twine upload dist/*
```
## 🛠️ 开发工具
```bash
# 格式化代码
pixi run black src/
# 检查代码质量
pixi run flake8 src/
# 运行测试
pixi run pytest
# 测试覆盖率
pixi run pytest --cov=src
```
## 📊 项目信息
```bash
# 查看 Pixi 环境
pixi list
# 查看项目信息
cat pyproject.toml | grep -A 10 '\[project\]'
# 查看版本
cat pyproject.toml | grep version
```
## 🔗 重要文件
| 文件 | 说明 |
|------|------|
| `README.md` | 项目主文档 |
| `DOCUMENTATION_GUIDE.md` | 文档系统使用指南 |
| `PROJECT_COMPLETION_SUMMARY.md` | 项目完成总结 |
| `QUICK_COMMANDS.md` | 本文件 |
| `pyproject.toml` | Python 项目配置 |
| `setup.py` | 打包脚本 |
| `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/
---
**需要帮助?** 查看 `DOCUMENTATION_GUIDE.md` 或运行 `pixi run mkdocs serve`