Skip to content

Commit 31bb109

Browse files
committed
update: revise README and supporting documentation for clarity
1 parent dbd47fe commit 31bb109

File tree

7 files changed

+129
-72
lines changed

7 files changed

+129
-72
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,16 @@ __pycache__/
1313
*.egg-info/
1414
*.egg
1515
*.whl
16+
prd/
17+
1618

1719
redis/tls
1820
redis/data
1921

22+
# Kubernetes deployment files
23+
k8s/00-secrets-deploy.yaml
24+
k8s/02-netpulse-deploy.yaml
25+
2026
*.pid
2127
*.lock
2228
drafts/

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,36 @@ After setup, the commit message template will be automatically loaded when runni
101101

102102
Please use GitHub Issues to report bugs or request features.
103103

104+
## Version Management
105+
106+
NetPulse uses a **Single Source of Truth** approach for version management:
107+
108+
### How It Works
109+
110+
- **Version Definition**: Version numbers are defined in `pyproject.toml` (and `netpulse-client/pyproject.toml` for the client SDK)
111+
- **Automatic Reading**: Code automatically reads version from installed package metadata using `importlib.metadata`
112+
- **Development Fallback**: If package is not installed (development mode), a fallback version is used
113+
114+
### Updating Version Numbers
115+
116+
**For Production Releases** (package installed):
117+
1. Update `version = "x.y.z"` in `pyproject.toml`
118+
2. Update `version = "x.y.z"` in `netpulse-client/pyproject.toml` (if needed)
119+
3. Reinstall the package: `pip install -e .`
120+
4. Code will automatically use the new version
121+
122+
**For Development Consistency** (optional but recommended):
123+
- Also update the fallback version in `netpulse/__init__.py` and `netpulse-client/netpulse_client/__init__.py` to match
124+
125+
### Version Files
126+
127+
- `pyproject.toml` - Main project version (primary source)
128+
- `netpulse-client/pyproject.toml` - Client SDK version (primary source)
129+
- `netpulse/__init__.py` - Auto-reads from package metadata (fallback for dev mode)
130+
- `netpulse-client/netpulse_client/__init__.py` - Auto-reads from package metadata (fallback for dev mode)
131+
132+
**Note**: In most cases, you only need to update `pyproject.toml` files. The code will automatically use the correct version after package installation.
133+
104134
## Questions?
105135

106136
Feel free to open a discussion or contact the maintainers.

README-zh.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ NetPulse 是一个专为现代网络自动化设计的高性能分布式网络
1111

1212
## 为什么选择 NetPulse?
1313

14-
![NetPulse 项目价值](docs/zh/assets/images/architecture/project-value-proposition.svg)
14+
![NetPulse 项目价值](docs/assets/images/architecture/project-value-proposition.svg)
1515

1616
## 系统特性
1717

@@ -23,7 +23,7 @@ NetPulse 是一个专为现代网络自动化设计的高性能分布式网络
2323

2424
### 技术架构
2525

26-
![NetPulse 系统架构](docs/zh/assets/images/architecture/workflow-overview111.svg)
26+
![NetPulse 系统架构](docs/zh/assets/images/architecture/workflow-overview.svg)
2727

2828
### 插件系统
2929

@@ -57,7 +57,7 @@ NetPulse 提供了详细的文档,包括快速入门、架构说明、API参
5757

5858
```bash
5959
# 克隆项目
60-
git clone https://github.com/netpulse/netpulse.git
60+
git clone https://github.com/scitix/netpulse.git
6161
cd netpulse
6262

6363
# 一键部署
@@ -121,7 +121,6 @@ curl -X POST http://localhost:9000/device/execute \
121121
* 📚 **[文档](https://netpulse.readthedocs.io/)** - 完整指南和API参考
122122
* 🐛 **[问题反馈](https://github.com/scitix/netpulse/issues)** - 报告bug和请求功能
123123

124-
https://github.com/scitix/netpulse
125124
## 开源协议
126125

127126
本项目采用 MIT 协议 - 详见 [LICENSE](LICENSE) 文件。

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ NetPulse is a high-performance distributed network device management API framewo
1111

1212
## Why NetPulse?
1313

14-
![NetPulse Value Proposition](docs/en/assets/images/architecture/project-value-proposition-en.svg)
14+
![NetPulse Value Proposition](docs/assets/images/architecture/project-value-proposition-en.svg)
1515

1616
## System Features
1717

@@ -57,7 +57,7 @@ NetPulse provides comprehensive documentation including quick start guides, arch
5757

5858
```bash
5959
# Clone the repository
60-
git clone https://github.com/netpulse/netpulse.git
60+
git clone https://github.com/scitix/netpulse.git
6161
cd netpulse
6262

6363
# One-click deployment

config/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ worker:
1818
redis:
1919
host: redis
2020
port: 6379
21-
password: p@$$Sw0rd!
21+
password: ${NETPULSE_REDIS__PASSWORD}
2222
timeout: 30
2323
keepalive: 30
2424
tls:
@@ -31,7 +31,7 @@ redis:
3131
host: redis-sentinel
3232
port: 26379
3333
master_name: mymaster
34-
password: p@$$Sw0rd!
34+
password: ${NETPULSE_REDIS__SENTINEL__PASSWORD}
3535
key:
3636
host_to_node_map: netpulse:host_to_node_map
3737
node_info_map: netpulse:node_info_map

mkdocs.yml

Lines changed: 85 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ theme:
2323
- content.code.annotate
2424
- navigation.footer
2525
- navigation.tracking
26+
- navigation.indexes
27+
- navigation.prune
28+
29+
# 目录配置 - 限制只显示一级和二级标题
30+
toc:
31+
depth: 2
32+
33+
# 自定义样式
34+
custom_dir: docs/overrides
2635
palette:
2736
- media: "(prefers-color-scheme)"
2837
scheme: default
@@ -38,15 +47,13 @@ theme:
3847
toggle:
3948
icon: material/brightness-7
4049
name: 切换主题
41-
logo: assets/images/logo.png
50+
logo: assets/images/logo.svg
4251
favicon: assets/images/favicon.ico
4352

4453
# 插件配置
4554
plugins:
4655
- search
4756
- i18n:
48-
default_language: en
49-
default_language_only: true
5057
docs_structure: folder
5158
languages:
5259
- locale: zh
@@ -56,36 +63,37 @@ plugins:
5663
nav_translations:
5764
Home: 首页
5865
Getting Started: 快速开始
59-
Quick Start: 快速入门
60-
First Steps: 第一个API调用
66+
Quick Start: 快速开始
67+
Basic Concepts: 基础概念
6168
Deployment Guide: 部署指南
62-
User Guides: 使用指南
69+
Postman Guide: Postman 使用
6370
API Reference: API参考
64-
CLI Tools: CLI工具
65-
SDK Guide: SDK指南
66-
Postman Collection: Postman集合
67-
Configuration: 配置管理
68-
Advanced Features: 高级功能
69-
Batch Operations: 批量操作
70-
Template System: 模板系统
71-
Webhook Configuration: Webhook配置
72-
Performance Tuning: 性能调优
73-
Architecture: 系统架构
71+
API Overview: API概览
72+
Device Operation API: 设备操作API
73+
Template Operation API: 模板操作API
74+
Job Management API: 任务管理API
75+
API Examples: API示例
76+
API Best Practices: API最佳实践
77+
Driver Usage: 驱动使用
78+
Driver Selection: 驱动选择
79+
Netmiko Driver: Netmiko驱动
80+
NAPALM Driver: NAPALM驱动
81+
PyEAPI Driver: PyEAPI驱动
82+
Technical Architecture: 技术架构
7483
Architecture Overview: 架构概览
75-
Architecture Design: 架构设计
76-
Long Connection Technology: 长连接技术
77-
Task Schedulers: 任务调度器
78-
Driver System: 驱动系统
79-
Webhook System: Webhook系统
8084
Plugin System: 插件系统
81-
Reference: 参考文档
85+
Driver System: 设备驱动系统
86+
Template System: 模板系统
87+
Scheduler System: 任务调度器
88+
Webhook System: Webhook系统
89+
Reference Manual: 参考手册
90+
Configuration Guide: 配置指南
8291
Environment Variables: 环境变量
8392
Error Codes: 错误代码
84-
Best Practices: 最佳实践
85-
Troubleshooting: 故障排除
86-
Log Analysis: 日志分析
87-
Development: 开发指南
88-
Development Guide: 开发文档
93+
Performance Tuning: 性能调优
94+
Glossary: 术语表
95+
Troubleshooting: 故障排查
96+
Development Guide: 开发指南
8997
- locale: en
9098
name: English
9199
default: true
@@ -105,51 +113,57 @@ markdown_extensions:
105113
- attr_list
106114
- admonition
107115
- pymdownx.details
108-
- pymdownx.superfences
109116
- pymdownx.emoji
110117
- pymdownx.tabbed
111118
- pymdownx.tasklist
112119
- pymdownx.caret
113120
- pymdownx.smartsymbols
114121
- pymdownx.arithmatex:
115122
generic: true
123+
124+
# 目录扩展 - 限制只显示一级和二级标题
125+
- toc:
126+
permalink: true
127+
title: 目录
128+
baselevel: 1
129+
toc_depth: 2
116130

117-
# 导航配置
131+
# 导航配置 - 基于默认语言(英文)文档结构
132+
# i18n 插件会自动为其他语言生成对应的导航
118133
nav:
119-
- Home: index.md
134+
- Home: en/index.md
120135
- Getting Started:
121-
- Quick Start: getting-started/quick-start.md
122-
- First Steps: getting-started/first-steps.md
123-
- Deployment Guide: getting-started/deployment.md
124-
- User Guides:
125-
- API Reference: guides/api.md
126-
- CLI Tools: guides/cli.md
127-
- SDK Guide: guides/sdk-guide.md
128-
- Postman Collection: guides/postman-collection.md
129-
- Configuration: guides/configuration.md
130-
- Advanced Features:
131-
- Batch Operations: advanced/batch-operations.md
132-
- Template System: advanced/templates.md
133-
- Webhook Configuration: advanced/webhooks.md
134-
- Performance Tuning: advanced/performance-tuning.md
135-
- Architecture:
136-
- Architecture Overview: architecture/overview.md
137-
- Architecture Design: architecture/architecture.md
138-
- Long Connection Technology: architecture/long-connection.md
139-
- Task Schedulers: architecture/schedulers.md
140-
- Driver System: architecture/drivers.md
141-
- Template System: architecture/templates.md
142-
- Webhook System: architecture/webhooks.md
143-
- Plugin System: architecture/plugins.md
144-
- Reference:
145-
- Configuration: reference/configuration.md
146-
- Environment Variables: reference/environment-variables.md
147-
- Error Codes: reference/error-codes.md
148-
- Best Practices: reference/best-practices.md
149-
- Troubleshooting:
150-
- Log Analysis: troubleshooting/log-analysis.md
151-
- Development:
152-
- Development Guide: development/index.md
136+
- Quick Start: en/getting-started/quick-start.md
137+
- Basic Concepts: en/getting-started/basic-concepts.md
138+
- Deployment Guide: en/getting-started/deployment-guide.md
139+
- Postman Guide: en/getting-started/postman-guide.md
140+
- API Reference:
141+
- API Overview: en/api/api-overview.md
142+
- Device Operation API: en/api/device-api.md
143+
- Template Operation API: en/api/template-api.md
144+
- Job Management API: en/api/job-api.md
145+
- API Examples: en/api/api-examples.md
146+
- API Best Practices: en/api/api-best-practices.md
147+
- Driver Usage:
148+
- Driver Selection: en/drivers/index.md
149+
- Netmiko Driver: en/drivers/netmiko.md
150+
- NAPALM Driver: en/drivers/napalm.md
151+
- PyEAPI Driver: en/drivers/pyeapi.md
152+
- Technical Architecture:
153+
- Architecture Overview: en/architecture/architecture-overview.md
154+
- Plugin System: en/architecture/plugin-system.md
155+
- Driver System: en/architecture/driver-system.md
156+
- Template System: en/architecture/template-system.md
157+
- Scheduler System: en/architecture/scheduler-system.md
158+
- Webhook System: en/architecture/webhook-system.md
159+
- Reference Manual:
160+
- Configuration Guide: en/reference/configuration-guide.md
161+
- Environment Variables: en/reference/environment-variables.md
162+
- Error Codes: en/reference/error-codes.md
163+
- Performance Tuning: en/reference/performance-tuning.md
164+
- Glossary: en/reference/glossary.md
165+
- Troubleshooting: en/reference/troubleshooting.md
166+
- Development Guide: en/reference/development-guide.md
153167

154168
# 额外配置
155169
extra:
@@ -160,6 +174,14 @@ extra:
160174
analytics:
161175
provider: google
162176
property: !ENV GOOGLE_ANALYTICS_KEY
177+
178+
alternate:
179+
- name: 中文
180+
link: /zh/
181+
lang: zh
182+
- name: English
183+
link: /
184+
lang: en
163185

164186
# 版权信息
165-
copyright: Copyright © 2025 NetPulse Team
187+
copyright: Copyright © 2025 NetPulse Team

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "netpulse"
7-
version = "0.1.0"
7+
version = "0.1.1"
88
description = "API Server for Network Devices"
99
authors = [
1010
{ name = "Yongkun Li", email = "[email protected]" },

0 commit comments

Comments
 (0)