Skip to content
Myr

🔧 Refactor package manager, move from Flit to PDM, remove private pip extras for `test`, `doc`, `dev` (#764)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sebastián Ramírez · committed by GitHub · parent 0fc00e2 · Browse files · 8 files+124 added−81 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

8 files+124 added−81 removed

  • other:+124 added−81 removed

8 files+124 added−81 removed

modified:.github/workflows/build-docs.yml+14 added-14 removed
modified:.github/workflows/deploy-docs.yml+2 added-2 removed
modified:.github/workflows/publish.yml+26 added-10 removed
modified:.github/workflows/test.yml+29 added-16 removed
3 unmodified lines
4 push:5 branches:6 - master7 pull_request:8 types: [opened, synchronize]8 types:9 - opened10 - synchronize1112jobs:13 test:12 runs-on: ubuntu-20.0414 runs-on: ubuntu-latest15 strategy:16 matrix:17 python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]18 fail-fast: false1719 steps:20 - name: Dump GitHub context21 env:22 GITHUB_CONTEXT: ${{ toJson(github) }}23 run: echo "$GITHUB_CONTEXT"19 - uses: actions/checkout@v324 - uses: actions/checkout@v425 - name: Set up Python21 uses: actions/setup-python@v426 uses: actions/setup-python@v527 with:28 python-version: ${{ matrix.python-version }}24 - name: Install Flit25 run: pip install flit29 # Issue ref: https://github.com/actions/setup-python/issues/43630 # cache: "pip"31 # cache-dependency-path: pyproject.toml32 - uses: actions/cache@v333 id: cache34 with:35 path: ${{ env.pythonLocation }}36 key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}37 - name: Install Dependencies27 run: python -m flit install --symlink38 if: steps.cache.outputs.cache-hit != 'true'39 run: pip install -r requirements-tests.txt40 - name: Lint41 run: bash scripts/lint.sh42 - run: mkdir coverage43 - name: Test
9 unmodified lines
5354 coverage-combine:55 needs: [test]56 runs-on: ubuntu-latest4557 steps:47 - uses: actions/checkout@v34849 - uses: actions/setup-python@v458 - name: Dump GitHub context59 env:60 GITHUB_CONTEXT: ${{ toJson(github) }}61 run: echo "$GITHUB_CONTEXT"62 - uses: actions/checkout@v463 - uses: actions/setup-python@v564 with:65 python-version: '3.8'5266 # Issue ref: https://github.com/actions/setup-python/issues/43667 # cache: "pip"68 # cache-dependency-path: pyproject.toml69 - name: Get coverage files70 uses: actions/download-artifact@v371 with:72 name: coverage73 path: coverage5874 - run: pip install coverage[toml]6075 - run: ls -la coverage76 - run: coverage combine coverage77 - run: coverage report78 - run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}"6579 - name: Store coverage HTML80 uses: actions/upload-artifact@v381 with:82 name: coverage-html
17 unmodified lines
modified:pyproject.toml+20 added-39 removed
1[build-system]2requires = ["flit_core >=2,<3"]3build-backend = "flit_core.buildapi"2requires = ["pdm-backend"]3build-backend = "pdm.backend"45[tool.flit.metadata]6module = "typer"7author = "Sebastián Ramírez"8author-email = "tiangolo@gmail.com"9home-page = "https://github.com/tiangolo/typer"5[project]6name = "typer"7dynamic = ["version"]8description = "Typer, build great CLIs. Easy to code. Based on Python type hints."9authors = [10 {name = "Sebastián Ramírez", email = "tiangolo@gmail.com"},11]12readme = "README.md"13requires-python = ">=3.7"14classifiers = [15 "Intended Audience :: Information Technology",16 "Intended Audience :: System Administrators",17 "Operating System :: OS Independent",
11 unmodified lines
29 "Programming Language :: Python :: 3.8",30 "Programming Language :: Python :: 3.9",31 "Programming Language :: Python :: 3.10",32 "Programming Language :: Python :: 3.11",29 "License :: OSI Approved :: MIT License"30 ]31requires = [33 "License :: OSI Approved :: MIT License",34]35dependencies = [36 "click >= 8.0.0",37 "typing-extensions >= 3.7.4.3",38]35description-file = "README.md"36requires-python = ">=3.7"3938[tool.flit.metadata.urls]40[project.urls]41Documentation = "https://typer.tiangolo.com/"42homepage = "https://github.com/tiangolo/typer"4341[tool.flit.metadata.requires-extra]42test = [43 "shellingham >=1.3.0,<2.0.0",44 "pytest >=4.4.0,<8.0.0",45 "pytest-cov >=2.10.0,<5.0.0",46 "coverage >=6.2,<7.0",47 "pytest-xdist >=1.32.0,<4.0.0",48 "pytest-sugar >=0.9.4,<0.10.0",49 "mypy ==0.971",50 "black >=22.3.0,<23.0.0",51 "isort >=5.0.6,<6.0.0",52 "rich >=10.11.0,<14.0.0",53]54doc = [55 "mkdocs >=1.1.2,<2.0.0",56 "mkdocs-material >=8.1.4,<9.0.0",57 "mdx-include >=1.4.1,<2.0.0",58 "pillow >=9.3.0,<10.0.0",59 "cairosvg >=2.5.2,<3.0.0",60]61dev = [62 "autoflake >=1.3.1,<2.0.0",63 "flake8 >=3.8.3,<4.0.0",64 "pre-commit >=2.17.0,<3.0.0",65]44[project.optional-dependencies]45all = [46 "colorama >=0.4.3,<0.5.0",47 "shellingham >=1.3.0,<2.0.0",48 "rich >=10.11.0,<14.0.0",49]5051[tool.pdm]52version = { source = "file", path = "typer/__init__.py" }5354[tool.isort]55profile = "black"56known_third_party = ["typer", "click"]57skip_glob = [
12 unmodified lines
70filterwarnings = [71 "error",72 # TODO: until I refactor completion to use the new shell_complete73 "ignore:'autocompletion' is renamed to 'shell_complete'. The old name is deprecated and will be removed in Click 8.1. See the docs about 'Parameter' for information about new behavior.:DeprecationWarning:typer",92 'ignore:starlette.middleware.wsgi is deprecated and will be removed in a future release\..*:DeprecationWarning:starlette',74 # For pytest-xdist75 'ignore::DeprecationWarning:xdist',76]
added:requirements-docs.txt+17 added
1-e .23mkdocs-material==9.4.74mdx-include >=1.4.1,<2.0.05mkdocs-markdownextradata-plugin >=0.1.7,<0.3.06mkdocs-redirects>=1.2.1,<1.3.07pyyaml >=5.3.1,<7.0.08# For Material for MkDocs, Chinese search9jieba==0.42.110# For image processing by Material for MkDocs11pillow==10.1.012# For image processing by Material for MkDocs13cairosvg==2.7.014mkdocstrings[python]==0.23.015griffe-typingdoc==0.2.216# For griffe, it formats with black17black==23.3.0
added:requirements-tests.txt+10 added
1-e .[all]23pytest >=4.4.0,<8.0.04pytest-cov >=2.10.0,<5.0.05coverage[toml] >=6.2,<7.06pytest-xdist >=1.32.0,<4.0.07pytest-sugar >=0.9.4,<0.10.08mypy ==0.9719black >=22.3.0,<23.0.010isort >=5.0.6,<6.0.0
added:requirements.txt+6 added
1-e .[all]23-r requirements-tests.txt4-r requirements-docs.txt56pre-commit >=2.17.0,<4.0.0