当前位置: 首页 > news >正文

如何购买网站域名域名查询平台

如何购买网站域名,域名查询平台,wordpress 外网无法访问,用腾讯云做网站的好处用了好几年poetry了,各方面都还挺满意,就是lock实在太慢; 已经试用pdmuv一段时间了,确实是快,也基本能覆盖poetry的功能。 至于为什么用pdmuv,而不是只用uv,原因很多,有兴趣的可以…

用了好几年poetry了,各方面都还挺满意,就是lock实在太慢;

已经试用pdm+uv一段时间了,确实是快,也基本能覆盖poetry的功能。

至于为什么用pdm+uv,而不是只用uv,原因很多,有兴趣的可以去看这个https://github.com/pdm-project/pdm/discussions/3388

1. 安装pdm、uv并换源

pip install --user --upgrade pipx
pipx install pdm uv
pdm config pypi.url https://mirrors.cloud.tencent.com/pypi/simple/
mkdir -p ~/.config/uv && echo -e '[[index]]\nurl="https://pypi.tuna.tsinghua.edu.cn/simple/"\ndefault = true' > ~/.config/uv/uv.toml

 2. 配置pdm全局使用uv

pdm config use_uv true

注:对于个别不想使用uv加速的项目,可以单独这样配置:pdm config --local use_uv true

3. 迁移poetry的pyproject.toml到pdm

- Old

[project]
name = "asynctor"
description = "Async functions to compare with anyio and asyncio, and toolkit to read excel with async/await."
authors = [{ name = "Waket Zheng", email = "waketzheng@gmail.com" }]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.9"
dynamic = [ "version" ]
dependencies = ["anyio>=3.7.1","eval-type-backport (>=0.2.2,<1.0.0); python_version < '3.10'",
]
# requires by anyio:
#    "exceptiongroup >= 1.0.2; python_version < '3.11'",
#    "typing_extensions >= 4.1; python_version < '3.11'",[project.optional-dependencies]
xls = ["pandas>=2.2.0", "openpyxl>=3.1.0"]
fastapi = ["redis", "fastapi>=0.115.0", "httpx>=0.28.1", "asgi-lifespan>=2.1.0"]
redis = ["redis>=5.0.0"][project.urls]
homepage = "https://github.com/waketzheng/asynctor"
repository = "https://github.com/waketzheng/asynctor.git"
"Bug Tracker" = "https://github.com/waketzheng/asynctor/issues"[tool.poetry]
version = "0"  # Managed by poetry-plugin-version[tool.poetry.group.dev.dependencies]
fast-dev-cli = "^0.15.1"
types-redis = "^4.6.0.20241004"
pandas-stubs = {version=">=2.2.0", python="^3.10"}
bandit = "^1.8.3"
pytest-mock = "^3.14.1"
fastapi-cdn-host = "^0.9.1"
uvicorn = "^0.34.3"[tool.poetry.group.ci.dependencies]
coveralls = {git = "https://github.com/waketzheng/coveralls-python", rev = "4.1.1", python="^3.9"}[tool.ruff]
line-length = 100[tool.ruff.lint]
extend-select = ["E",  # pycodestyle errors"W",  # pycodestyle warnings"F",  # pyflakes"I",  # isort"B",  # flake8-bugbear"C4", # flake8-comprehensions"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
][tool.ruff.lint.per-file-ignores]
"test_*.py" = ["E501"]
"scripts/test.py" = ["E501"]
"scripts/*.py" = ["UP009","UP032"][tool.mypy]
pretty = true
python_version = "3.9"
ignore_missing_imports = true
check_untyped_defs = true[tool.coverage.report]
omit = ["*/tests/*", "test_*"]
exclude_lines = ["pragma: no cover","@overload",'if __name__ == "__main__":',"if TYPE_CHECKING:",
][build-system]
requires = ["poetry-plugin-version"]
build-backend = "poetry_plugin_version.api"

- Diff

-[tool.poetry]
-version = "0"  # Managed by poetry-plugin-version
+[tool.pdm]
+version = {source="file", path="asynctor/__init__.py"}-[tool.poetry.group.dev.dependencies]
-fast-dev-cli = "^0.15.0"
-types-redis = "^4.6.0.20241004"
-pandas-stubs = {version=">=2.2.0", python="^3.10"}
-bandit = "^1.8.3"
-pytest-mock = "^3.14.0"
-fastapi-cdn-host = "^0.9.1"
-uvicorn = "^0.34.2"
-
-[tool.poetry.group.ci.dependencies]
-coveralls = {git = "https://github.com/waketzheng/coveralls-python", rev = "4.1.1", python="^3.9"}
+[dependency-groups]
+dev = [
+    "fast-dev-cli>=0.15.1",
+    "types-redis>=4.6.0.20241004",
+    "pandas-stubs",
+    "bandit>=1.8.3",
+    "pytest-mock>=3.14.1",
+    "fastapi-cdn-host>=0.9.1",
+    "uvicorn>=0.34.3",
+]
+ci = ["coveralls @ git+https://github.com/waketzheng/coveralls-python@4.1.1"][build-system]
-requires = ["poetry-plugin-version"]
-build-backend = "poetry_plugin_version.api"
+requires = ["pdm-backend"]
+build-backend = "pdm.backend"

- New

[project]
name = "asynctor"
description = "Async functions to compare with anyio and asyncio, and toolkit to read excel with async/await."
authors = [{ name = "Waket Zheng", email = "waketzheng@gmail.com" }]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.9"
dynamic = [ "version" ]
dependencies = ["anyio>=3.7.1","eval-type-backport (>=0.2.2,<1.0.0); python_version < '3.10'",
]
# requires by anyio:
#    "exceptiongroup >= 1.0.2; python_version < '3.11'",
#    "typing_extensions >= 4.1; python_version < '3.11'",[project.optional-dependencies]
xls = ["pandas>=2.2.0", "openpyxl>=3.1.0"]
fastapi = ["redis", "fastapi>=0.115.0", "httpx>=0.28.1", "asgi-lifespan>=2.1.0"]
redis = ["redis>=5.0.0"][project.urls]
homepage = "https://github.com/waketzheng/asynctor"
repository = "https://github.com/waketzheng/asynctor.git"
"Bug Tracker" = "https://github.com/waketzheng/asynctor/issues"[tool.pdm]
version = {source="file", path="asynctor/__init__.py"}[dependency-groups]
dev = ["fast-dev-cli>=0.15.1","types-redis>=4.6.0.20241004","pandas-stubs","bandit>=1.8.3","pytest-mock>=3.14.1","fastapi-cdn-host>=0.9.1","uvicorn>=0.34.3",
]
ci = ["coveralls @ git+https://github.com/waketzheng/coveralls-python@4.1.1"][tool.ruff]
line-length = 100[tool.ruff.lint]
extend-select = ["E",  # pycodestyle errors"W",  # pycodestyle warnings"F",  # pyflakes"I",  # isort"B",  # flake8-bugbear"C4", # flake8-comprehensions"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
][tool.ruff.lint.per-file-ignores]
"test_*.py" = ["E501"]
"scripts/test.py" = ["E501"]
"scripts/*.py" = ["UP009","UP032"][tool.mypy]
pretty = true
python_version = "3.9"
ignore_missing_imports = true
check_untyped_defs = true[tool.coverage.report]
omit = ["*/tests/*", "test_*"]
exclude_lines = ["pragma: no cover","@overload",'if __name__ == "__main__":',"if TYPE_CHECKING:",
][build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"

4. 修改Makefile为使用pdm

- diff

--- a/Makefile
+++ b/Makefile
@@ -11,17 +11,17 @@ help:@echo  "    lint    Auto-formats the code and check type hints"up:
-       poetry run fast upgrade
+       pdm run fast upgradedeps:
-       poetry install --all-extras
+       pdm install --verbose --group :all --without=ci --frozen_check:./scripts/check.pycheck: deps _build _check_lint:
-       poetry run fast lint
+       pdm run fast lint
lint: deps _build _lint_test:
@@ -33,7 +33,8 @@ _style:style: deps _style_build:
-       poetry build --clean
+       rm -fR dist/
+       pdm buildbuild: deps _buildci: check _build _test

5. 更新CI文件

--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -38,49 +38,26 @@ jobs:with:python-version: ${{ matrix.python-version }}allow-prereleases: true
-      - name: Load cached Poetry installation
-        id: cached-poetry
-        uses: actions/cache@v4
+      - uses: actions/cache@v4
+        id: cachewith:
-          path: ~/.local  # the path depends on the OS
-          key: poetry-0  # increment to reset cache
-      - name: Install Poetry
-        uses: snok/install-poetry@v1
+          path: ~/.cache/pip
+          key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('**/pdm.lock') }}
+      - name: Set up PDM
+        uses: pdm-project/setup-pdm@v4with:
-          virtualenvs-in-project: true
-          plugins: poetry-plugin-version
-      - name: Load cached venv
-        id: cached-poetry-dependencies
-        uses: actions/cache@v4
-        with:
-          path: .venv
-          key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('
**/poetry.lock') }}
-      #----------------------------------------------
-      # install dependencies if cache does not exist
-      #----------------------------------------------
-      - name: Install dependencies
-        if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
-        run: poetry install --no-interaction --no-root --all-extras --all-groups
-        env:
-          PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1
-      #----------------------------------------------
-      # install your root project, if package-mode is true
-      #----------------------------------------------
-      - name: Install library
-        run: poetry install --no-interaction
+          python-version: ${{ matrix.python-version }}- uses: astral-sh/ruff-action@v3
-      - name: Check code style and Type Hint
-        run: ./scripts/check.py
-      - name: build
-        run: poetry build
-      - name: Test with pytest
-        run: poetry run fast test
+      - name: Check code style and Type Hint then Test with pytest
+        run: make cienv:# The hostname used to communicate with the Redis service containerREDIS_HOST: localhost
+      - name: Install library
+        run: pdm sync -d -G :all- name: Upload Coveragerun: |
-          poetry run coveralls --service=github
+          pdm run coveralls --service=githubenv:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

http://www.cadmedia.cn/news/5129.html

相关文章:

  • 天津网站建设制作方案商品推广软文800字
  • 蛋糕网站模板app推广怎么做
  • 两岸统一最新消息网站seo服务
  • 青岛建设网站制作免费开店的电商平台
  • 编程手机软件百度问答优化
  • 巴彦淖尔市 网站建设学市场营销后悔死了
  • 衢州市网站建设互联网品牌营销公司
  • 办公用品网站建设策划书优化师是做什么的
  • 注册城乡规划师难度seo独立站优化
  • 手工做环保衣的网站安装百度到桌面
  • 如何绑定网站数字化营销怎么做
  • 哪个网站做课件能赚钱淘宝seo对什么内容优化
  • 学建筑的网站淘宝关键词优化工具
  • 网络营销与传统营销的区别是什么郑州seo顾问热狗
  • 阿里云最新消息伟哥seo博客
  • 网页制作公司专业seo引擎搜索网址
  • 旅游网站建设翻译合肥网站优化
  • 国外用的网站百度自动点击器下载
  • 营销网站建设有哪些公司泉州百度推广排名优化
  • 马云有没有学过做网站面点培训学校哪里有
  • 做动画的动作库网站seo优化论坛
  • seo在线网站诊断推推蛙seo职位招聘
  • 教育网站制作哪家服务好网站优化方案怎么写
  • 从化区住房和建设局网站seo快速排名优化方法
  • 建网站需要什么软件aso优化服务站
  • 唐山市网站建设流量推广平台
  • 东营市建设局网站最近新闻热点大事件
  • 寺庙网站开发建设方案seo手机关键词排行推广
  • web模板网站网站在线制作
  • 云浮市住房和城乡建设局网站中牟网络推广