Skip to content

Commit 742c665

Browse files
committed
Merging skeleton and updating project names
2 parents d24dbb9 + f4529af commit 742c665

19 files changed

+455
-3
lines changed

.coveragerc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[run]
2+
omit =
3+
# leading `*/` for pytest-dev/pytest-cov#456
4+
*/.tox/*
5+
disable_warnings =
6+
couldnt-parse
7+
8+
[report]
9+
show_missing = True
10+
exclude_also =
11+
# jaraco/skeleton#97
12+
@overload
13+
if TYPE_CHECKING:

.editorconfig

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = tab
6+
indent_size = 4
7+
insert_final_newline = true
8+
end_of_line = lf
9+
10+
[*.py]
11+
indent_style = space
12+
max_line_length = 88
13+
14+
[*.{yml,yaml}]
15+
indent_style = space
16+
indent_size = 2
17+
18+
[*.rst]
19+
indent_style = space

.github/dependabot.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
allow:
8+
- dependency-type: "all"

.github/workflows/main.yml

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: tests
2+
3+
on:
4+
merge_group:
5+
push:
6+
branches-ignore:
7+
# temporary GH branches relating to merge queues (jaraco/skeleton#93)
8+
- gh-readonly-queue/**
9+
tags:
10+
# required if branches-ignore is supplied (jaraco/skeleton#103)
11+
- '**'
12+
pull_request:
13+
14+
permissions:
15+
contents: read
16+
17+
env:
18+
# Environment variable to support color support (jaraco/skeleton#66)
19+
FORCE_COLOR: 1
20+
21+
# Suppress noisy pip warnings
22+
PIP_DISABLE_PIP_VERSION_CHECK: 'true'
23+
PIP_NO_PYTHON_VERSION_WARNING: 'true'
24+
PIP_NO_WARN_SCRIPT_LOCATION: 'true'
25+
26+
# Ensure tests can sense settings about the environment
27+
TOX_OVERRIDE: >-
28+
testenv.pass_env+=GITHUB_*,FORCE_COLOR
29+
30+
31+
jobs:
32+
test:
33+
strategy:
34+
# https://blog.jaraco.com/efficient-use-of-ci-resources/
35+
matrix:
36+
python:
37+
- "3.8"
38+
- "3.12"
39+
platform:
40+
- ubuntu-latest
41+
- macos-latest
42+
- windows-latest
43+
include:
44+
- python: "3.9"
45+
platform: ubuntu-latest
46+
- python: "3.10"
47+
platform: ubuntu-latest
48+
- python: "3.11"
49+
platform: ubuntu-latest
50+
- python: pypy3.10
51+
platform: ubuntu-latest
52+
runs-on: ${{ matrix.platform }}
53+
continue-on-error: ${{ matrix.python == '3.13' }}
54+
steps:
55+
- uses: actions/checkout@v4
56+
- name: Setup Python
57+
uses: actions/setup-python@v4
58+
with:
59+
python-version: ${{ matrix.python }}
60+
allow-prereleases: true
61+
- name: Install tox
62+
run: python -m pip install tox
63+
- name: Run
64+
run: tox
65+
66+
collateral:
67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
job:
71+
- diffcov
72+
- docs
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@v4
76+
with:
77+
fetch-depth: 0
78+
- name: Setup Python
79+
uses: actions/setup-python@v4
80+
with:
81+
python-version: 3.x
82+
- name: Install tox
83+
run: python -m pip install tox
84+
- name: Eval ${{ matrix.job }}
85+
run: tox -e ${{ matrix.job }}
86+
87+
check: # This job does nothing and is only used for the branch protection
88+
if: always()
89+
90+
needs:
91+
- test
92+
- collateral
93+
94+
runs-on: ubuntu-latest
95+
96+
steps:
97+
- name: Decide whether the needed jobs succeeded or failed
98+
uses: re-actors/alls-green@release/v1
99+
with:
100+
jobs: ${{ toJSON(needs) }}
101+
102+
release:
103+
permissions:
104+
contents: write
105+
needs:
106+
- check
107+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
108+
runs-on: ubuntu-latest
109+
110+
steps:
111+
- uses: actions/checkout@v4
112+
- name: Setup Python
113+
uses: actions/setup-python@v4
114+
with:
115+
python-version: 3.x
116+
- name: Install tox
117+
run: python -m pip install tox
118+
- name: Run
119+
run: tox -e release
120+
env:
121+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
122+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ __pycache__/
33
*.py[cod]
44
*$py.class
55

6+
*.orig
7+
68
# C extensions
79
*.so
810

@@ -157,4 +159,4 @@ cython_debug/
157159
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158160
# and can be added to the global gitignore or merged into this file. For a more nuclear
159161
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160-
#.idea/
162+
.idea/

.pre-commit-config.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.1.8
4+
hooks:
5+
- id: ruff
6+
- id: ruff-format

.readthedocs.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
python:
3+
install:
4+
- path: .
5+
extra_requirements:
6+
- docs
7+
8+
# required boilerplate readthedocs/readthedocs.org#10401
9+
build:
10+
os: ubuntu-lts-latest
11+
tools:
12+
python: latest
13+
# post-checkout job to ensure the clone isn't shallow jaraco/skeleton#114
14+
jobs:
15+
post_checkout:
16+
- git fetch --unshallow || true

NEWS.rst

Whitespace-only changes.

README.md

-2
This file was deleted.

README.rst

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. image:: https://img.shields.io/pypi/v/kubedantic.svg
2+
:target: https://pypi.org/project/kubedantic
3+
4+
.. image:: https://img.shields.io/pypi/pyversions/kubedantic.svg
5+
6+
.. image:: https://github.com/coherent-oss/kubedantic/actions/workflows/main.yml/badge.svg
7+
:target: https://github.com/coherent-oss/kubedantic/actions?query=workflow%3A%22tests%22
8+
:alt: tests
9+
10+
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
11+
:target: https://github.com/astral-sh/ruff
12+
:alt: Ruff
13+
14+
.. .. image:: https://readthedocs.org/projects/kubedantic/badge/?version=latest
15+
.. :target: https://kubedantic.readthedocs.io/en/latest/?badge=latest
16+
17+
.. image:: https://img.shields.io/badge/skeleton-2024-informational
18+
:target: https://blog.jaraco.com/skeleton

docs/conf.py

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
extensions = [
2+
'sphinx.ext.autodoc',
3+
'jaraco.packaging.sphinx',
4+
]
5+
6+
master_doc = "index"
7+
html_theme = "furo"
8+
9+
# Link dates and other references in the changelog
10+
extensions += ['rst.linker']
11+
link_files = {
12+
'../NEWS.rst': dict(
13+
using=dict(GH='https://github.com'),
14+
replace=[
15+
dict(
16+
pattern=r'(Issue #|\B#)(?P<issue>\d+)',
17+
url='{package_url}/issues/{issue}',
18+
),
19+
dict(
20+
pattern=r'(?m:^((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n)',
21+
with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n',
22+
),
23+
dict(
24+
pattern=r'PEP[- ](?P<pep_number>\d+)',
25+
url='https://peps.python.org/pep-{pep_number:0>4}/',
26+
),
27+
],
28+
)
29+
}
30+
31+
# Be strict about any broken references
32+
nitpicky = True
33+
34+
# Include Python intersphinx mapping to prevent failures
35+
# jaraco/skeleton#51
36+
extensions += ['sphinx.ext.intersphinx']
37+
intersphinx_mapping = {
38+
'python': ('https://docs.python.org/3', None),
39+
}
40+
41+
# Preserve authored syntax for defaults
42+
autodoc_preserve_defaults = True

docs/history.rst

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:tocdepth: 2
2+
3+
.. _changes:
4+
5+
History
6+
*******
7+
8+
.. include:: ../NEWS (links).rst

docs/index.rst

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Welcome to |project| documentation!
2+
===================================
3+
4+
.. sidebar-links::
5+
:home:
6+
:pypi:
7+
8+
.. toctree::
9+
:maxdepth: 1
10+
11+
history
12+
13+
14+
.. automodule:: PROJECT
15+
:members:
16+
:undoc-members:
17+
:show-inheritance:
18+
19+
20+
Indices and tables
21+
==================
22+
23+
* :ref:`genindex`
24+
* :ref:`modindex`
25+
* :ref:`search`
26+

mypy.ini

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[mypy]
2+
ignore_missing_imports = True
3+
# required to support namespace packages
4+
# https://github.com/python/mypy/issues/14057
5+
explicit_package_bases = True

pyproject.toml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
[build-system]
2+
requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4.1"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "kubedantic"
7+
authors = [
8+
{ name = "Thiago Pena", email = "[email protected]" },
9+
{ name = "Diogo Baeder", email = "[email protected]" },
10+
]
11+
description = "Kubedantic - Pydantic models for Kubernetes"
12+
readme = "README.rst"
13+
classifiers = [
14+
"Development Status :: 5 - Production/Stable",
15+
"Intended Audience :: Developers",
16+
"License :: OSI Approved :: MIT License",
17+
"Programming Language :: Python :: 3",
18+
"Programming Language :: Python :: 3 :: Only",
19+
]
20+
requires-python = ">=3.8"
21+
dependencies = [
22+
]
23+
dynamic = ["version"]
24+
25+
[project.optional-dependencies]
26+
testing = [
27+
# upstream
28+
"pytest >= 6, != 8.1.*",
29+
"pytest-checkdocs >= 2.4",
30+
"pytest-cov",
31+
"pytest-mypy",
32+
"pytest-enabler >= 2.2",
33+
"pytest-ruff >= 0.2.1",
34+
35+
# local
36+
]
37+
docs = [
38+
# upstream
39+
"sphinx >= 3.5",
40+
"jaraco.packaging >= 9.3",
41+
"rst.linker >= 1.9",
42+
"furo",
43+
"sphinx-lint",
44+
45+
# local
46+
]
47+
48+
[project.urls]
49+
Homepage = "https://github.com/coherent-oss/kubedantic"
50+
51+
[project.scripts]
52+
53+
[tool.setuptools_scm]

pytest.ini

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[pytest]
2+
norecursedirs=dist build .tox .eggs
3+
addopts=
4+
--doctest-modules
5+
--import-mode importlib
6+
consider_namespace_packages=true
7+
filterwarnings=
8+
## upstream
9+
10+
# Ensure ResourceWarnings are emitted
11+
default::ResourceWarning
12+
13+
# realpython/pytest-mypy#152
14+
ignore:'encoding' argument not specified::pytest_mypy
15+
16+
# python/cpython#100750
17+
ignore:'encoding' argument not specified::platform
18+
19+
# pypa/build#615
20+
ignore:'encoding' argument not specified::build.env
21+
22+
# dateutil/dateutil#1284
23+
ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning:dateutil.tz.tz
24+
25+
## end upstream

0 commit comments

Comments
 (0)