From c23449d5ef8499012e71e68a0b10928aee291dd8 Mon Sep 17 00:00:00 2001 From: Ken Odegard Date: Wed, 17 Apr 2024 20:48:01 +0200 Subject: [PATCH] Add yamlfmt to pre-commit (#13811) --- .github/ISSUE_TEMPLATE/0_bug.yml | 1 - .github/ISSUE_TEMPLATE/1_feature.yml | 1 - .github/ISSUE_TEMPLATE/2_documentation.yml | 1 - .../ISSUE_TEMPLATE/2_speed_improvement.yml | 4 +- .github/ISSUE_TEMPLATE/epic.yml | 1 - .github/labels.yml | 238 +++++++++--------- .github/workflows/cla.yml | 1 - .github/workflows/durations.yml | 2 +- .github/workflows/issues.yml | 1 - .github/workflows/labels.yml | 1 - .github/workflows/lock.yml | 1 - .github/workflows/project.yml | 1 - .github/workflows/stale.yml | 1 - .github/workflows/tests.yml | 46 ++-- .github/workflows/upload.yml | 11 +- .pre-commit-config.yaml | 23 +- .readthedocs.yml | 2 +- docs/requirements.txt | 4 +- pyproject.toml | 166 ++++++------ recipe/conda_build_config.yaml | 10 +- 20 files changed, 268 insertions(+), 248 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/0_bug.yml b/.github/ISSUE_TEMPLATE/0_bug.yml index cfccd360edf..a53f6fba87d 100644 --- a/.github/ISSUE_TEMPLATE/0_bug.yml +++ b/.github/ISSUE_TEMPLATE/0_bug.yml @@ -1,4 +1,3 @@ ---- name: Bug Report description: Create a bug report. labels: diff --git a/.github/ISSUE_TEMPLATE/1_feature.yml b/.github/ISSUE_TEMPLATE/1_feature.yml index a1e739821dc..bc022b41226 100644 --- a/.github/ISSUE_TEMPLATE/1_feature.yml +++ b/.github/ISSUE_TEMPLATE/1_feature.yml @@ -1,4 +1,3 @@ ---- name: Feature Request description: Create a feature request. labels: diff --git a/.github/ISSUE_TEMPLATE/2_documentation.yml b/.github/ISSUE_TEMPLATE/2_documentation.yml index 68ae890de9d..f3ce0408927 100644 --- a/.github/ISSUE_TEMPLATE/2_documentation.yml +++ b/.github/ISSUE_TEMPLATE/2_documentation.yml @@ -1,4 +1,3 @@ ---- name: Documentation description: Create a documentation related issue. labels: diff --git a/.github/ISSUE_TEMPLATE/2_speed_improvement.yml b/.github/ISSUE_TEMPLATE/2_speed_improvement.yml index 7bdc4da8ec0..d6799866e95 100644 --- a/.github/ISSUE_TEMPLATE/2_speed_improvement.yml +++ b/.github/ISSUE_TEMPLATE/2_speed_improvement.yml @@ -1,6 +1,8 @@ name: Speed Improvement description: If you think Conda could be faster -labels: ['type::feature', 'tag::performance'] +labels: + - type::feature + - tag::performance body: - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/epic.yml b/.github/ISSUE_TEMPLATE/epic.yml index eca723f4b6d..9b3637f9737 100644 --- a/.github/ISSUE_TEMPLATE/epic.yml +++ b/.github/ISSUE_TEMPLATE/epic.yml @@ -1,4 +1,3 @@ ---- name: Epic description: A collection of related tickets. labels: diff --git a/.github/labels.yml b/.github/labels.yml index 6bc4461f436..09a2b4f9706 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -1,138 +1,124 @@ # Builds -- name: build::review - description: trigger a build for this PR - color: "7B4052" + - name: build::review + description: trigger a build for this PR + color: '#7b4052' # Types -- name: type::installer - description: indicates a request or issue pertaining to the installer - color: "fff2cc" -- name: type::packaging - description: indicates a request regarding a package - color: "fff2cc" + - name: type::installer + description: indicates a request or issue pertaining to the installer + color: '#fff2cc' + - name: type::packaging + description: indicates a request regarding a package + color: '#fff2cc' # Solver -- name: solver - description: pertains to the solver - color: "d4c5f9" - aliases: [tag-solver] -- name: solver::messaging - description: pertains to the solver's messaging - color: "d4c5f9" - aliases: [tag-solver_messaging] -- name: solver::performance - description: pertains to the solver's performance - color: "d4c5f9" - aliases: [tag-solver_performance] -- name: solver::behavior - description: pertains to the solver's behavior - color: "d4c5f9" - aliases: [tag-solver_behavior] -- name: solver::libmamba - description: pertains to the libmamba solver - color: "d4c5f9" - aliases: [tag-solver_libmamba] -- name: solver::pycosat - description: pertains to the pycosat solver - color: "d4c5f9" - aliases: [] + - name: solver + description: pertains to the solver + color: '#d4c5f9' + aliases: [tag-solver] + - name: solver::messaging + description: pertains to the solver's messaging + color: '#d4c5f9' + aliases: [tag-solver_messaging] + - name: solver::performance + description: pertains to the solver's performance + color: '#d4c5f9' + aliases: [tag-solver_performance] + - name: solver::behavior + description: pertains to the solver's behavior + color: '#d4c5f9' + aliases: [tag-solver_behavior] + - name: solver::libmamba + description: pertains to the libmamba solver + color: '#d4c5f9' + aliases: [tag-solver_libmamba] + - name: solver::pycosat + description: pertains to the pycosat solver + color: '#d4c5f9' # CLI -- name: cli - description: pertains to the CLI interface - color: "91E4E5" - aliases: [type-shell] -- name: cli::cmd - description: pertains to the CLI in CMD - color: "91E4E5" - aliases: [type-shell-cmd] -- name: cli::fish - description: pertains to the CLI in fish - color: "91E4E5" - aliases: [type-shell-fish] -- name: cli::posix - description: pertains to the CLI in Posix compliant shells (e.g. Bash, Zsh, KornShell, etc.) - color: "91E4E5" - aliases: [type-shell-posix] -- name: cli::powershell - description: pertains to the CLI in PowerShell - color: "91E4E5" - aliases: [type-shell-powershell] -- name: cli::tcsh - description: pertains to the CLI in tcsh/CSH - color: "91E4E5" - aliases: [type-shell-tcsh] -- name: cli::xonsh - description: pertains to the CLI in Xonsh - color: "91E4E5" - aliases: [type-shell-xonsh] + - name: cli + description: pertains to the CLI interface + color: '#91e4e5' + aliases: [type-shell] + - name: cli::cmd + description: pertains to the CLI in CMD + color: '#91e4e5' + aliases: [type-shell-cmd] + - name: cli::fish + description: pertains to the CLI in fish + color: '#91e4e5' + aliases: [type-shell-fish] + - name: cli::posix + description: pertains to the CLI in Posix compliant shells (e.g. Bash, Zsh, KornShell, etc.) + color: '#91e4e5' + aliases: [type-shell-posix] + - name: cli::powershell + description: pertains to the CLI in PowerShell + color: '#91e4e5' + aliases: [type-shell-powershell] + - name: cli::tcsh + description: pertains to the CLI in tcsh/CSH + color: '#91e4e5' + aliases: [type-shell-tcsh] + - name: cli::xonsh + description: pertains to the CLI in Xonsh + color: '#91e4e5' + aliases: [type-shell-xonsh] # Plugins -- name: plugins - description: pertains to a plugin/subcommand - color: "386BAF" - aliases: [tag-plugins] -- name: plugins::env - description: pertains to conda-env - color: "386BAF" - aliases: [tag-conda_env, tag-environment_spec, "tag::environment-spec"] -- name: plugins::run - description: pertains to conda-run - color: "386BAF" - aliases: [tag-conda_run] -- name: plugins::create - description: pertains to conda-create - color: "386BAF" - aliases: [tag-clone] -- name: plugins::config - description: pertains to conda-config - color: "386BAF" - aliases: [tag-config] -- name: plugins::activate - description: pertains to conda-activate or conda-deactivate - color: "386BAF" -- name: plugins::init - description: pertains to conda-init - color: "386BAF" + - name: plugins + description: pertains to a plugin/subcommand + color: '#386baf' + aliases: [tag-plugins] + - name: plugins::env + description: pertains to conda-env + color: '#386baf' + aliases: + - tag-conda_env + - tag-environment_spec + - tag::environment-spec + - name: plugins::run + description: pertains to conda-run + color: '#386baf' + aliases: [tag-conda_run] + - name: plugins::create + description: pertains to conda-create + color: '#386baf' + aliases: [tag-clone] + - name: plugins::config + description: pertains to conda-config + color: '#386baf' + aliases: [tag-config] + - name: plugins::activate + description: pertains to conda-activate or conda-deactivate + color: '#386baf' + - name: plugins::init + description: pertains to conda-init + color: '#386baf' # Tags -- name: tag::ssl - description: related to an SSL issue - color: "86C579" - aliases: [] -- name: tag::compatibility - description: related to compatibility issues with other software - color: "86C579" - aliases: [] -- name: tag::auth + - name: tag::ssl + description: related to an SSL issue + color: '#86c579' + - name: tag::compatibility + description: related to compatibility issues with other software + color: '#86c579' + - name: tag::auth # description: - color: "86C579" - aliases: [] -- name: tag::artifact-verification - description: related to artifact verification and related content trust issues - color: "86C579" - aliases: [] -- name: tag::pip - description: related to conda-pip issues - color: "86C579" - aliases: [] -- name: tag::multi-user - description: related to shared/multi-user installs - color: "86C579" - aliases: [] -- name: tag::experimental - description: related to an experimental feature - color: "86C579" - aliases: [] -- name: tag::update - description: related to an upgrade issue - color: "86C579" - aliases: [] - -# Deprecated -- name: priority-high - description: "[deprecated] use severity::*" - color: "888888" -- name: priority-low - description: "[deprecated] use severity::*" - color: "888888" + color: '#86c579' + - name: tag::artifact-verification + description: related to artifact verification and related content trust issues + color: '#86c579' + - name: tag::pip + description: related to conda-pip issues + color: '#86c579' + - name: tag::multi-user + description: related to shared/multi-user installs + color: '#86c579' + - name: tag::experimental + description: related to an experimental feature + color: '#86c579' + - name: tag::update + description: related to an upgrade issue + color: '#86c579' diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 0f793ef038c..07c7f75b125 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -1,4 +1,3 @@ ---- name: CLA on: diff --git a/.github/workflows/durations.yml b/.github/workflows/durations.yml index c86e2c8ee9c..4b767d59157 100644 --- a/.github/workflows/durations.yml +++ b/.github/workflows/durations.yml @@ -4,7 +4,7 @@ on: # every Sunday at 00:00 UTC # https://crontab.guru/#0_0_*_*_0 schedule: - - cron: '0 0 * * 0' + - cron: 0 0 * * 0 # https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch workflow_dispatch: diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index 8391b0ee683..7a114d6d415 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -1,4 +1,3 @@ ---- name: Automate Issues on: diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 45cb754d33e..f13985fb0a3 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -1,4 +1,3 @@ ---- name: Sync Labels on: diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index c4294bea310..2204b62dda2 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -1,4 +1,3 @@ ---- name: Lock on: diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index e1d5d4de39b..7d06584c863 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -1,4 +1,3 @@ ---- name: Add to Project on: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index cfc95287181..bcda1fea30e 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,4 +1,3 @@ ---- name: Stale on: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a29f28806db..cfcfd0e1400 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -108,7 +108,8 @@ jobs: run-post: false # skip post cleanup - name: Conda Install - run: conda install + run: > + conda install --yes --file tests\requirements.txt --file tests\requirements-${{ runner.os }}.txt @@ -130,7 +131,8 @@ jobs: - name: Run Tests # Windows is sensitive to long paths, using `--basetemp=${{ runner.temp }} to # keep the test directories shorter - run: pytest + run: > + pytest --cov=conda --basetemp=${{ runner.temp }} --durations-path=tools\durations\${{ runner.os }}.json @@ -212,7 +214,8 @@ jobs: run-post: false # skip post cleanup - name: Conda Install - run: conda install + run: > + conda install --yes --file tests/requirements.txt --file tests/requirements-${{ runner.os }}.txt @@ -232,7 +235,8 @@ jobs: run: conda list --show-channel-urls - name: Run Tests - run: pytest + run: > + pytest --cov=conda --durations-path=tools/durations/${{ runner.os }}.json --group=${{ matrix.test-group }} @@ -295,7 +299,8 @@ jobs: run-post: false # skip post cleanup - name: Conda Install - run: conda install + run: > + conda install --yes --file tests/requirements.txt --file tests/requirements-${{ runner.os }}.txt @@ -343,12 +348,14 @@ jobs: fail-fast: false matrix: python-version: ['3.12'] - image: ['continuumio/miniconda3:latest', 'condaforge/miniforge3:latest'] + image: + - continuumio/miniconda3:latest + - condaforge/miniforge3:latest platform: [arm64, ppc64le, s390x] exclude: - - image: 'continuumio/miniconda3:latest' + - image: continuumio/miniconda3:latest platform: ppc64le - - image: 'condaforge/miniforge3:latest' + - image: condaforge/miniforge3:latest platform: s390x steps: @@ -361,7 +368,8 @@ jobs: uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 - name: Run Tests - run: docker run + run: > + docker run --rm --volume ${PWD}:/opt/conda-src --workdir /opt/conda-src @@ -371,12 +379,12 @@ jobs: ". /opt/conda/etc/profile.d/conda.sh && set -x && conda create - --name test - --yes - --file tests/requirements.txt - --file tests/requirements-${{ runner.os }}.txt - --file tests/requirements-ci.txt - python=${{ matrix.python-version }} + --name test + --yes + --file tests/requirements.txt + --file tests/requirements-${{ runner.os }}.txt + --file tests/requirements-ci.txt + python=${{ matrix.python-version }} && conda activate test && python -m conda info --verbose && conda config --show-sources @@ -450,7 +458,8 @@ jobs: architecture: ${{ runner.arch }} - name: Conda Install - run: conda install + run: > + conda install --yes --file tests/requirements.txt --file tests/requirements-ci.txt @@ -469,7 +478,8 @@ jobs: run: conda list --show-channel-urls - name: Run Tests - run: pytest + run: > + pytest --cov=conda --durations-path=tools/durations/${{ runner.os }}.json --group=${{ matrix.test-group }} @@ -544,7 +554,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.CONDA_ISSUES }} RUN_ID: ${{ github.run_id }} - TITLE: "Tests failed" + TITLE: Tests failed with: filename: .github/TEST_FAILURE_REPORT_TEMPLATE.md update_existing: false diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml index f456e926b17..7d4819f8e8e 100644 --- a/.github/workflows/upload.yml +++ b/.github/workflows/upload.yml @@ -24,7 +24,7 @@ jobs: if: '!github.event.repository.fork' runs-on: ubuntu-latest env: - ARCHIVE_NAME: "${{ github.event.repository.name }}-${{ github.ref_name }}" + ARCHIVE_NAME: ${{ github.event.repository.name }}-${{ github.ref_name }} steps: - name: Checkout Source uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 @@ -33,20 +33,23 @@ jobs: run: mkdir -p release - name: Archive Source - run: git archive + run: > + git archive --prefix="${{ env.ARCHIVE_NAME }}/" --output="release/${{ env.ARCHIVE_NAME }}.tar.gz" HEAD - name: Compute Checksum - run: sha256sum "release/${{ env.ARCHIVE_NAME }}.tar.gz" + run: > + sha256sum "release/${{ env.ARCHIVE_NAME }}.tar.gz" | awk '{print $1}' > "release/${{ env.ARCHIVE_NAME }}.tar.gz.sha256sum" - name: Upload Archive env: GH_TOKEN: ${{ github.token }} - run: gh release upload + run: > + gh release upload --clobber "${{ github.ref_name }}" --repo "${{ github.repository }}" release/* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 97fdf9d6468..e6536fadf55 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,7 +40,11 @@ repos: - id: check-merge-conflict # sort requirements files - id: file-contents-sorter - files: ^tests/requirements.*\.txt + files: | + (?x)^( + docs/requirements.txt | + tests/requirements.*\.txt + ) args: [--unique] # Python verification and formatting - repo: https://github.com/Lucas-C/pre-commit-hooks @@ -68,6 +72,23 @@ repos: args: [--fix] # compatible replacement for black - id: ruff-format + - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks + rev: v2.13.0 + hooks: + - id: pretty-format-toml + args: [--autofix, --trailing-commas] + - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt + rev: 0.2.3 + hooks: + - id: yamlfmt + # ruamel.yaml doesn't line wrap correctly (?) so set width to 1M to avoid issues + args: [--mapping=2, --offset=2, --sequence=4, --width=1000000, --implicit_start] + exclude: | + (?x)^( + .authors.yml | + recipe/meta.yaml | + tests/ + ) - repo: https://github.com/python-jsonschema/check-jsonschema rev: 0.28.2 hooks: diff --git a/.readthedocs.yml b/.readthedocs.yml index 033a437e928..ec667c92b91 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,7 +4,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.10" + python: '3.10' jobs: post_checkout: # Unshallow the git clone to make sure we can identify the version diff --git a/docs/requirements.txt b/docs/requirements.txt index 78f9ddab762..9968ee25583 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,8 +1,9 @@ +Pillow==10.1.0 +Sphinx<8 boltons==23.1.1 conda-sphinx-theme==0.2.1 linkify-it-py==2.0.2 myst-parser==2.0.0 -Pillow==10.1.0 pluggy==1.3.0 pylint==3.0.2 requests==2.31.0 @@ -13,7 +14,6 @@ sphinx-autobuild==2021.3.14 sphinx-reredirects==0.1.3 sphinx-sitemap==2.5.1 sphinx_design==0.5.0 -Sphinx<8 sphinxcontrib-applehelp==1.0.7 sphinxcontrib-devhelp==1.0.5 sphinxcontrib-htmlhelp==2.0.4 diff --git a/pyproject.toml b/pyproject.toml index 027ddd558aa..9db0aefba70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,34 +50,26 @@ name = "conda" readme = "README.md" requires-python = ">=3.8" +[project.scripts] +conda = "conda.cli.main_pip:main" + [project.urls] changelog = "https://github.com/conda/conda/blob/main/CHANGELOG.md" documentation = "https://docs.conda.io/projects/conda/en/stable/" repository = "https://github.com/conda/conda" -[project.scripts] -conda = "conda.cli.main_pip:main" - -[tool.hatch.version] -source = "vcs" - -[tool.hatch.version.raw-options] -local_scheme = "dirty-tag" - -[tool.hatch.build] -include = ["conda", "conda_env"] - -[tool.hatch.build.hooks.vcs] -version-file = "conda/_version.py" - -[tool.coverage.run] -# store relative paths in coverage information -relative_files = true - [tool.coverage.report] -show_missing = true -sort = "Miss" -skip_covered = true +exclude_lines = [ + "pragma: no cover", + "pragma: py$PYTHON_MAJOR_VERSION no cover", + "pragma: $TEST_PLATFORM no cover", + "raise AssertionError", + "raise NotImplementedError", + "if __name__ == .__main__.:", + "def __repr__", + '\s*\.\.\.$', + "if TYPE_CHECKING:", # ignoring type checking imports +] omit = [ "*/site-packages/*", '*\site-packages\*', @@ -92,59 +84,27 @@ omit = [ "tests/*", "utils/*", ] -exclude_lines = [ - "pragma: no cover", - "pragma: py$PYTHON_MAJOR_VERSION no cover", - "pragma: $TEST_PLATFORM no cover", - "raise AssertionError", - "raise NotImplementedError", - "if __name__ == .__main__.:", - "def __repr__", - '\s*\.\.\.$', - "if TYPE_CHECKING:", # ignoring type checking imports -] +show_missing = true +skip_covered = true +sort = "Miss" -[tool.ruff] -exclude = ["conda/_vendor", "conda/auxlib", "tests/data/conda_format_repo", "tests/data/env_metadata", "tools/vendoring"] -target-version = "py38" +[tool.coverage.run] +# store relative paths in coverage information +relative_files = true -[tool.ruff.lint] -# E, W = pycodestyle errors and warnings -# F = pyflakes -# I = isort -# D = pydocstyle -# UP = pyupgrade -# ISC = flake8-implicit-str-concat -# TCH = flake8-type-checking -# T10 = flake8-debugger -# FA = flake8-future-annotations -# see also https://docs.astral.sh/ruff/rules/ -select = ["E", "W", "F", "I", "D1", "UP", "ISC", "TCH", "T10", "FA"] -# E402 module level import not at top of file -# E501 line too long -# E722 do not use bare 'except' -# E731 do not assign a lambda expression, use a def -# D101 Missing docstring in public class -# D102 Missing docstring in public method -# D103 Missing docstring in public function -# D104 Missing docstring in public package -# D105 Missing docstring in magic method -# D107 Missing docstring in `__init__` -ignore = ["E402", "E501", "E722", "E731", "D101", "D102", "D103", "D104", "D105", "D107"] -extend-per-file-ignores = {"docs/*" = ["D1"], "tests/*" = ["D1"]} -pydocstyle = {convention = "pep257"} -flake8-type-checking = {exempt-modules = [], strict = true} +[tool.hatch.build] +include = ["conda", "conda_env"] + +[tool.hatch.build.hooks.vcs] +version-file = "conda/_version.py" + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.version.raw-options] +local_scheme = "dirty-tag" [tool.pytest.ini_options] -minversion = 3.0 -testpaths = ["tests"] -norecursedirs = [ - "tests/data/*", - "tests/integration/*", - "tests/plugins/data/*", - "docs", - ".git", -] addopts = [ "--color=yes", # "--cov=conda", # passed in test runner scripts instead (avoid debugger) @@ -173,18 +133,72 @@ markers = [ "slow: slow running tests", "benchmark: benchmark tests", ] +minversion = 3.0 +norecursedirs = [ + "tests/data/*", + "tests/integration/*", + "tests/plugins/data/*", + "docs", + ".git", +] pythonpath = [ # faking a test-plugin to test ImportError handling "tests/plugins/data/test-plugin", ] +testpaths = ["tests"] + +[tool.ruff] +exclude = [ + "conda/_vendor", + "conda/auxlib", + "tests/data/conda_format_repo", + "tests/data/env_metadata", + "tools/vendoring", +] +target-version = "py38" + +[tool.ruff.lint] +extend-per-file-ignores = {"docs/*" = ["D1"], "tests/*" = ["D1"]} +flake8-type-checking = {exempt-modules = [], strict = true} +ignore = [ + "D101", # Missing docstring in public class + "D102", # Missing docstring in public method + "D103", # Missing docstring in public function + "D104", # Missing docstring in public package + "D105", # Missing docstring in magic method + "D107", # Missing docstring in `__init__` + "E402", # module level import not at top of file + "E501", # line too long + "E722", # do not use bare 'except' + "E731", # do not assign a lambda expression, use a def +] +pydocstyle = {convention = "pep257"} +# see https://docs.astral.sh/ruff/rules/ +select = [ + "D1", # pydocstyle + "E", # pycodestyle errors + "F", # pyflakes + "FA", # flake8-future-annotations + "I", # isort + "ISC", # flake8-implicit-str-concat + "T10", # flake8-debugger + "TCH", # flake8-type-checking + "UP", # pyupgrade + "W", # pycodestyle warnings +] [tool.vendoring] destination = "conda/_vendor/" namespace = "conda._vendor" -requirements = "conda/_vendor/vendor.txt" - patches-dir = "tools/vendoring/patches" protected-files = ["__init__.py", "vendor.txt", "README.md"] +requirements = "conda/_vendor/vendor.txt" + +[tool.vendoring.license.fallback-urls] +appdirs = "https://raw.githubusercontent.com/ActiveState/appdirs/master/LICENSE.txt" # MIT +cpuinfo = "https://raw.githubusercontent.com/workhorsy/py-cpuinfo/master/LICENSE" # MIT +distro = "https://raw.githubusercontent.com/python-distro/distro/master/LICENSE" # Apache +frozendict = "https://raw.githubusercontent.com/Marco-Sulla/python-frozendict/master/LICENSE.txt" # LGPL [tool.vendoring.transformations] drop = [ @@ -201,9 +215,3 @@ appdirs = [] cpuinfo = [] distro = [] frozendict = [] - -[tool.vendoring.license.fallback-urls] -appdirs = "https://raw.githubusercontent.com/ActiveState/appdirs/master/LICENSE.txt" # MIT -cpuinfo = "https://raw.githubusercontent.com/workhorsy/py-cpuinfo/master/LICENSE" # MIT -distro = "https://raw.githubusercontent.com/python-distro/distro/master/LICENSE" # Apache -frozendict = "https://raw.githubusercontent.com/Marco-Sulla/python-frozendict/master/LICENSE.txt" # LGPL diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 42847d7eadf..3959a519bd9 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,6 +1,6 @@ python: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12" + - '3.8' + - '3.9' + - '3.10' + - '3.11' + - '3.12'