chore: import upstream snapshot with attribution
Tests / Import Check (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.14) (push) Has been cancelled
Tests / Python Tests (Python 3.11) (push) Has been cancelled
Tests / Python Tests (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.14) (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
Tests / Lint and Format (push) Has been cancelled
Tests / Web Node Tests (push) Has been cancelled
Tests / Import Check (Python 3.11) (push) Has been cancelled
Tests / Import Check (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.14) (push) Has been cancelled
Tests / Python Tests (Python 3.11) (push) Has been cancelled
Tests / Python Tests (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.14) (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
Tests / Lint and Format (push) Has been cancelled
Tests / Web Node Tests (push) Has been cancelled
Tests / Import Check (Python 3.11) (push) Has been cancelled
Tests / Import Check (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.13) (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: "[Bug]:"
|
||||
labels: ["bug", "triage"]
|
||||
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: existingcheck
|
||||
attributes:
|
||||
label: Do you need to file an issue?
|
||||
description: Please help us manage our time by avoiding duplicates and common bugs with the steps below.
|
||||
options:
|
||||
- label: I have searched the existing issues and this bug is not already filed.
|
||||
- label: I believe this is a legitimate bug, not just a question or feature request.
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: A clear and concise description of what the bug is.
|
||||
placeholder: What went wrong?
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Steps to reproduce the behavior.
|
||||
placeholder: |
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
- type: textarea
|
||||
id: expected_behavior
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
placeholder: What should have happened?
|
||||
- type: dropdown
|
||||
id: module
|
||||
attributes:
|
||||
label: Related Module
|
||||
description: Which module is this bug related to?
|
||||
options:
|
||||
- Dashboard
|
||||
- Knowledge Base Management
|
||||
- Smart Solver
|
||||
- Question Generator
|
||||
- Deep Research
|
||||
- Co-Writer
|
||||
- Notebook
|
||||
- Guided Learning
|
||||
- Idea Generation
|
||||
- API/Backend
|
||||
- Frontend/Web
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: configused
|
||||
attributes:
|
||||
label: Configuration Used
|
||||
description: The DeepTutor configuration used (if applicable).
|
||||
placeholder: |
|
||||
# Paste your config here or describe the settings
|
||||
- type: textarea
|
||||
id: screenshotslogs
|
||||
attributes:
|
||||
label: Logs and screenshots
|
||||
description: If applicable, add screenshots and logs to help explain your problem.
|
||||
placeholder: Add logs and screenshots here
|
||||
- type: textarea
|
||||
id: additional_information
|
||||
attributes:
|
||||
label: Additional Information
|
||||
description: |
|
||||
- DeepTutor Version: e.g., v0.5.0
|
||||
- Operating System: e.g., macOS 14.0, Windows 11, Ubuntu 22.04
|
||||
- Python Version: e.g., 3.11.0
|
||||
- Node.js Version: e.g., 18.17.0
|
||||
- Browser (if applicable): e.g., Chrome 120, Firefox 121
|
||||
- Related Issues: e.g., #1
|
||||
- Any other relevant information.
|
||||
value: |
|
||||
- DeepTutor Version:
|
||||
- Operating System:
|
||||
- Python Version:
|
||||
- Node.js Version:
|
||||
- Browser (if applicable):
|
||||
- Related Issues:
|
||||
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
@@ -0,0 +1,58 @@
|
||||
name: Documentation Issue
|
||||
description: Report an inaccuracy, broken link, missing topic, or unclear explanation in the docs at deeptutor.info
|
||||
title: "[Docs]: "
|
||||
labels: ["docs", "triage"]
|
||||
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: existingcheck
|
||||
attributes:
|
||||
label: Before filing
|
||||
options:
|
||||
- label: I have searched the existing docs issues and this report is not already filed.
|
||||
- label: This is about the docs at https://deeptutor.info — not a product bug.
|
||||
- type: input
|
||||
id: page
|
||||
attributes:
|
||||
label: Page URL
|
||||
description: Which page does the issue affect?
|
||||
placeholder: https://deeptutor.info/docs/...
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: kind
|
||||
attributes:
|
||||
label: What kind of issue?
|
||||
options:
|
||||
- Inaccurate or out-of-date content
|
||||
- Broken link / 404
|
||||
- Command or example that does not work
|
||||
- Screenshot does not match the current product
|
||||
- Missing topic / coverage gap
|
||||
- Typo / formatting / wording
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: What's wrong?
|
||||
description: Quote the affected text or describe the issue.
|
||||
placeholder: e.g. "Get Started → Setup Tour references `scripts/start_tour.py` which doesn't exist in the repo."
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: What did you expect?
|
||||
description: Optional — what should the docs say or show instead?
|
||||
placeholder: e.g. "The PyPI install path should be the recommended entry, matching the README."
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment (optional)
|
||||
description: Only if relevant to the issue (browser, OS, DeepTutor version).
|
||||
placeholder: |
|
||||
- Browser:
|
||||
- DeepTutor version (if checked locally):
|
||||
- OS:
|
||||
@@ -0,0 +1,78 @@
|
||||
name: EduHub / Skill Registry
|
||||
description: Report an issue with EduHub — the DeepTutor skill registry (site, API, CLI, or a published skill)
|
||||
title: "[EduHub]:"
|
||||
labels: ["eduhub", "triage"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
EduHub is DeepTutor's skill registry at https://eduhub.deeptutor.info.
|
||||
Use this template for the EduHub web site, the ClawHub-compatible API, the `eduhub` CLI,
|
||||
or a specific published skill. For bugs in the DeepTutor app itself, use the Bug Report template.
|
||||
- type: checkboxes
|
||||
id: existingcheck
|
||||
attributes:
|
||||
label: Do you need to file an issue?
|
||||
description: Please help us manage our time by avoiding duplicates with the steps below.
|
||||
options:
|
||||
- label: I have searched the existing issues and this is not already filed.
|
||||
- label: I have read the usage guide at https://eduhub.deeptutor.info/how-to-use
|
||||
- type: dropdown
|
||||
id: area
|
||||
attributes:
|
||||
label: Area
|
||||
description: Which part of EduHub is this about?
|
||||
options:
|
||||
- Web site (eduhub.deeptutor.info)
|
||||
- HTTP API (/api/v1)
|
||||
- CLI (eduhub command)
|
||||
- A published skill (install / content / metadata)
|
||||
- Report a skill for removal (policy / copyright / security)
|
||||
- Publishing a skill
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: skill_slug
|
||||
attributes:
|
||||
label: Skill slug
|
||||
description: If this is about a specific skill, its slug (e.g. socratic-tutor). Leave blank otherwise.
|
||||
placeholder: socratic-tutor
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the issue
|
||||
description: A clear and concise description of the problem.
|
||||
placeholder: What happened? What did you expect to happen?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Steps to reproduce the behavior (if applicable).
|
||||
placeholder: |
|
||||
1. Run `eduhub install <slug>`
|
||||
2. ...
|
||||
3. See error
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Logs and screenshots
|
||||
description: Paste the full command output or browser console errors.
|
||||
render: shell
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
description: |
|
||||
- eduhub CLI Version: run `eduhub --version` (CLI issues only)
|
||||
- Operating System: e.g., macOS 14.0, Windows 11, Ubuntu 22.04
|
||||
- Node.js Version: e.g., 20.x
|
||||
- Registry: e.g., https://eduhub.deeptutor.info
|
||||
value: |
|
||||
- eduhub CLI Version:
|
||||
- Operating System:
|
||||
- Node.js Version:
|
||||
- Registry:
|
||||
@@ -0,0 +1,52 @@
|
||||
name: Feature Request
|
||||
description: File a feature request
|
||||
labels: ["enhancement"]
|
||||
title: "[Feature Request]:"
|
||||
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: existingcheck
|
||||
attributes:
|
||||
label: Do you need to file a feature request?
|
||||
description: Please help us manage our time by avoiding duplicates and common feature request with the steps below.
|
||||
options:
|
||||
- label: I have searched the existing feature request and this feature request is not already filed.
|
||||
- label: I believe this is a legitimate feature request, not just a question or bug.
|
||||
- type: textarea
|
||||
id: feature_request_description
|
||||
attributes:
|
||||
label: Feature Request Description
|
||||
description: A clear and concise description of the feature request you would like.
|
||||
placeholder: What does this feature request add or improve?
|
||||
- type: dropdown
|
||||
id: module
|
||||
attributes:
|
||||
label: Related Module
|
||||
description: Which module would this feature affect?
|
||||
options:
|
||||
- Dashboard
|
||||
- Knowledge Base Management
|
||||
- Smart Solver
|
||||
- Question Generator
|
||||
- Deep Research
|
||||
- Co-Writer
|
||||
- Notebook
|
||||
- Guided Learning
|
||||
- Idea Generation
|
||||
- API/Backend
|
||||
- Frontend/Web
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: use_case
|
||||
attributes:
|
||||
label: Use Case
|
||||
description: Describe the problem this feature would solve or the use case it would enable.
|
||||
placeholder: What problem does this feature solve?
|
||||
- type: textarea
|
||||
id: additional_context
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Add any other context or screenshots about the feature request here.
|
||||
placeholder: Any additional information, mockups, or examples
|
||||
@@ -0,0 +1,47 @@
|
||||
name: Question
|
||||
description: Ask a general question
|
||||
labels: ["question"]
|
||||
title: "[Question]:"
|
||||
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: existingcheck
|
||||
attributes:
|
||||
label: Do you need to ask a question?
|
||||
description: Please help us manage our time by avoiding duplicates and common questions with the steps below.
|
||||
options:
|
||||
- label: I have searched the existing questions and discussions and this question is not already answered.
|
||||
- label: I believe this is a legitimate question, not just a bug or feature request.
|
||||
- type: textarea
|
||||
id: question
|
||||
attributes:
|
||||
label: Your Question
|
||||
description: A clear and concise description of your question.
|
||||
placeholder: What is your question?
|
||||
- type: dropdown
|
||||
id: module
|
||||
attributes:
|
||||
label: Related Module
|
||||
description: Which module is your question related to?
|
||||
options:
|
||||
- Dashboard
|
||||
- Knowledge Base Management
|
||||
- Smart Solver
|
||||
- Question Generator
|
||||
- Deep Research
|
||||
- Co-Writer
|
||||
- Notebook
|
||||
- Guided Learning
|
||||
- Idea Generation
|
||||
- API/Backend
|
||||
- Frontend/Web
|
||||
- Installation/Setup
|
||||
- General
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Provide any additional context or details that might help us understand your question better.
|
||||
placeholder: Add any relevant information here (code snippets, error messages, configuration, etc.)
|
||||
@@ -0,0 +1,12 @@
|
||||
version: "1"
|
||||
rules:
|
||||
- base: main
|
||||
upstream: HKUDS:main
|
||||
mergeMethod: hardreset
|
||||
mergeUnstable: true
|
||||
- base: dev
|
||||
upstream: HKUDS:dev
|
||||
mergeMethod: hardreset
|
||||
mergeUnstable: true
|
||||
label: ":arrow_heading_down: pull"
|
||||
conflictLabel: "merge-conflict"
|
||||
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
Thank you for contributing to DeepTutor! 🚀
|
||||
Please ensure your PR is ready for review and follows our contribution guidelines.
|
||||
For more details, see our [CONTRIBUTING.md](https://github.com/HKUDS/DeepTutor/blob/dev/CONTRIBUTING.md).
|
||||
-->
|
||||
|
||||
### Description
|
||||
*A clear and concise description of the changes.*
|
||||
|
||||
### Related Issues
|
||||
- Closes #...
|
||||
- Related to #...
|
||||
|
||||
### Module(s) Affected
|
||||
- [ ] `agents`
|
||||
- [ ] `api`
|
||||
- [ ] `config`
|
||||
- [ ] `core`
|
||||
- [ ] `knowledge`
|
||||
- [ ] `logging`
|
||||
- [ ] `services`
|
||||
- [ ] `tools`
|
||||
- [ ] `utils`
|
||||
- [ ] `web` (Frontend)
|
||||
- [ ] `docs` (Documentation)
|
||||
- [ ] `scripts`
|
||||
- [ ] `tests`
|
||||
- [ ] Other: `...`
|
||||
|
||||
### Checklist
|
||||
- [ ] I have read and followed the [contribution guidelines](https://github.com/HKUDS/DeepTutor/blob/dev/CONTRIBUTING.md).
|
||||
- [ ] My code follows the project's coding standards.
|
||||
- [ ] I have run `pre-commit run --all-files` and fixed any issues.
|
||||
- [ ] I have added relevant tests for my changes.
|
||||
- [ ] I have updated the documentation (if necessary).
|
||||
- [ ] My changes do not introduce any new security vulnerabilities.
|
||||
|
||||
### Additional Notes
|
||||
*Add any other context or screenshots about the pull request here.*
|
||||
@@ -0,0 +1,70 @@
|
||||
name: Docker Release
|
||||
|
||||
# Triggered when a GitHub Release is published.
|
||||
# Builds a multi-platform Docker image and pushes it to GitHub Container Registry (GHCR).
|
||||
#
|
||||
# Image: ghcr.io/hkuds/deeptutor
|
||||
# Tags:
|
||||
# - Version tag stripped of 'v' prefix (e.g. release v1.2.3 → image tag 1.2.3)
|
||||
# - latest (always points to the most recently published release)
|
||||
#
|
||||
# Platforms: linux/amd64, linux/arm64
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
name: Build and Push Multi-Platform Docker Image
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Required for linux/arm64 cross-compilation on GitHub-hosted ubuntu runners
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
# Enable BuildKit with multi-platform build support
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Extract tags from the release:
|
||||
# type=semver strips the leading 'v' (v1.2.3 → 1.2.3)
|
||||
# type=raw adds a 'latest' tag on every published release
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/hkuds/deeptutor
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=raw,value=latest
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
target: production
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
# Use GitHub Actions cache to speed up repeated builds
|
||||
# mode=max caches all intermediate layers (frontend-builder and python-base are expensive)
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@@ -0,0 +1,154 @@
|
||||
name: PyPI Release
|
||||
|
||||
# Triggered when a GitHub Release is published.
|
||||
# Publishes the full app package with the version derived from the release tag:
|
||||
# - deeptutor (Python backend/CLI + packaged Next.js standalone assets)
|
||||
#
|
||||
# The CLI-only package is intentionally not published to PyPI; install it from
|
||||
# a local checkout with `python -m pip install -e ./packaging/deeptutor-cli`.
|
||||
#
|
||||
# Expected tag format: vMAJOR.MINOR.PATCH, with PEP 440-compatible suffixes allowed.
|
||||
# Example: GitHub release tag v1.3.10 -> PyPI version 1.3.10.
|
||||
#
|
||||
# PyPI authentication uses Trusted Publishing. Configure the `deeptutor` PyPI
|
||||
# project to trust this workflow file, then no API token secret is needed.
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pypi-release-${{ github.event.release.tag_name }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
name: Build and Publish PyPI Package
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/project/deeptutor/
|
||||
|
||||
steps:
|
||||
- name: Checkout release tag
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.release.tag_name }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Verify release tag is on main
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git fetch origin main:refs/remotes/origin/main --no-tags
|
||||
tag="${{ github.event.release.tag_name }}"
|
||||
tag_commit="$(git rev-list -n 1 "$tag")"
|
||||
if ! git merge-base --is-ancestor "$tag_commit" origin/main; then
|
||||
echo "Release tag $tag ($tag_commit) is not on origin/main; refusing to publish to PyPI." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
|
||||
- name: Install build tools
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install --upgrade build packaging twine
|
||||
|
||||
- name: Verify release tag matches deeptutor/__version__.py
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python - <<'PY'
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
from packaging.version import Version
|
||||
|
||||
tag = os.environ["RELEASE_TAG"]
|
||||
tag_raw = tag[1:] if tag.startswith("v") else tag
|
||||
tag_version = str(Version(tag_raw))
|
||||
|
||||
src = Path("deeptutor/__version__.py").read_text(encoding="utf-8")
|
||||
match = re.search(r'^__version__\s*=\s*"([^"]+)"', src, re.MULTILINE)
|
||||
if not match:
|
||||
raise SystemExit(
|
||||
"Could not find __version__ in deeptutor/__version__.py"
|
||||
)
|
||||
code_version = str(Version(match.group(1)))
|
||||
|
||||
if code_version != tag_version:
|
||||
raise SystemExit(
|
||||
f"Release tag {tag!r} (normalized {tag_version!r}) does not "
|
||||
f"match deeptutor/__version__.py value {code_version!r}. "
|
||||
"Bump __version__ before tagging."
|
||||
)
|
||||
|
||||
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as handle:
|
||||
handle.write(f"version={code_version}\n")
|
||||
PY
|
||||
env:
|
||||
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: web
|
||||
run: npm ci --legacy-peer-deps
|
||||
|
||||
- name: Build packaged Web assets
|
||||
run: python scripts/prepare_web_package.py
|
||||
env:
|
||||
NEXT_PUBLIC_API_BASE: __NEXT_PUBLIC_API_BASE_PLACEHOLDER__
|
||||
NEXT_PUBLIC_AUTH_ENABLED: __NEXT_PUBLIC_AUTH_ENABLED_PLACEHOLDER__
|
||||
|
||||
- name: Build distributions
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p dist/deeptutor
|
||||
# Run from /tmp so any repository-local build/ directory cannot shadow
|
||||
# PyPA's `build` module during repeated package builds.
|
||||
# Wheels are the supported public install artifacts. The full app
|
||||
# wheel contains packaged Next.js assets; source distributions would
|
||||
# either duplicate those large assets or require a frontend build.
|
||||
(cd /tmp && python -m build --wheel --outdir "$GITHUB_WORKSPACE/dist/deeptutor" "$GITHUB_WORKSPACE")
|
||||
|
||||
- name: Verify package metadata
|
||||
run: |
|
||||
python -m twine check dist/deeptutor/*
|
||||
python - <<'PY'
|
||||
from pathlib import Path
|
||||
expected = "${{ steps.version.outputs.version }}"
|
||||
files = {
|
||||
"deeptutor": sorted(path.name for path in Path("dist/deeptutor").glob("*")),
|
||||
}
|
||||
for package, names in files.items():
|
||||
print(package)
|
||||
print("\n".join(f" {name}" for name in names))
|
||||
required = [
|
||||
("deeptutor", f"deeptutor-{expected}-py3-none-any.whl"),
|
||||
]
|
||||
missing = [name for package, name in required if name not in files[package]]
|
||||
if missing:
|
||||
raise SystemExit(f"Missing expected distributions: {missing}")
|
||||
PY
|
||||
|
||||
- name: Publish deeptutor to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
packages-dir: dist/deeptutor/
|
||||
print-hash: true
|
||||
@@ -0,0 +1,202 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
paths:
|
||||
- "deeptutor/**"
|
||||
- "deeptutor_cli/**"
|
||||
- "tests/**"
|
||||
- "requirements/**"
|
||||
- "requirements.txt"
|
||||
- "pyproject.toml"
|
||||
- "web/**"
|
||||
- ".github/workflows/tests.yml"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
paths:
|
||||
- "deeptutor/**"
|
||||
- "deeptutor_cli/**"
|
||||
- "tests/**"
|
||||
- "requirements/**"
|
||||
- "requirements.txt"
|
||||
- "pyproject.toml"
|
||||
- "web/**"
|
||||
- ".github/workflows/tests.yml"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint and Format
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install lint tools
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ruff
|
||||
|
||||
- name: Run Ruff lint
|
||||
run: ruff check .
|
||||
|
||||
- name: Run Ruff format check
|
||||
run: ruff format --check .
|
||||
|
||||
web-tests:
|
||||
name: Web Node Tests
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: web
|
||||
run: npm ci --legacy-peer-deps
|
||||
|
||||
- name: Run frontend node tests
|
||||
working-directory: web
|
||||
run: npm run test:node
|
||||
|
||||
import-check:
|
||||
name: Import Check (Python ${{ matrix.python-version }})
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: ${{ matrix.experimental == true }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.11", "3.12", "3.13"]
|
||||
experimental: [false]
|
||||
include:
|
||||
- python-version: "3.14"
|
||||
experimental: true
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Cache pip packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements/server.txt', 'requirements/cli.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-${{ matrix.python-version }}-
|
||||
|
||||
- name: Install minimal dependencies for import check
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements/server.txt
|
||||
|
||||
- name: Check module imports
|
||||
run: |
|
||||
echo "🐍 Testing with Python ${{ matrix.python-version }}"
|
||||
python -c "from deeptutor.runtime.orchestrator import ChatOrchestrator; print('✅ Orchestrator imports OK')"
|
||||
python -c "from deeptutor.runtime.registry.tool_registry import get_tool_registry; print('✅ Tool registry imports OK')"
|
||||
python -c "from deeptutor.runtime.registry.capability_registry import get_capability_registry; print('✅ Capability registry imports OK')"
|
||||
python -c "from deeptutor.services.config.runtime_settings import RuntimeSettingsService; print('✅ RuntimeSettingsService imports OK')"
|
||||
python -c "from deeptutor.api.routers.unified_ws import unified_websocket; print('✅ Unified WS imports OK')"
|
||||
python -c "from deeptutor.services.prompt.manager import PromptManager; print('✅ Prompt manager imports OK')"
|
||||
python -c "from deeptutor.logging import configure_logging, bind_log_context, capture_process_logs, ProcessLogEvent; print('✅ Logging imports OK')"
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
|
||||
python-tests:
|
||||
name: Python Tests (Python ${{ matrix.python-version }})
|
||||
runs-on: ubuntu-latest
|
||||
needs: import-check
|
||||
continue-on-error: ${{ matrix.experimental == true }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.11", "3.12", "3.13"]
|
||||
experimental: [false]
|
||||
include:
|
||||
- python-version: "3.14"
|
||||
experimental: true
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Cache pip packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements/server.txt', 'requirements/cli.txt', 'requirements/partners.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-${{ matrix.python-version }}-
|
||||
|
||||
- name: Install smoke test dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements/server.txt
|
||||
pip install -r requirements/partners.txt
|
||||
pip install pytest pytest-asyncio
|
||||
|
||||
- name: Create minimal runtime config
|
||||
run: |
|
||||
mkdir -p data/user/settings
|
||||
cat > data/user/settings/main.yaml <<'YAML'
|
||||
system:
|
||||
language: en
|
||||
logging:
|
||||
level: WARNING
|
||||
YAML
|
||||
|
||||
- name: Run Python tests
|
||||
run: |
|
||||
echo "🧪 Running Python tests on Python ${{ matrix.python-version }}"
|
||||
pytest -q tests deeptutor/learning/tests
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
|
||||
test-summary:
|
||||
name: Test Summary
|
||||
runs-on: ubuntu-latest
|
||||
needs: [lint, web-tests, import-check, python-tests]
|
||||
if: always()
|
||||
|
||||
steps:
|
||||
- name: Check test results
|
||||
run: |
|
||||
echo "## 🧪 Test Results Summary" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Check | Status |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "|-------|--------|" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Lint and format | ${{ needs.lint.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Web node tests | ${{ needs.web-tests.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Import check (3.11/3.12/3.13; 3.14 best-effort) | ${{ needs.import-check.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Python tests (3.11/3.12/3.13; 3.14 best-effort) | ${{ needs.python-tests.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- name: Fail if tests failed
|
||||
if: needs.lint.result == 'failure' || needs.web-tests.result == 'failure' || needs.import-check.result == 'failure' || needs.python-tests.result == 'failure'
|
||||
run: exit 1
|
||||
Reference in New Issue
Block a user