mirror of
https://github.com/NewFuture/DDNS.git
synced 2026-10-20 19:56:34 +00:00
* Add unit tests for configuration loading and JSON handling - Introduced comprehensive unit tests for the ddns.config.__init__ module, covering various scenarios for the load_config function, including configuration merging, error handling, and CLI integration. - Created a new test suite for the JSON configuration module, validating loading, saving, and edge cases for JSON files. - Removed outdated SSL configuration tests that are no longer relevant to the current implementation. * feat(provider): add endpoint parameter to SimpleProvider and update user agent format feat(cli): add endpoint argument to load_config test(tests): add tests for endpoint handling and user agent formatting * feat(doc): add comprehensive configuration documentation for DDNS system * feat: Update environment variable handling and documentation - Changed default values for DDNS_INDEX4 and DDNS_INDEX6 from "default" to ["default"] in env.md and json.md. - Enhanced documentation for index4 and index6 to clarify handling of special prefixes (regex, cmd, shell) and their impact on splitting. - Updated schema to reflect new default values and added support for custom API endpoints and SSL settings. - Improved test coverage for environment variable handling, including special cases for proxy and SSL settings. - Refactored tests to ensure proper handling of environment variables and their precedence over defaults. - Minor adjustments to test cases for consistency and clarity. * fix config and tests * fix error * fix tests * fix tests * fix * Add comprehensive unit tests for configuration file loading - Introduced a new test suite for the configuration file loading module, covering JSON and AST parsing, fallback logic, error handling, and various edge cases. - Replaced references to `load_json_config` with `load_file_config` in existing tests to unify configuration loading methods. - Removed the outdated `test_config_json.py` file as its functionality is now covered in the new test suite. * Fix test_load_config_priority_order mock parameter names for clarity * Add main entry point for test execution in configuration tests * Enhance Config class to flatten single-element lists and improve configuration loading tests * fix tests * update tests * fix: 修复类型注释以支持 None 类型并更新测试用例描述 * fix lint * fix py2.7 * feat: 添加对51dns和aliesa的支持,并更新SSL参数处理 * Refactor unit tests for configuration modules - Updated test descriptions to specify the ddns.config.env and ddns.config.file modules. - Removed redundant comments and improved clarity in test cases. - Consolidated test cases for loading configurations from various sources, ensuring better readability and maintainability. - Enhanced edge case handling and validation in load_config tests. - Improved assertions and mock setups for better accuracy in testing configuration loading behavior. * fix unicode_literals * fix lint and tests * fix tests * fix py2 tests * fix tests and update doc * fix py2.7 test * fix py2 patch * 更新配置文件加载器,修复编码问题 * fix encoding for py2 * 更新 get_ip 函数参数,修改文档以支持阿里云ESA和No-IP自定义端点,添加多个DNS服务示例 * Refactor documentation for DNS providers: - Updated DNSpod documentation by removing redundant configuration examples and enhancing the complete configuration example. - Added English and Chinese documentation for HE.net (Hurricane Electric) with detailed configuration steps and troubleshooting tips. - Introduced English and Chinese documentation for Huawei Cloud DNS, including access key authentication and endpoint configuration. - Enhanced No-IP documentation by clarifying authentication methods and providing comprehensive configuration examples. - Improved Tencent Cloud DNS documentation with additional endpoint options and detailed permission requirements. * Add documentation for new DNS providers and update existing provider guides - Introduced Debug Provider documentation in both English and Chinese. - Added DNS.COM configuration guide in English and Chinese, including authentication methods and troubleshooting. - Updated DNSPod documentation to include separate guides for DNSPod China and DNSPod Global, with detailed configuration examples. - Revised HE.net documentation to streamline configuration examples and optional parameters. - Enhanced Huawei Cloud DNS documentation with clearer endpoint selection and optional parameters. - Updated No-IP documentation to clarify authentication methods and response codes. * Fix stdout and stderr encoding in test setup for compatibility with non-UTF-8 systems * Update environment variable documentation to remove dot-to-underscore conversion * Refactor configuration loading and error handling in ddns.config module - Removed logging in favor of direct stderr/stdout output for error messages. - Simplified the configuration generation logic in load_config. - Enhanced error handling for missing configuration files and invalid formats. - Updated unit tests to reflect changes in output handling and error scenarios. * update config document * fix lint * 更新 Python 配置文档,添加 GitHub Copilot 使用指南和配置生成逻辑,优化配置加载流程 * Refactor Config class to replace dict() method with md5() for generating hash of configurations; update tests to reflect changes in default values and utility methods. * Enhance environment variable handling in load_config function; prioritize DDNS_PROXY over standard proxies, and improve test coverage for proxy configurations and environment variable management. * 添加缓存模块及其测试用例,支持文件缓存功能;新增调试和回调配置文件,更新构建工作流以测试不同配置 * rename * 优化测试用例以确保在空配置情况下正确退出;使用临时目录避免干扰 * fix env test
13 lines
260 B
Python
13 lines
260 B
Python
# -*- coding:utf-8 -*-
|
|
"""
|
|
ddns Package
|
|
"""
|
|
|
|
__description__ = "automatically update DNS records to my IP [域名自动指向本机IP]"
|
|
|
|
# 编译时,版本会被替换
|
|
__version__ = "${BUILD_VERSION}"
|
|
|
|
# 时间也会被替换掉
|
|
build_date = "${BUILD_DATE}"
|