bcmd 0.2.8__tar.gz → 0.3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of bcmd might be problematic. Click here for more details.

Files changed (36) hide show
  1. {bcmd-0.2.8 → bcmd-0.3.4}/PKG-INFO +1 -1
  2. bcmd-0.3.4/bcmd/resources/project/.vscode/settings.json +76 -0
  3. {bcmd-0.2.8/bcmd/resources/project/src → bcmd-0.3.4/bcmd/resources/project}/.vscode/tasks.json +4 -4
  4. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/lib.py +10 -11
  5. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/proxy.py +1 -1
  6. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/venv.py +5 -6
  7. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd.egg-info/PKG-INFO +1 -1
  8. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd.egg-info/SOURCES.txt +4 -4
  9. {bcmd-0.2.8 → bcmd-0.3.4}/pyproject.toml +1 -1
  10. bcmd-0.2.8/bcmd/resources/project/src/.vscode/settings.json +0 -7
  11. {bcmd-0.2.8 → bcmd-0.3.4}/MANIFEST.in +0 -0
  12. {bcmd-0.2.8 → bcmd-0.3.4}/README.md +0 -0
  13. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/__init__.py +0 -0
  14. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/common/__init__.py +0 -0
  15. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/common/password.py +0 -0
  16. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/main.py +0 -0
  17. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/resources/project/.gitignore +0 -0
  18. {bcmd-0.2.8/bcmd/resources/project/src → bcmd-0.3.4/bcmd/resources/project}/.vscode/launch.json +0 -0
  19. {bcmd-0.2.8/bcmd/resources/project/src → bcmd-0.3.4/bcmd/resources/project}/main.py +0 -0
  20. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/__init__.py +0 -0
  21. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/bin.py +0 -0
  22. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/code.py +0 -0
  23. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/crypto.py +0 -0
  24. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/debian.py +0 -0
  25. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/download.py +0 -0
  26. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/image.py +0 -0
  27. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/json.py +0 -0
  28. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/math.py +0 -0
  29. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/mirror.py +0 -0
  30. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/project.py +0 -0
  31. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd/tasks/time.py +0 -0
  32. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd.egg-info/dependency_links.txt +0 -0
  33. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd.egg-info/entry_points.txt +0 -0
  34. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd.egg-info/requires.txt +0 -0
  35. {bcmd-0.2.8 → bcmd-0.3.4}/bcmd.egg-info/top_level.txt +0 -0
  36. {bcmd-0.2.8 → bcmd-0.3.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bcmd
3
- Version: 0.2.8
3
+ Version: 0.3.4
4
4
  Summary: Commands for Beni
5
5
  Author-email: Beni Mang <benimang@126.com>
6
6
  Maintainer-email: Beni Mang <benimang@126.com>
@@ -0,0 +1,76 @@
1
+ {
2
+ "files.exclude": {
3
+ ".pytest_cache": true,
4
+ "**/__pycache__": true,
5
+ ".gitignore": true,
6
+ ".venv": true,
7
+ ".venv-lock": true,
8
+ "venv": true,
9
+ },
10
+ "python.defaultInterpreterPath": "${workspaceFolder}/venv/Scripts/python.exe",
11
+ // coommon ------------------------------------------------------------------------------------
12
+ "window.menuBarVisibility": "classic", // 顶部中间
13
+ // "breadcrumbs.enabled": false, // 代码顶部导航
14
+ // "http.proxy": "http://localhost:15236",
15
+ "security.workspace.trust.enabled": false,
16
+ "redhat.telemetry.enabled": false,
17
+ "window.restoreWindows": "none",
18
+ "workbench.startupEditor": "none",
19
+ "files.eol": "\n",
20
+ "explorer.autoReveal": false, // 取消文件自动定位跟踪
21
+ "editor.renderWhitespace": "none", // 不高亮显示空白
22
+ "editor.unicodeHighlight.allowedLocales": { // 注释里的全角符号不提示警告
23
+ "zh-hans": true,
24
+ "zh-hant": true,
25
+ },
26
+ "github.copilot.enable": {
27
+ "*": true,
28
+ "plaintext": true,
29
+ "markdown": true,
30
+ "scminput": false,
31
+ "yaml": true
32
+ },
33
+ "github.copilot.editor.enableAutoCompletions": true,
34
+ "github.copilot.chat.localeOverride": "zh-CN",
35
+ "git.openRepositoryInParentFolders": "never",
36
+ "workbench.colorTheme": "Default Dark+",
37
+ "editor.stickyScroll.enabled": false,
38
+ "workbench.editor.enablePreview": false,
39
+ "window.commandCenter": false,
40
+ "editor.inlineSuggest.enabled": true,
41
+ "[markdown]": {
42
+ "editor.defaultFormatter": "yzhang.markdown-all-in-one"
43
+ },
44
+ // python -------------------------------------------------------------------------------------
45
+ "python.languageServer": "Pylance",
46
+ "python.analysis.autoImportCompletions": true,
47
+ "python.analysis.diagnosticMode": "workspace", // 针对整个workspace做检查提示
48
+ "python.analysis.typeCheckingMode": "strict",
49
+ "[python]": {
50
+ "editor.defaultFormatter": "ms-python.autopep8",
51
+ },
52
+ "autopep8.args": [
53
+ "--ignore=E501",
54
+ ],
55
+ "python.testing.pytestArgs": [
56
+ "test", // 指定单元测试查找的目录
57
+ "-s", // 支持print输出
58
+ ],
59
+ "python.testing.unittestEnabled": false,
60
+ "python.testing.pytestEnabled": false,
61
+ "python.analysis.diagnosticSeverityOverrides": {
62
+ "reportMissingTypeStubs": "none",
63
+ "reportUnknownMemberType": "none",
64
+ // "reportUnknownParameterType": "none",
65
+ // "reportUnknownVariableType": "none",
66
+ // "reportUnknownArgumentType": "none",
67
+ // "reportMatchNotExhaustive": "none", // match 没有匹配所有,会提示添加一个 _
68
+ // "reportUnusedCallResult": "warning",
69
+ "reportUnusedClass": "warning",
70
+ "reportUnusedCoroutine": "warning",
71
+ "reportUnusedFunction": "warning",
72
+ "reportUnusedImport": "warning",
73
+ "reportUnusedVariable": "warning",
74
+ "reportImportCycles": "warning",
75
+ },
76
+ }
@@ -7,7 +7,7 @@
7
7
  "command": "TortoiseGitProc.exe",
8
8
  "args": [
9
9
  "/command:commit",
10
- "/path:${workspaceFolder}/../",
10
+ "/path:${workspaceFolder}/",
11
11
  ],
12
12
  },
13
13
  {
@@ -25,7 +25,7 @@
25
25
  "command": "TortoiseGitProc.exe",
26
26
  "args": [
27
27
  "/command:revert",
28
- "/path:${workspaceFolder}/../",
28
+ "/path:${workspaceFolder}/",
29
29
  ],
30
30
  },
31
31
  {
@@ -43,7 +43,7 @@
43
43
  "command": "TortoiseGitProc.exe",
44
44
  "args": [
45
45
  "/command:sync",
46
- "/path:${workspaceFolder}/../",
46
+ "/path:${workspaceFolder}/",
47
47
  ],
48
48
  },
49
49
  {
@@ -52,7 +52,7 @@
52
52
  "command": "TortoiseGitProc.exe",
53
53
  "args": [
54
54
  "/command:log",
55
- "/path:${workspaceFolder}/../",
55
+ "/path:${workspaceFolder}/",
56
56
  ],
57
57
  },
58
58
  {
@@ -23,8 +23,8 @@ async def tidy_dependencies(
23
23
  workspace_path = Path.cwd()
24
24
  pyprojectTomlFile = workspace_path / 'pyproject.toml'
25
25
  btask.check(pyprojectTomlFile.is_file(), 'pyproject.toml 不存在', pyprojectTomlFile)
26
- targetVenvFileName = 'venv.lock' if with_version else 'venv.list'
27
- targetVenvFile = bpath.get(workspace_path, f'./../{targetVenvFileName}')
26
+ targetVenvFileName = '.venv-lock' if with_version else '.venv'
27
+ targetVenvFile = bpath.get(workspace_path, f'./{targetVenvFileName}')
28
28
  btask.check(targetVenvFile.is_file(), '文件不存在', targetVenvFile)
29
29
  libAry = (await bfile.readText(targetVenvFile)).strip().replace('\r\n', '\n').split('\n')
30
30
  oldContent = await bfile.readText(pyprojectTomlFile)
@@ -79,7 +79,7 @@ async def update_version(
79
79
  @app.command()
80
80
  @syncCall
81
81
  async def build(
82
- src_path: Path = typer.Argument(None, help='src 路径'),
82
+ workspace_path: Path = typer.Argument(None, help='workspace 路径'),
83
83
  keep_build_files: bool = typer.Option(False, '--keep-build-files', '-k', help='是否保留构建文件'),
84
84
  ):
85
85
  '发布项目'
@@ -87,22 +87,21 @@ async def build(
87
87
  # 获取用户名和密码
88
88
  u, p = await password.getPypi()
89
89
 
90
- if not src_path:
91
- src_path = Path.cwd()
92
- src_path = src_path.resolve()
90
+ if not workspace_path:
91
+ workspace_path = Path.cwd()
92
+ workspace_path = workspace_path.resolve()
93
93
 
94
94
  def removeUnusedPath():
95
- bpath.remove(src_path / 'dist')
96
- paths = bpath.listDir(src_path)
95
+ bpath.remove(workspace_path / 'dist')
96
+ paths = bpath.listDir(workspace_path)
97
97
  for x in paths:
98
98
  if x.name.endswith('.egg-info'):
99
99
  bpath.remove(x)
100
100
 
101
101
  try:
102
- with bpath.changePath(src_path):
102
+ with bpath.changePath(workspace_path):
103
103
  removeUnusedPath()
104
- scriptPath = (src_path / './../venv/Scripts').resolve()
105
- os.system(f'{scriptPath / "pip.exe"} install setuptools -U -i https://mirrors.aliyun.com/pypi/simple')
104
+ scriptPath = (workspace_path / './venv/Scripts').resolve()
106
105
  os.system(f'{scriptPath / "python.exe"} -m build')
107
106
  os.system(f'{scriptPath / "twine.exe"} upload dist/* -u {u} -p {p}')
108
107
  finally:
@@ -17,7 +17,7 @@ async def proxy(
17
17
  port: int = typer.Option(15236, help="代理服务器端口"),
18
18
  ):
19
19
  '生成终端设置代理服务器的命令'
20
- processNameAry = []
20
+ processNameAry:list[str] = []
21
21
  process = psutil.Process().parent()
22
22
  while process:
23
23
  processNameAry.append(process.name())
@@ -24,6 +24,7 @@ async def venv(
24
24
  disabled_mirror: bool = typer.Option(False, '--disabled-mirror', '-d', help='是否禁用镜像'),
25
25
  new_project: bool = typer.Option(False, '--new-project', '-n', help='是否新建项目'),
26
26
  quiet: bool = typer.Option(False, '--quiet', '-q', help='是否安静模式'),
27
+ no_lock: bool = typer.Option(False, '--no-lock', help='是否不使用.venv-lock文件来安装(使用在不同系统上增量安装)'),
27
28
  ):
28
29
  'python 虚拟环境配置'
29
30
  path = path or Path(os.getcwd())
@@ -42,14 +43,14 @@ async def venv(
42
43
  await binput.confirm('指定目录为非venv目录,是否确认新创建?')
43
44
  if not venvPath.exists():
44
45
  await bexecute.run(f'python -m venv {venvPath}')
45
- venvLockFile = bpath.get(path, 'venv.lock')
46
+ venvLockFile = bpath.get(path, '.venv-lock')
46
47
  assertFile(venvLockFile)
47
- venvListFile = bpath.get(path, 'venv.list')
48
+ venvListFile = bpath.get(path, '.venv')
48
49
  assertFile(venvListFile)
49
50
  if not venvListFile.exists():
50
51
  await bfile.writeText(venvListFile, '')
51
52
  await tidyVenvFile(venvListFile, packages)
52
- if venvLockFile.exists():
53
+ if venvLockFile.exists() and not no_lock:
53
54
  await tidyVenvFile(venvLockFile, packages)
54
55
  targetFile = venvLockFile
55
56
  else:
@@ -69,10 +70,8 @@ async def venv(
69
70
  )
70
71
  # 新建项目
71
72
  if new_project:
72
- with bpath.changePath(path):
73
- await bexecute.run('beni venv --quiet')
74
73
  with importlib.resources.path('bcmd.resources', 'project') as sourceProjectPath:
75
- for p in bpath.listDir(sourceProjectPath):
74
+ for p in bpath.listPath(sourceProjectPath):
76
75
  bpath.copy(p, path / p.name)
77
76
  bcolor.printGreen('OK')
78
77
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bcmd
3
- Version: 0.2.8
3
+ Version: 0.3.4
4
4
  Summary: Commands for Beni
5
5
  Author-email: Beni Mang <benimang@126.com>
6
6
  Maintainer-email: Beni Mang <benimang@126.com>
@@ -12,10 +12,10 @@ bcmd.egg-info/top_level.txt
12
12
  bcmd/common/__init__.py
13
13
  bcmd/common/password.py
14
14
  bcmd/resources/project/.gitignore
15
- bcmd/resources/project/src/main.py
16
- bcmd/resources/project/src/.vscode/launch.json
17
- bcmd/resources/project/src/.vscode/settings.json
18
- bcmd/resources/project/src/.vscode/tasks.json
15
+ bcmd/resources/project/main.py
16
+ bcmd/resources/project/.vscode/launch.json
17
+ bcmd/resources/project/.vscode/settings.json
18
+ bcmd/resources/project/.vscode/tasks.json
19
19
  bcmd/tasks/__init__.py
20
20
  bcmd/tasks/bin.py
21
21
  bcmd/tasks/code.py
@@ -3,7 +3,7 @@
3
3
 
4
4
  [project]
5
5
  name = 'bcmd'
6
- version = '0.2.8'
6
+ version = '0.3.4'
7
7
  description = 'Commands for Beni'
8
8
  requires-python = '>=3.10'
9
9
  keywords = ['benimang', 'beni', 'bcmd']
@@ -1,7 +0,0 @@
1
- {
2
- "files.exclude": {
3
- ".pytest_cache": true,
4
- "**/__pycache__": true,
5
- },
6
- "python.defaultInterpreterPath": "${workspaceFolder}/../venv/Scripts/python.exe",
7
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes