Skip to content

Commit e1edd65

Browse files
authored
Merge pull request #76 from Alinvor/kernel
[DONE]合并分支
2 parents 2e4695e + 43602d3 commit e1edd65

File tree

5 files changed

+141
-37
lines changed

5 files changed

+141
-37
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ tox-quickstart
311311

312312
```bash
313313
tox
314+
315+
# the recommend
316+
tox --result-json ./Temp/tox/tox_result.json
314317
```
315318

316319
### 4.5 twine version

Temp/bash/bash_or_ps1.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
- [1.2.3. dist](#123-dist)
99
- [1.2.4. log](#124-log)
1010

11+
> 平常工作和生活当中, 需要跨系统, 跨语言, 跨环境, 好多都需要笔录的方式记忆下来(已超出个体记忆能力), 好记性不如烂笔头, 故整理后续参考;
12+
1113
## 一. 删除缓存
1214

1315
### 1.1. pyc and pycache

Temp/bash/python_command.md

Lines changed: 105 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,145 @@
11
# 常用命令
22

3-
- [一. pip](#一-pip)
4-
- [1.1. pip --editable](#11-pip---editable)
5-
- [1.2. pip list or freeze](#12-pip-list-or-freeze)
6-
- [1.3. pip install](#13-pip-install)
7-
- [1.3.1. pip install -r requirements.txt](#131-pip-install--r-requirementstxt)
8-
- [1.3.2. pip install xxx](#132-pip-install-xxx)
9-
- [二. flake8](#二-flake8)
3+
- [一. 规则](#一-规则)
4+
- [二. pip](#二-pip)
5+
- [2.1. pip --editable](#21-pip---editable)
6+
- [2.2. pip list or freeze](#22-pip-list-or-freeze)
7+
- [2.3. pip install](#23-pip-install)
8+
- [2.3.1. pip install -r requirements.txt](#231-pip-install--r-requirementstxt)
9+
- [2.3.2. pip install xxx](#232-pip-install-xxx)
10+
- [三. flake8](#三-flake8)
11+
- [四. tox](#四-tox)
12+
- [4.1. tox --version](#41-tox---version)
13+
- [4.2. tox --help](#42-tox---help)
14+
- [4.3. tox --help-ini](#43-tox---help-ini)
15+
- [4.4. tox --showconfig](#44-tox---showconfig)
16+
- [4.4. tox --result-json](#44-tox---result-json)
1017

11-
## 一. pip
18+
> 平常工作和生活当中, 需要跨系统, 跨语言, 跨环境, 好多都需要笔录的方式记忆下来(已超出个体记忆能力), 好记性不如烂笔头, 故整理后续参考;
1219
13-
### 1.1. pip --editable
20+
## 一. 规则
21+
22+
1. `./Temp/archives/record/*` 目录下的帮助文档统一格式命名为: `yyyy_MMdd_xyz.txt`;
23+
2. `./Temp/*/*` 目录下的帮助文档统一格式命名为: `python[2|3]_xyz.txt`, 如若`定版``定稿`需求, 帮助文档统一格式命名为: `yyyy_python[2|3]_xyz.txt``yyyy_MMdd_python[2|3]_xyz.txt`;
24+
25+
此规则适用于如下`目录`:
26+
27+
- `./Temp/help/*`
28+
- `./Temp/txt/*`
29+
30+
## 二. pip
31+
32+
### 2.1. pip --editable
1433

1534
```bash
1635
pip2 install -e .
1736
pip3 install -e .
1837
```
1938

20-
### 1.2. pip list or freeze
39+
### 2.2. pip list or freeze
2140

2241
```bash
2342
# pip list
24-
pip2 list > ./Temp/txt/pip2_list.txt
25-
pip3 list > ./Temp/txt/pip3_list.txt
26-
pip2 list > ./Temp/txt/2021_pip2_list.txt
27-
pip3 list > ./Temp/txt/2021_pip3_list.txt
43+
pip2 list > ./Temp/txt/python2_pip2_list.txt
44+
pip3 list > ./Temp/txt/python3_pip3_list.txt
45+
python2 -m pip2 list > ./Temp/txt/2021_python2_pip2_list.txt
46+
python3 -m pip3 list > ./Temp/txt/2021_python3_pip3_list.txt
2847
# pip freeze
29-
pip2 freeze > ./Temp/txt/pip2_freeze.txt
30-
pip3 freeze > ./Temp/txt/pip3_freeze.txt
31-
pip2 freeze > ./Temp/txt/2021_pip2_freeze.txt
32-
pip3 freeze > ./Temp/txt/2021_pip3_freeze.txt
48+
pip2 freeze > ./Temp/txt/python2_pip2_freeze.txt
49+
pip3 freeze > ./Temp/txt/python3_pip3_freeze.txt
50+
python2 -m pip2 freeze > ./Temp/txt/2021_python2_pip2_freeze.txt
51+
python3 -m pip3 freeze > ./Temp/txt/2021_python3_pip3_freeze.txt
3352
```
3453

35-
### 1.3. pip install
54+
### 2.3. pip install
3655

37-
#### 1.3.1. pip install -r requirements.txt
56+
#### 2.3.1. pip install -r requirements.txt
3857

3958
```bash
4059
# the base component requirements
4160
pip2 install -r ./requirements.txt
4261
pip3 install -r ./requirements.txt
4362

63+
python2 -m pip2 install -r ./requirements.txt
64+
python3 -m pip3 install -r ./requirements.txt
65+
4466
# the base chain component requirements
4567
pip2 install -r ./Temp/archives/material/requirements.txt
4668
pip3 install -r ./Temp/archives/material/requirements.txt
69+
70+
python2 -m pip2 install -r ./Temp/archives/material/requirements.txt
71+
python3 -m pip3 install -r ./Temp/archives/material/requirements.txt
4772
```
4873

49-
#### 1.3.2. pip install xxx
74+
#### 2.3.2. pip install xxx
5075

5176
```bash
5277
pip2 install xxx
5378
pip3 install xxx
5479
```
5580

56-
## . flake8
81+
## . flake8
5782

5883
```bash
5984

60-
flake8 ./src/ > ./Temp/flake8_recorder.txt
85+
flake8 ./src/ > ./Temp/flake8/python2_flake8_recorder.txt
86+
flake8 ./src/ > ./Temp/flake8/python3_flake8_recorder.txt
87+
6188
flake8 --exclude [*.pyc] ./src/
62-
flake8 --exclude [*.pyc] ./src/ > ./Temp/flake8_recorder.txt
63-
flake8 --help > ./Temp/flake8_help.txt
89+
flake8 --exclude [*.pyc] ./src/ > ./Temp/flake8/python2_flake8_recorder.txt
90+
flake8 --exclude [*.pyc] ./src/ > ./Temp/flake8/python3_flake8_recorder.txt
91+
92+
flake8 --help > ./Temp/help/python2_flake8_help.txt
93+
flake8 --help > ./Temp/help/python3_flake8_help.txt
94+
```
95+
96+
## 四. tox
97+
98+
```bash
99+
tox --verbose
100+
101+
python2 -m tox --verbose > ./Temp/help/python2_tox_verbose.txt
102+
python3 -m tox --verbose > ./Temp/help/python3_tox_verbose.txt
103+
```
104+
105+
### 4.1. tox --version
106+
107+
```bash
108+
tox --version
109+
```
110+
111+
### 4.2. tox --help
112+
113+
```bash
114+
tox --help
115+
116+
python2 -m tox --help > ./Temp/help/python2_tox_help.txt
117+
python3 -m tox --help > ./Temp/help/python3_tox_help.txt
118+
```
119+
120+
### 4.3. tox --help-ini
121+
122+
```bash
123+
tox --help-ini
124+
125+
python2 -m tox --help-ini > ./Temp/help/python2_tox_help_ini.txt
126+
python3 -m tox --help-ini > ./Temp/help/python3_tox_help_ini.txt
127+
```
128+
129+
### 4.4. tox --showconfig
130+
131+
```bash
132+
tox --showconfig
133+
134+
python2 -m tox --showconfig > ./Temp/help/python2_tox_show_config.txt
135+
python3 -m tox --showconfig > ./Temp/help/python3_tox_show_config.txt
136+
```
137+
138+
### 4.4. tox --result-json
139+
140+
```bash
141+
tox --result-json
64142

143+
python2 -m tox --result-json > ./Temp/help/python2_tox_result_json.txt
144+
python3 -m tox --result-json > ./Temp/help/python3_tox_result_json.txt
65145
```

doc/project_help/the_global_rules.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
11
# 规则
22

33
- [一. 说明](#一-说明)
4-
- [二. 源码](#二-源码)
5-
- [三. 调试](#三-调试)
6-
- [3.1. System 环境变量](#31-system-环境变量)
7-
- [3.2. VSCode PYTHONPATH](#32-vscode-pythonpath)
8-
- [3.3. inline import](#33-inline-import)
9-
- [四. 测试](#四-测试)
4+
- [二. 文档](#二-文档)
5+
- [2.1. 规则文档](#21-规则文档)
6+
- [2.2. 命令文档](#22-命令文档)
7+
- [三. 源码](#三-源码)
8+
- [四. 调试](#四-调试)
9+
- [4.1. System 环境变量](#41-system-环境变量)
10+
- [4.2. VSCode PYTHONPATH](#42-vscode-pythonpath)
11+
- [4.3. inline import](#43-inline-import)
12+
- [五. 测试](#五-测试)
1013

1114
## 一. 说明
1215

1316
本文档适用于全局性规则要义;
1417

15-
## 二. 源码
18+
## 二. 文档
19+
20+
### 2.1. 规则文档
21+
22+
pass
23+
24+
### 2.2. 命令文档
25+
26+
1. [【Command】bash or ps1](../../Temp/bash/bash_or_ps1.md)
27+
2. [【Command】python script](../../Temp/bash/python_command.md)
28+
29+
## 三. 源码
1630

1731
1. 统一采用`com.dvsnier` 命名空间;
1832
2. 包结构,统一定义: `com.dvsnier.xxx`, 且`xxx` 包名称一定要和目录层次一一对应, 可以避免潜在无关紧要问题;
1933

20-
## . 调试
34+
## . 调试
2135

22-
### 3.1. System 环境变量
36+
### 4.1. System 环境变量
2337

2438
目前我们规定如下可选全局变量:
2539

@@ -42,7 +56,7 @@ export BASE_PROJECT_PREFIX="/Users/.../Python-DeMo"
4256
BASE_PROJECT_PREFIX="D:\\...\\Python-DeMo"
4357
```
4458

45-
### 3.2. VSCode PYTHONPATH
59+
### 4.2. VSCode PYTHONPATH
4660

4761
VSCode 环境变量指定的默认配置选项为:
4862

@@ -83,7 +97,7 @@ PYTHONPATH=/Users/.../Python-DeMo:/Users/.../Python-DeMo/tests:${PYTHONPATH}
8397
PYTHONPATH=D:\\WorkSpace\\...\\Python-DeMo;D:\\WorkSpace\\...\\Python-DeMo\\tests;%PYTHONPATH%
8498
```
8599

86-
### 3.3. inline import
100+
### 4.3. inline import
87101

88102
**内联导入**:
89103

@@ -99,6 +113,6 @@ pip2 install -e .
99113
pip3 install -e .
100114
```
101115

102-
## . 测试
116+
## . 测试
103117

104118
1. 统一采用和源码空间统一的目录结构和命名空间形式;

template/test_template.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
# -*- coding:utf-8 -*-
22

3+
# import logging
34
import unittest
45

6+
# from com.dvsnier.config.journal.common_config import config
7+
58

69
class Test_XXX(unittest.TestCase):
710
''' the test xxx '''
811
@classmethod
912
def setUpClass(cls):
1013
print("...the set up...")
1114
print('')
15+
# kwargs = {'output_dir_name': 'log', 'file_name': 'config', 'level': logging.DEBUG}
16+
# cls._logging = config(kwargs)
1217

1318
def setUp(self):
1419
super(Test_XXX, self).setUp()

0 commit comments

Comments
 (0)