Skip to content

Commit bbb91b8

Browse files
committed
feat: initial commit
0 parents  commit bbb91b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+3551
-0
lines changed

.cookiecutter.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"_checkout": null,
3+
"_output_dir": "C:\\Users\\56kyl\\source\\repos",
4+
"_repo_dir": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python",
5+
"_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python",
6+
"add_rust_extension": false,
7+
"author": "Kyle Oliver",
8+
"copyright_year": "2025",
9+
"development_status": "Development Status :: 1 - Planning",
10+
"email": "56kyleoliver+cookiecutter-robust-python@gmail.com",
11+
"friendly_name": "Robust Python Demo",
12+
"github_user": "56kyle",
13+
"license": "MIT",
14+
"max_python_version": "3.13",
15+
"min_python_version": "3.9",
16+
"package_name": "robust_python_demo",
17+
"project_name": "robust-python-demo",
18+
"version": "0.0.0"
19+
}

.coveragerc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[paths]
2+
source =
3+
src
4+
*/site-packages
5+
tests =
6+
tests
7+
*/tests
8+
9+
[run]
10+
branch = true
11+
source =
12+
robust_python_demo
13+
tests
14+
15+
[report]
16+
exclude_also =
17+
if TYPE_CHECKING:
18+
show_missing = true
19+
fail_under = 100

.cz.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[tool.commitizen]
2+
tag_format = "v$version"
3+
version_scheme = "pep440"
4+
5+
# Set to true to allow bumping to 0.y.z from 0.(y-1).z when commit types normally trigger major bump.
6+
# Recommended for initial development phases before 1.0.0.
7+
major_version_zero = true
8+
9+
write_version_files = [
10+
"pyproject.toml:version",
11+
"src/robust_python_demo/__init__.py:__version__",
12+
]
13+
commit_msg_file = ".git/COMMIT_EDITMSG"
14+
retry_after_failure = true
15+
update_changelog_on_bump = true
16+
17+
[tool.commitizen.github]
18+
release = true
19+
release_asset_path = "dist/*"
20+
release_asset_descriptions = { "*.tar.gz" = "Source distribution", "*.whl" = "Python Wheel" }
21+
base_url = "https://github.com/56kyle/robust-python-demo"

.editorconfig

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
max_line_length = 120
9+
tab_width = 4
10+
ij_continuation_indent_size = 8
11+
ij_formatter_off_tag = @formatter:off
12+
ij_formatter_on_tag = @formatter:on
13+
ij_formatter_tags_enabled = true
14+
ij_smart_tabs = false
15+
ij_visual_guides =
16+
ij_wrap_on_typing = false
17+
18+
[*.toml]
19+
indent_style = space
20+
indent_size = 4
21+
22+
[*.yml,yaml,json]
23+
indent_style = space
24+
indent_size = 2
25+
26+
[{*.py,*.pyw,*.whl}]
27+
indent_style = space
28+
indent_size = 4
29+
ij_continuation_indent_size = 4
30+
ij_python_add_indent_inside_injections = false
31+
ij_python_align_collections_and_comprehensions = true
32+
ij_python_align_multiline_imports = true
33+
ij_python_align_multiline_parameters = false
34+
ij_python_align_multiline_parameters_in_calls = false
35+
ij_python_blank_line_at_file_end = true
36+
ij_python_blank_lines_after_imports = 2
37+
ij_python_blank_lines_after_local_imports = 0
38+
ij_python_blank_lines_around_class = 1
39+
ij_python_blank_lines_around_method = 1
40+
ij_python_blank_lines_around_top_level_classes_functions = 2
41+
ij_python_blank_lines_before_first_method = 0
42+
ij_python_call_parameters_new_line_after_left_paren = true
43+
ij_python_call_parameters_right_paren_on_new_line = true
44+
ij_python_call_parameters_wrap = on_every_item
45+
ij_python_dict_alignment = 0
46+
ij_python_dict_new_line_after_left_brace = true
47+
ij_python_dict_new_line_before_right_brace = true
48+
ij_python_dict_wrapping = on_every_item
49+
ij_python_format_injected_fragments = true
50+
ij_python_from_import_new_line_after_left_parenthesis = true
51+
ij_python_from_import_new_line_before_right_parenthesis = true
52+
ij_python_from_import_parentheses_force_if_multiline = true
53+
ij_python_from_import_trailing_comma_if_multiline = false
54+
ij_python_from_import_wrapping = on_every_item
55+
ij_python_hang_closing_brackets = false
56+
ij_python_keep_blank_lines_in_code = 1
57+
ij_python_keep_blank_lines_in_declarations = 1
58+
ij_python_keep_indents_on_empty_lines = false
59+
ij_python_keep_line_breaks = true
60+
ij_python_list_new_line_after_left_bracket = true
61+
ij_python_list_new_line_before_right_bracket = true
62+
ij_python_list_wrapping = on_every_item
63+
ij_python_method_parameters_new_line_after_left_paren = true
64+
ij_python_method_parameters_right_paren_on_new_line = true
65+
ij_python_method_parameters_wrap = on_every_item
66+
ij_python_new_line_after_colon = true
67+
ij_python_new_line_after_colon_multi_clause = true
68+
ij_python_optimize_imports_always_split_from_imports = true
69+
ij_python_optimize_imports_case_insensitive_order = false
70+
ij_python_optimize_imports_join_from_imports_with_same_source = false
71+
ij_python_optimize_imports_sort_by_type_first = true
72+
ij_python_optimize_imports_sort_imports = true
73+
ij_python_optimize_imports_sort_names_in_from_imports = false
74+
ij_python_set_new_line_after_left_brace = true
75+
ij_python_set_new_line_before_right_brace = true
76+
ij_python_set_wrapping = on_every_item
77+
ij_python_space_after_comma = true
78+
ij_python_space_after_number_sign = true
79+
ij_python_space_after_py_colon = true
80+
ij_python_space_before_backslash = true
81+
ij_python_space_before_comma = false
82+
ij_python_space_before_for_semicolon = false
83+
ij_python_space_before_lbracket = false
84+
ij_python_space_before_method_call_parentheses = false
85+
ij_python_space_before_method_parentheses = false
86+
ij_python_space_before_number_sign = true
87+
ij_python_space_before_py_colon = false
88+
ij_python_space_within_empty_method_call_parentheses = false
89+
ij_python_space_within_empty_method_parentheses = false
90+
ij_python_spaces_around_additive_operators = true
91+
ij_python_spaces_around_assignment_operators = true
92+
ij_python_spaces_around_bitwise_operators = true
93+
ij_python_spaces_around_eq_in_keyword_argument = false
94+
ij_python_spaces_around_eq_in_named_parameter = false
95+
ij_python_spaces_around_equality_operators = true
96+
ij_python_spaces_around_multiplicative_operators = true
97+
ij_python_spaces_around_power_operator = true
98+
ij_python_spaces_around_relational_operators = true
99+
ij_python_spaces_around_shift_operators = true
100+
ij_python_spaces_within_braces = false
101+
ij_python_spaces_within_brackets = false
102+
ij_python_spaces_within_method_call_parentheses = false
103+
ij_python_spaces_within_method_parentheses = false
104+
ij_python_tuple_new_line_after_left_parenthesis = true
105+
ij_python_tuple_new_line_before_right_parenthesis = true
106+
ij_python_tuple_wrapping = on_every_item
107+
ij_python_use_continuation_indent_for_arguments = false
108+
ij_python_use_continuation_indent_for_collection_and_comprehensions = false
109+
ij_python_use_continuation_indent_for_parameters = true
110+
ij_python_use_trailing_comma_in_arguments_list = false
111+
ij_python_use_trailing_comma_in_collections = false
112+
ij_python_use_trailing_comma_in_parameter_list = false
113+
ij_python_wrap_long_lines = false

.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
ROBUST_PYTHON_DEMO__PROJECT_NAME=robust-python-demo
3+
ROBUST_PYTHON_DEMO__PACKAGE_NAME=robust_python_demo
4+
ROBUST_PYTHON_DEMO__FRIENDLY_NAME=Robust Python Demo

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/dependabot.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
target-branch: "develop"
6+
schedule:
7+
interval: weekly
8+
- package-ecosystem: pip
9+
directory: "/.github/workflows"
10+
target-branch: "develop"
11+
schedule:
12+
interval: weekly
13+
- package-ecosystem: pip
14+
directory: "/docs"
15+
target-branch: "develop"
16+
schedule:
17+
interval: weekly
18+
- package-ecosystem: pip
19+
directory: "/"
20+
target-branch: "develop"
21+
schedule:
22+
interval: weekly
23+
versioning-strategy: lockfile-only
24+
allow:
25+
- dependency-type: "all"

.github/workflows/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

.github/workflows/build-python.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# .github/workflows/build-package-python.yml
2+
# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
3+
4+
name: Build Python Package
5+
6+
on:
7+
pull_request:
8+
paths:
9+
- 'src/**/*.py'
10+
- 'tests/**/*.py' # Test files shouldn't trigger *build* unless needed? Consider paths carefully.
11+
- 'noxfile.py' # Build task config
12+
- 'pyproject.toml' # Packaging config (metadata, deps, build system)
13+
- '.github/workflows/build-package-python.yml' # This workflow file
14+
- 'rust/**/*.rs'
15+
# Add paths to other relevant build-related files (e.g., manifest files)
16+
push:
17+
branches:
18+
- main
19+
- master
20+
paths:
21+
- 'src/**/*.py'
22+
- 'tests/**/*.py'
23+
- 'noxfile.py'
24+
- 'pyproject.toml'
25+
- '.github/workflows/build-package-python.yml'
26+
27+
# This workflow is also triggered explicitly as part of the CD workflow.
28+
# workflow_dispatch: # Remove if only triggered by push/PR or other workflows
29+
30+
jobs:
31+
build-package-python:
32+
name: Run Python Package Build Check on ${{ matrix.os }}
33+
# Building pure Python packages should work reliably across OSs.
34+
runs-on: ${{ matrix.os }}
35+
strategy:
36+
matrix:
37+
os: [ubuntu-latest]
38+
fail-fast: false
39+
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@v4
43+
44+
- name: Install uv
45+
uses: astral-sh/setup-uv@v6
46+
47+
- name: Set up Python
48+
uses: actions/setup-python@v5
49+
with:
50+
python-version-file: .python-version
51+
52+
- name: Run package build
53+
run: uvx nox -s build-python-package
54+
55+
- name: Upload built packages artifact
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: distribution-packages-{{ github.event.inputs.tag }}
59+
path: dist/
60+
retention-days: 7

.github/workflows/bump-version.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Bump version
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
bump-version:
10+
if: "!startsWith(github.event.head_commit.message, 'bump:')"
11+
runs-on: ubuntu-latest
12+
name: "Bump version and create changelog with commitizen"
13+
steps:
14+
- name: Check out
15+
uses: actions/checkout@v4
16+
with:
17+
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
18+
fetch-depth: 0
19+
- name: Create bump and changelog
20+
uses: commitizen-tools/commitizen-action@master
21+
with:
22+
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
23+
changelog_increment_filename: body.md
24+
- name: Release
25+
uses: softprops/action-gh-release@v1
26+
with:
27+
body_path: "body.md"
28+
tag_name: ${{ env.REVISION }}
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)