Skip to content

Commit 6e2bc39

Browse files
enh: 3.0 support win tdgpt (#34763)
* feat: Windows adaptation with winsw service registration and bilingual documentation * fix: remove unused global declaration in parse_arguments function * style: fix code quality issues detected by ruff - Remove unused imports (pathlib.Path, json, torch, keras) - Fix f-string without placeholders - Remove unused variables (proc) - Fix indentation errors - Clean up trailing whitespace and blank lines - Fix line length issues (>120 chars) - Add noqa comments for intentional violations * chore: remove obsolete taosanode.ini configuration file * refactor: extract ISS and XML templates to separate files - Move Inno Setup script to templates/tdgpt.iss - Move WinSW config to templates/taosanode-service.xml - Implement local WinSW.exe caching (packaging/bin/) - Add .gitignore to exclude cached binaries - Simplify win_release.py by using template files Benefits: - Easier to maintain ISS and XML files - No need to escape quotes in Python - WinSW binary cached locally for faster builds - Better separation of concerns * refactor: rename templates to installer and consolidate gitignore - Rename packaging/templates/ to packaging/installer/ (more descriptive) - Remove tools/tdgpt/.gitignore (redundant) - Add WinSW.exe exclusion to community/.gitignore - Update win_release.py to use new directory name The 'installer' name better reflects the content: - tdgpt.iss: Inno Setup installer script - taosanode-service.xml: Windows service configuration * fix: improve packaging script robustness 1. Fix GBK encoding issue in install.bat - Replace ✓ symbol with [OK] text - Prevents crash on Windows with GBK encoding 2. Make model directory optional in ISS - Add 'skipifsourcedoesntexist' flag - Allow packaging without model files 3. Remove ZIP fallback logic - Fail fast if Inno Setup compilation fails - Return proper exit code (1) on failure - Provide clear error messages 4. Remove unused zipfile import These changes ensure the packaging script fails clearly when prerequisites are missing, rather than silently creating incomplete packages. * fix: revert model directory to required and add validation Model directory is REQUIRED for Windows production packaging, not optional. The previous 'skipifsourcedoesntexist' was only meant for testing purposes. Changes: - Revert ISS to require model directory with DirExists check - Add validation in win_release.py before building - Provide clear error message with usage example - Fail fast if model directory is missing or empty This ensures users get clear feedback when model files are missing, rather than cryptic Inno Setup errors. * feat: add --skip-model-check for testing workflow Add flexible model validation to support both testing and production: Testing mode (--skip-model-check): - Skip model validation for quick testing - ISS uses 'skipifsourcedoesntexist' to allow empty model dir - Shows warning that this is for testing only Production mode (default): - Validates model directory exists and has files - Checks for required files: timemoe.tar.gz, tdtsfm.tar.gz - Fails with clear error if requirements not met - Ensures production packages always have models Usage: # Testing (no models needed) python win_release.py -e community -v 3.3.6.0 --skip-model-check # Production (models required) python win_release.py -e community -v 3.3.6.0 -m /path/to/models * fix: update model paths in README-CN for packaging instructions * docs: update packaging documentation with --skip-model-check Add documentation for the new --skip-model-check parameter: - Explain testing vs production modes - Document required model files (timemoe.tar.gz, tdtsfm.tar.gz) - Update usage examples to show both modes - Add warning that --skip-model-check is for testing only - Update parameter table with new option Both English and Chinese documentation updated. * enh:add installation, uninstallation, and log viewer scripts for TDGPT on Windows * enh: auto-detect installation directory and update paths for Windows compatibility * Refactor and localize logging and service management in TDGPT - Removed the log_viewer.py script as it is no longer needed. - Updated taosanode_service.py to improve cross-platform support and logging consistency. - Changed log file names to unify logging across services. - Enhanced uninstall.py for better user experience and clearer output messages. - Improved uninstall.sh to preserve local configuration while removing global config. * feat: add Windows installation script and documentation for TDGPT * fix: update version number in packaging scripts and documentation to 3.4.0.11 * Refactor taosanode service logging and Windows service management - Introduced a dedicated service log file for taosanode. - Added functionality to redirect stdout/stderr to a specified file when running under WinSW. - Updated virtual environment paths to be more organized under a 'venvs' directory. - Enhanced the uninstall script to improve logging and user feedback. - Streamlined the removal of files and directories during uninstallation. - Adjusted configuration paths to align with the new directory structure. - Improved test configuration to reflect changes in virtual environment paths. * Refactor taosanode_service.py to improve model management and logging - Updated model-start command help text for clarity. - Introduced DEFAULT_MODEL_ORDER for consistent model ordering. - Added support for loading enabled models from a configuration file. - Adjusted model configurations for moirai and moment to use smaller default models. - Enhanced model startup and shutdown processes to skip missing directories and log detailed summaries. - Improved status reporting for running models. - Refactored uninstall.py to handle logging based on environment variable. - Made torch and keras imports optional in conf.py to avoid runtime errors if not available. * feat: add Python version check and error handling to installer scripts * fix: update model installation options and logic in installer script * fix(tdgpt): restore windows startup diagnostics * fix(tdgpt): limit winsw restart retries * fix(tdgpt): reuse healthy venvs on online install * fix(tdgpt): retry progress file writes on windows * fix(tdgpt): switch installer progress to append-only log * fix(tdgpt): raise installer disk space estimate * fix(tdgpt): rebuild incomplete reused main venv * fix(tdgpt): add detailed startup dependency probes * fix(tdgpt): improve reinstall and startup diagnostics * fix(tdgpt): require vc++ runtime before install * feat(tdgpt): default start-model to all * feat(tdgpt): confirm existing install directory * fix(tdgpt): stop winsw before reinstall * fix(tdgpt): retry rate-limited model downloads * fix(tdgpt): reuse existing online model directories * feat(tdgpt): prefer offline model install flow * feat(tdgpt): update model ports and enhance installation logging * feat(tdgpt): enhance taosanode startup process and readiness checks * fix(tdgpt): improve logger setup to handle non-writable log directories * feat(tdgpt): update dependency installation and enhance logging configuration for GitHub Actions * feat(tdgpt): enhance Windows and GitHub Actions compatibility in taosanode configuration * fix(tdgpt): correct model service start assertion for missing required model * docs(tdgpt): update installation and usage documentation for clarity and consistency * chore: remove outdated documentation files for doc-writing skill --------- Co-authored-by: support-platform <it@taosdata.com>
1 parent 9337513 commit 6e2bc39

36 files changed

Lines changed: 8917 additions & 102 deletions

.github/workflows/new-tdgpt-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Install dependencies
4949
run: |
5050
python -m pip install --upgrade pip
51-
python -m pip install flake8 pytest pylint
51+
python -m pip install flake8 pytest pytest-mock pylint
5252
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
5353
5454
- name: Checking the code with pylint

.github/workflows/tdengine-docs-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7171
with:
7272
reviewdog: true
73-
args: ./docs/zh/* ./docs/en/* **/*.md
73+
args: ./docs/zh/* ./docs/en/*
7474

7575
- name: Fail if AutoCorrect found issues
7676
if: steps.autocorrect.outcome == 'failure'
@@ -92,6 +92,8 @@ jobs:
9292
files: |
9393
**/*.md
9494
**/*.mdx
95+
files_ignore: |
96+
.claude/**
9597
separator: ","
9698
- name: Check with Markdownlint
9799
uses: DavidAnson/markdownlint-cli2-action@v20

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ test/output.tmp
7474

7575
CMakeUserPresets.json
7676

77+
# TDGPT - WinSW cache (local binary, not committed to repo)
78+
tools/tdgpt/packaging/bin/WinSW.exe
79+
7780
.agents/
7881
skills-lock.json
7982
debug_coverage/

docs/.markdownlint-cli2.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"./custom-rules/no-angle-bracket-url.js",
2222
"./custom-rules/space-after-punctuation-in-emphasis.js"
2323
],
24-
"ignores": ["node_modules/**", "dist/**"] // 忽略路径
24+
"ignores": ["node_modules/**", "dist/**", ".claude/**"] // 忽略路径
2525
// Fix any fixable errors
2626
// "fix": true
2727
}

0 commit comments

Comments
 (0)