Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mdellweg committed Apr 29, 2024
1 parent e14a92b commit 345add0
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 19 deletions.
7 changes: 0 additions & 7 deletions .flake8

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
__pycache__/
build/
tests/cli.toml
pytest_pulp_cli/GPG-PRIVATE-KEY-fixture-signing
/.ci/settings/certs
site/
dist/
*.po~
4 changes: 2 additions & 2 deletions lint_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Lint requirements
black==24.4.0
black==24.4.2
flake8==7.0.0
flake8-pyproject==1.2.3
isort==5.13.2
mypy==1.9.0
mypy==1.10.0
shellcheck-py==0.10.0.1

# Type annotation stubs
Expand Down
49 changes: 41 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ changelog = "https://github.com/pulp/pulp-cli-gem/blob/main/CHANGES.md"
gem = "pulpcore.cli.gem"

[tool.setuptools.packages.find]
# This section is managed by the cookiecutter templates.
where = ["."]
include = ["pulpcore.cli.*"]
namespaces = true

[tool.setuptools.package-data]
"*" = ["py.typed", "locale/*/LC_MESSAGES/*.mo"]
# This section is managed by the cookiecutter templates.
"*" = ["py.typed"]


[tool.pulp_cli_template]
# This section is co-managed by the cookiecutter templates.
Expand All @@ -52,63 +55,71 @@ translations = false
main_package = "gem"

[tool.towncrier]
# This section is managed by the cookiecutter templates.
filename = "CHANGES.md"
directory = "CHANGES/"
title_format = "## {version} ({project_date})"
title_format = "## {version} ({project_date}) {{: #{version} }}"
template = "CHANGES/.TEMPLATE.md"
issue_format = "[#{issue}](https://github.com/pulp/pulp-cli-gem/issues/{issue})"
start_string = "[//]: # (towncrier release notes start)\n"
underlines = ["", "", ""]

[[tool.towncrier.section]]
# This section is managed by the cookiecutter templates.
path = ""
name = ""

[[tool.towncrier.section]]
# This section is managed by the cookiecutter templates.
path = "pulp-glue-gem"
name = "Pulp-gem GLUE"

[[tool.towncrier.type]]
# This section is managed by the cookiecutter templates.
directory = "feature"
name = "Features"
showcontent = true

[[tool.towncrier.type]]
# This section is managed by the cookiecutter templates.
directory = "bugfix"
name = "Bugfixes"
showcontent = true

[[tool.towncrier.type]]
# This section is managed by the cookiecutter templates.
directory = "doc"
name = "Improved Documentation"
showcontent = true

[[tool.towncrier.type]]
# This section is managed by the cookiecutter templates.
directory = "removal"
name = "Deprecations and Removals"
showcontent = true

[[tool.towncrier.type]]
directory = "translation"
name = "Translations"
showcontent = true

[[tool.towncrier.type]]
# This section is managed by the cookiecutter templates.
directory = "devel"
name = "Developer Notes"
showcontent = true

[[tool.towncrier.type]]
# This section is managed by the cookiecutter templates.
directory = "misc"
name = "Misc"
showcontent = false


[tool.black]
# This section is managed by the cookiecutter templates.
line-length = 100

[tool.isort]
# This section is managed by the cookiecutter templates.
profile = "black"
line_length = 100
skip = ["pulp-glue-gem"]

[tool.pytest.ini_options]
markers = [
Expand All @@ -118,15 +129,20 @@ markers = [
]

[tool.mypy]
# This section is managed by the cookiecutter templates.
strict = true
warn_unused_ignores = false
show_error_codes = true
files = "pulpcore/**/*.py"
files = "pulpcore/**/*.py, tests/*.py"
namespace_packages = true
explicit_package_bases = true

[[tool.mypy.overrides]]
# This section is managed by the cookiecutter templates.
module = [
"click_shell.*",
"gnupg.*",
"IPython.*",
"schema.*",
]
ignore_missing_imports = true
Expand All @@ -143,33 +159,50 @@ serialize = [
]

[tool.bumpversion.parts.release]
# This section is managed by the cookiecutter templates.
optional_value = "prod"
values = [
"dev",
"prod",
]

[[tool.bumpversion.files]]
# This section is managed by the cookiecutter templates.
filename = "./pulp-glue-gem/pulp_glue/gem/__init__.py"
search = "__version__ = \"{current_version}\""
replace = "__version__ = \"{new_version}\""

[[tool.bumpversion.files]]
# This section is managed by the cookiecutter templates.
filename = "./pulpcore/cli/gem/__init__.py"
search = "__version__ = \"{current_version}\""
replace = "__version__ = \"{new_version}\""

[[tool.bumpversion.files]]
# This section is managed by the cookiecutter templates.
filename = "./pulp-glue-gem/pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""

[[tool.bumpversion.files]]
# This section is managed by the cookiecutter templates.
filename = "./pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""

[[tool.bumpversion.files]]
# This section is managed by the cookiecutter templates.
filename = "./pyproject.toml"
search = "\"pulp-glue-gem=={current_version}\""
replace = "\"pulp-glue-gem=={new_version}\""


[tool.flake8]
# This section is managed by the cookiecutter templates.
exclude = ["./docs/*"]
ignore = ["W503", "Q000", "Q003", "D100", "D104", "D106", "D200", "D202", "D205", "D400", "D401", "D402"]
# E203: whitespace before ':'; https://github.com/psf/black/issues/279
# E401: multiple imports on one line
extend-ignore = ["E203", "E401"]
max-line-length = 100

5 changes: 3 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import typing as t
from urllib.parse import urljoin

import pytest
Expand All @@ -6,9 +7,9 @@


@pytest.fixture
def pulp_cli_vars(pulp_cli_vars):
def pulp_cli_vars(pulp_cli_vars: t.MutableMapping[str, str]) -> t.MutableMapping[str, str]:
PULP_FIXTURES_URL = pulp_cli_vars["PULP_FIXTURES_URL"]
result = {}
result: t.MutableMapping[str, str] = {}
result.update(pulp_cli_vars)
result.update(
{
Expand Down

0 comments on commit 345add0

Please sign in to comment.