v0.1.2 修复发布问题
v0.1.2 开始发布至 pypi,可以从 pypi 下载本项目然后四处部署了~ 另外添加了 README.md 文件。
This commit is contained in:
40
README.md
40
README.md
@@ -0,0 +1,40 @@
|
|||||||
|
# NJUPT Suan API
|
||||||
|
|
||||||
|
NJUPT Suan API 是一个 FastAPI 项目,目标在于实现对 NJUPT(南京邮电大学)的信息获取 API 和 MCP 服务。
|
||||||
|
|
||||||
|
## 文档
|
||||||
|
|
||||||
|
虽然项目还没个两样,但是文档其实也没个两样 ~~(什么东西)~~
|
||||||
|
|
||||||
|
[中文名叫芒果酸](https://suan.mangofanfan.cn) - `suan.mangofanfan.cn`
|
||||||
|
|
||||||
|
## 功能
|
||||||
|
|
||||||
|
| 计划功能(芒果画饼中) | 支持进度 |
|
||||||
|
|---------------|---------------|
|
||||||
|
| 教务系统 - 课程表获取 | ✅ |
|
||||||
|
| 教务系统 - 课程获取 | ⌛️ |
|
||||||
|
| 教务系统 - 成绩获取 | ⌛️ |
|
||||||
|
| 体育部系统 - 早锻炼获取 | ⌛️(等待体育部系统修复) |
|
||||||
|
|
||||||
|
## 运行
|
||||||
|
|
||||||
|
建议查阅文档了解更多部署方式。
|
||||||
|
|
||||||
|
如需从源代码直接运行的话,项目的源码位于 `src/njupt_suan_api` 目录下,`main.py` 是旧的入口文件,可以直接传统方式启动。
|
||||||
|
|
||||||
|
`manage.py` 是命令行入口,提供了完整的帮助信息。
|
||||||
|
|
||||||
|
`server.py` 是 FastAPI app 所在文件,可以使用 uvicorn 命令启动。
|
||||||
|
|
||||||
|
另外如需从源代码启动项目,你需要自行构建 WebUI。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd webui/
|
||||||
|
pnpm install
|
||||||
|
pnpm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
AI 说 `npm install` 然后 `npm run build` 也可以,但我还没试过,你可以帮我试试(?)
|
||||||
|
|
||||||
|
vite 的构建产物会放在 `src/njupt_suan_api/static` 目录下,**构建产物不会被 git 管理,但是会被项目打包进 wheel。**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "njupt-suan-api"
|
name = "njupt-suan-api"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
description = "API and MCP server for NJUPT infomation ~"
|
description = "API and MCP server for NJUPT infomation ~"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.13"
|
requires-python = ">=3.13"
|
||||||
@@ -30,11 +30,12 @@ suanapi = "njupt_suan_api.manage:app"
|
|||||||
requires = ["hatchling"]
|
requires = ["hatchling"]
|
||||||
build-backend = "hatchling.build"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.sdist]
|
||||||
|
artifacts = ["src/njupt_suan_api/static/**"]
|
||||||
|
|
||||||
[tool.hatch.build.targets.wheel]
|
[tool.hatch.build.targets.wheel]
|
||||||
packages = ["src/njupt_suan_api"]
|
packages = ["src/njupt_suan_api"]
|
||||||
|
artifacts = ["src/njupt_suan_api/static/**"]
|
||||||
[tool.hatch.build.targets.wheel.force-include]
|
|
||||||
"src/njupt_suan_api/static" = "njupt_suan_api/static"
|
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
preview = true
|
preview = true
|
||||||
|
|||||||
@@ -171,7 +171,6 @@ def run(
|
|||||||
host=host,
|
host=host,
|
||||||
port=port,
|
port=port,
|
||||||
reload=reload,
|
reload=reload,
|
||||||
reload_dirs=["api", "router"],
|
|
||||||
access_log=False,
|
access_log=False,
|
||||||
log_level="critical",
|
log_level="critical",
|
||||||
timeout_graceful_shutdown=2,
|
timeout_graceful_shutdown=2,
|
||||||
|
|||||||
Reference in New Issue
Block a user