generated from ProtossDragoon/vscode-py-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Continuous Integration
committed
May 25, 2024
1 parent
9e2d355
commit a4bb9fc
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Model Validation for Autosink Project | ||
|
||
[🇬🇧](README.md) | [🇰🇷](README.kr.md) | [🇨🇳](README.zh-CN.md) | ||
|
||
The environment is based on MacOS and Linux. | ||
|
||
## `Makefile` | ||
|
||
The `Makefile` has the following functions. | ||
|
||
### `make lint` | ||
|
||
- To use the `.vscode` settings, install the `pylint` extension. | ||
- It overrides the options specified in the `pyproject.toml` file in the default settings of the linter and lints the code. | ||
|
||
### `make format` | ||
|
||
- The formatter uses Google's `yapf`. | ||
- It overrides the options specified in the `pyproject.toml` file in the default settings of the `yapf` formatter and formats the code. | ||
- To use the `.vscode` settings, install the `yapf` extension. | ||
|
||
### `make test` | ||
|
||
- It uses `unittest` for testing. | ||
- It supports both `test_*.py` and `*_test.py` patterns. | ||
- The test file must be connected to `__init__.py` up to the location where the test file exists. | ||
|
||
### `make publish` | ||
|
||
- Write the `~/.pypirc` file as follows. | ||
``` | ||
[pypi] | ||
username = __token__ | ||
password = pypi-something # Obtain and write your personal API token. | ||
``` | ||
- When this command is executed, it pushes the package to the PyPI public registry using `flit`. | ||
- The previously specified name `myproject` (alias) will be uploaded, allowing anyone worldwide to install and use the package with `python3 -m pip install myproject`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Autosink 项目的模型验证 | ||
|
||
[🇬🇧](README.md) | [🇰🇷](README.kr.md) | [🇨🇳](README.zh-CN.md) | ||
|
||
环境以 MacOS、Linux 为基准。 | ||
|
||
## `Makefile` | ||
|
||
`Makefile` 包含以下功能。 | ||
|
||
### `make lint` | ||
|
||
- 若要使用 `.vscode` 设置,请安装 `pylint` 扩展。 | ||
- 通过覆盖 linter 的默认设置来对代码进行 lint,使用在 `pyproject.toml` 文件中指定的选项。 | ||
|
||
### `make format` | ||
|
||
- 使用谷歌的 `yapf` 作为格式化工具。 | ||
- 通过覆盖 `yapf` 格式化器的默认设置来对代码进行格式化,使用在 `pyproject.toml` 文件中指定的选项。 | ||
- 若要使用 `.vscode` 设置,请安装 `yapf` 扩展。 | ||
|
||
### `make test` | ||
|
||
- 使用 `unittest` 进行测试。 | ||
- 支持 `test_*.py` 和 `*_test.py` 模式。 | ||
- 测试文件必须与 `__init__.py` 相连接到测试文件所在的位置。 | ||
|
||
### `make publish` | ||
|
||
- 请按以下格式编写 `~/.pypirc` 文件。 | ||
``` | ||
[pypi] | ||
username = __token__ | ||
password = pypi-xxx # 请获取个人 API 令牌并填写 | ||
``` | ||
- 运行此命令将使用 `flit` 将包推送到 PyPI 公共注册表。 | ||
- 上传后,您可以通过指定的名称 `myproject`(别名)在全球范围内使用 `python3 -m pip install myproject` 安装并使用该软件包。 |