diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 70aff70..f246395 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -39,4 +39,4 @@ version-resolver: - 'security' exclude-labels: - - 'skip-changelog' \ No newline at end of file + - 'skip-changelog' diff --git a/.github/workflows/check-pr-title.yml b/.github/workflows/check-pr-title.yml index 84ce2a7..4454309 100644 --- a/.github/workflows/check-pr-title.yml +++ b/.github/workflows/check-pr-title.yml @@ -15,4 +15,4 @@ jobs: steps: - uses: amannn/action-semantic-pull-request@v6 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml index 1a7c2de..27253bc 100644 --- a/.github/workflows/pr-auto-label.yml +++ b/.github/workflows/pr-auto-label.yml @@ -47,7 +47,7 @@ jobs: // 检查第一个单词或前缀是否匹配关键词 for (const word of words) { const normalizedWord = word.toLowerCase().replace(/^[\W_]+|[\W_]+$/g, ''); - + if (keywordMap.hasOwnProperty(normalizedWord)) { labelsToAdd.add(keywordMap[normalizedWord]); break; // 找到第一个匹配就停止 @@ -79,4 +79,4 @@ jobs: labels: labelsArray }); console.log('New labels added successfully'); - } \ No newline at end of file + } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8ce95aa..5b9848e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,5 +3,60 @@ repos: rev: v6.0.0 # Use the ref you want to point at hooks: - id: check-added-large-files -# - id: trailing-whitespace -# - id: check-yaml \ No newline at end of file + - id: check-ast + - id: check-builtin-literals + - id: check-case-conflict + - id: check-docstring-first + - id: check-executables-have-shebangs + - id: check-illegal-windows-names + - id: check-json + - id: check-shebang-scripts-are-executable + exclude: | + (?x)^( + gvasp/slurm.submit| + tests/module/gzy.vtst.conTS.submit| + tests/submit.script| + auto_conda.sh| + gvasp/gvasp-bash-completion.sh + )$ + - id: pretty-format-json + args: [ --autofix ] + - id: check-merge-conflict + - id: check-symlinks + - id: check-toml + - id: check-vcs-permalinks + - id: check-xml + - id: check-yaml + exclude: | + (?x)^( + conda/meta.yaml + )$ + - id: debug-statements + - id: destroyed-symlinks + - id: detect-aws-credentials + args: [ --allow-missing-credentials ] + - id: detect-private-key + - id: double-quote-string-fixer + - id: end-of-file-fixer + - id: file-contents-sorter + - id: fix-byte-order-marker + - id: forbid-new-submodules + - id: forbid-submodules + - id: mixed-line-ending + - id: name-tests-test + args: [ --pytest-test-first ] + exclude: | + (?x)^( + tests/modify_config.py| + tests/add_font.py| + tests/plot_center/dos_plot.py| + tests/utils.py + )$ + - id: no-commit-to-branch + - id: requirements-txt-fixer + - id: sort-simple-yaml + - id: trailing-whitespace + - repo: https://github.com/asottile/pyupgrade + rev: v3.20.0 + hooks: + - id: pyupgrade diff --git a/.readthedocs.yaml b/.readthedocs.yaml index d66d529..5f69a4a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -29,4 +29,4 @@ python: install: - requirements: requirements.txt # - method: setuptools - # path: . \ No newline at end of file + # path: . diff --git a/docs/source/conf.py b/docs/source/conf.py index e167e60..dadbb9f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -31,26 +31,26 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.viewcode', - 'myst_parser', + 'sphinx.ext.autodoc', + 'sphinx.ext.viewcode', + 'myst_parser', 'sphinxcontrib.inkscapeconverter', 'sphinxcontrib.jquery'] myst_enable_extensions = [ - "amsmath", - "colon_fence", - "deflist", - "dollarmath", - "fieldlist", - "html_admonition", - "html_image", - "linkify", - "replacements", - "smartquotes", - "strikethrough", - "substitution", - "tasklist", + 'amsmath', + 'colon_fence', + 'deflist', + 'dollarmath', + 'fieldlist', + 'html_admonition', + 'html_image', + 'linkify', + 'replacements', + 'smartquotes', + 'strikethrough', + 'substitution', + 'tasklist', ] # Add any paths that contain templates here, relative to this directory. @@ -82,4 +82,4 @@ latex_elements = { 'preamble': '\\usepackage[UTF8]{ctex}\n', 'extraclassoptions': 'openany,oneside', -} \ No newline at end of file +} diff --git a/docs/source/development.rst b/docs/source/development.rst index 27f83c3..5d56ff7 100644 --- a/docs/source/development.rst +++ b/docs/source/development.rst @@ -19,4 +19,4 @@ development/migration.md development/sphinx.md development/codecov.md - development/bug.md \ No newline at end of file + development/bug.md diff --git a/docs/source/development/MANIFEST.in b/docs/source/development/MANIFEST.in index 7d8d5f1..aae1da7 100644 --- a/docs/source/development/MANIFEST.in +++ b/docs/source/development/MANIFEST.in @@ -1 +1 @@ -recursive-include gvasp/pot POTCAR *.bindat \ No newline at end of file +recursive-include gvasp/pot POTCAR *.bindat diff --git a/docs/source/development/migration.md b/docs/source/development/migration.md index 09972f8..3b22598 100644 --- a/docs/source/development/migration.md +++ b/docs/source/development/migration.md @@ -4,4 +4,4 @@ ```bash conda pack -n gvasp -o gvasp.tar.gz -``` \ No newline at end of file +``` diff --git a/docs/source/development/mirror.rst b/docs/source/development/mirror.rst index 4c413ed..6b8fcbe 100644 --- a/docs/source/development/mirror.rst +++ b/docs/source/development/mirror.rst @@ -14,12 +14,12 @@ The conda tool can modify its original mirrors by modify the :file:`~/.condrc`, - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 -Pip Mirror +Pip Mirror ----------- The pip tool can modify its original mirrors by add a :file:`~/.pip/pip.conf`, for example: .. code-block:: bash - + [global] - index-url = https://mirrors.aliyun.com/pypi/simple \ No newline at end of file + index-url = https://mirrors.aliyun.com/pypi/simple diff --git a/docs/source/development/package.rst b/docs/source/development/package.rst index f027058..bfed0af 100644 --- a/docs/source/development/package.rst +++ b/docs/source/development/package.rst @@ -221,4 +221,4 @@ Install package can do this: conda install package -重新安装同版本的包时,加入参数 :code:`--force-reinstall` \ No newline at end of file +重新安装同版本的包时,加入参数 :code:`--force-reinstall` diff --git a/docs/source/development/version.md b/docs/source/development/version.md index acdba67..2a939a3 100644 --- a/docs/source/development/version.md +++ b/docs/source/development/version.md @@ -25,13 +25,13 @@ pip install bumpversion [bumpversion] current_version = 0.1.4 parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P.*))? -serialize = +serialize = {major}.{minor}.{patch}.{release} {major}.{minor}.{patch} [bumpversion:part:release] optional_value = gamma -values = +values = alpha beta gamma diff --git a/docs/source/game.rst b/docs/source/game.rst index 9d3a153..cd4bfb4 100644 --- a/docs/source/game.rst +++ b/docs/source/game.rst @@ -7,4 +7,4 @@ :maxdepth: 1 :caption: 目录 - game/dst.md \ No newline at end of file + game/dst.md diff --git a/docs/source/language.rst b/docs/source/language.rst index 532afec..04a135a 100644 --- a/docs/source/language.rst +++ b/docs/source/language.rst @@ -11,4 +11,4 @@ language/vi.md language/powershell.md language/python.rst - language/go.md \ No newline at end of file + language/go.md diff --git a/docs/source/language/python.rst b/docs/source/language/python.rst index 6191ead..7be94d0 100644 --- a/docs/source/language/python.rst +++ b/docs/source/language/python.rst @@ -9,4 +9,4 @@ Python 教程 matplotlib.md pyquery.md - pytest.md \ No newline at end of file + pytest.md diff --git a/docs/source/math.md b/docs/source/math.md index cb76943..ce01265 100644 --- a/docs/source/math.md +++ b/docs/source/math.md @@ -32,8 +32,8 @@ $$ M &= e^{\tilde{w}θ} \\ &= I + \tilde{w}sinθ+\tilde{w}^2(1-cosθ) \\ &= \begin{bmatrix} - cosθ+w_x^2(1-cosθ) & w_xw_y(1-cosθ)-w_zsinθ & w_ysinθ+w_xw_z(1-cosθ) \\ - w_zsinθ+w_xw_y(1-cosθ) & cosθ+w_y^2(1-cosθ) & w_yw_z(1-cosθ)-w_xsinθ \\ + cosθ+w_x^2(1-cosθ) & w_xw_y(1-cosθ)-w_zsinθ & w_ysinθ+w_xw_z(1-cosθ) \\ + w_zsinθ+w_xw_y(1-cosθ) & cosθ+w_y^2(1-cosθ) & w_yw_z(1-cosθ)-w_xsinθ \\ w_xw_z(1-cosθ)-w_ysinθ & w_xsinθ+w_yw_z(1-cosθ) & cosθ+w_z^2(1-cosθ) \end{bmatrix} \end{aligned} diff --git a/docs/source/others.rst b/docs/source/others.rst index 07cfec4..6ae822f 100644 --- a/docs/source/others.rst +++ b/docs/source/others.rst @@ -8,4 +8,4 @@ others/qbittorrent.md others/telegram.md others/win.md - others/mac.md \ No newline at end of file + others/mac.md diff --git a/requirements.txt b/requirements.txt index 1d89476..0812bd8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ myst-parser myst-parser[linkify] sphinx_rtd_theme -sphinxcontrib-svg2pdfconverter \ No newline at end of file +sphinxcontrib-svg2pdfconverter