Skip to content

Commit 41c7fba

Browse files
authored
build: copier and poetry updates (#11)
1 parent aa69edd commit 41c7fba

13 files changed

+1247
-1332
lines changed

.calcipy_packaging.lock

+306-362
Large diffs are not rendered by default.

.copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Answer file maintained by Copier for: https://github.com/KyleKing/calcipy_template
33
# DO NOT MODIFY THIS FILE. Edit by re-running copier and changing responses to the questions
44
# Check into version control.
5-
_commit: 1.9.6
5+
_commit: 1.9.14
66
_src_path: gh:KyleKing/calcipy_template
77
author_email: [email protected]
88
author_name: Kyle King

.github/actions/setup/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ runs:
3333
shell: bash
3434

3535
- name: Setup Python ${{ inputs.python-version }}
36-
uses: actions/setup-python@v4
36+
uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ inputs.python-version }}
3939
cache: poetry

.github/workflows/ci_pipeline.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ jobs:
6868
# Based on: https://github.com/jakebailey/pyright-action/issues/10#issuecomment-1455220629
6969
- name: Add Poetry Python to Path
7070
run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
71-
- uses: jakebailey/pyright-action@v1
71+
- uses: jakebailey/pyright-action@v2

.github/workflows/update_docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
os: ${{ matrix.os }}
3131
python-version: ${{ matrix.python-version }}
3232
- name: Setup Graphviz
33-
uses: ts-graphviz/setup-graphviz@v1
33+
uses: ts-graphviz/setup-graphviz@v2
3434

3535
# https://github.com/mkdocs/mkdocs/discussions/2369#discussioncomment-625475
3636
- name: Configure git user

.pre-commit-config.yaml

+8-14
Original file line numberDiff line numberDiff line change
@@ -42,47 +42,41 @@ repos:
4242
- id: trailing-whitespace
4343
exclude: __snapshots__/.*\.ambr
4444
- repo: https://github.com/commitizen-tools/commitizen
45-
rev: v3.13.0
45+
rev: v3.20.0
4646
hooks:
4747
- id: commitizen
4848
- repo: https://github.com/executablebooks/mdformat
4949
rev: 0.7.17
5050
hooks:
5151
- id: mdformat
52-
additional_dependencies: ["mdformat-mkdocs[recommended]>=1.0.6"]
52+
additional_dependencies:
53+
- "mdformat-mkdocs[recommended]>=2.0.6"
5354
args: [--wrap=no]
5455
exclude: _.+\.md|CHANGELOG\.md|CODE_TAG_SUMMARY\.md
5556
- repo: https://github.com/shellcheck-py/shellcheck-py
56-
rev: v0.9.0.6
57+
rev: v0.10.0.1
5758
hooks:
5859
- id: shellcheck
5960
args: [--severity=warning]
6061
- repo: https://github.com/pre-commit/mirrors-prettier
61-
rev: "v4.0.0-alpha.4"
62+
rev: "v4.0.0-alpha.8"
6263
hooks:
6364
- id: prettier
6465
additional_dependencies:
6566
# Note: this version must be the same as the hook revision
66-
67+
6768
- "prettier-plugin-sh"
6869
exclude: \.copier-answers\.yml|tests/.*/cassettes/.*\.yaml
6970
types_or: [html, javascript, json, shell, yaml]
7071
- repo: https://github.com/adrienverge/yamllint.git
71-
rev: v1.33.0
72+
rev: v1.35.1
7273
hooks:
7374
- id: yamllint
7475
exclude: tests/.*/cassettes/.*\.yaml
7576
- repo: https://github.com/pappasam/toml-sort
7677
rev: v0.23.1
7778
hooks:
7879
- id: toml-sort-fix
79-
args:
80-
[
81-
--in-place,
82-
--all,
83-
--trailing-comma-inline-array,
84-
--sort-first=python,
85-
]
8680
# Don't remove comments and sort order from test files
8781
exclude: poetry\.lock|config_default.toml|demo_config.toml
8882
- repo: https://github.com/MarcoGorelli/absolufy-imports
@@ -92,7 +86,7 @@ repos:
9286
args: [--never]
9387
files: tail_jsonl/.*\.py
9488
- repo: https://github.com/KyleKing/calcipy
95-
rev: 2.0.3
89+
rev: 2.0.4
9690
hooks:
9791
- id: copier-forbidden-files
9892
- id: lint-fix

.ruff.toml

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Docs: https://github.com/charliermarsh/ruff
22
# Tip: poetry run python -m ruff --explain RUF100
33

4+
line-length = 120
5+
target-version = 'py39'
6+
7+
[lint]
48
external = [
59
'CAC001', # <func> is too complex (8 > 7)
610
'ECE001', # Expression is too complex (8 > 7)
@@ -32,18 +36,16 @@ ignore = [
3236
'TID252', # Relative imports from parent modules are banned
3337
'TRY003', # Avoid specifying long messages outside the exception class
3438
]
35-
line-length = 120
3639
preview = true
3740
select = ['ALL']
38-
target-version = 'py39'
3941
unfixable = [
4042
'ERA001', # Commented out code
4143
]
4244

43-
[flake8-quotes]
45+
[lint.flake8-quotes]
4446
inline-quotes = 'single'
4547

46-
[flake8-tidy-imports.banned-api]
48+
[lint.flake8-tidy-imports.banned-api]
4749
'invoke.collection.Collection'.msg = 'Use calcipy.cli.Collection instead.'
4850
'invoke.tasks.task'.msg = 'Use calcipy.cli.task instead.'
4951
'typing.Callable'.msg = 'Use beartype.typing.* instead.'
@@ -53,10 +55,10 @@ inline-quotes = 'single'
5355
'typing.Protocol'.msg = 'Use beartype.typing.* instead.'
5456
'typing.TypeVar'.msg = 'Use beartype.typing.* instead.'
5557

56-
[isort]
58+
[lint.isort]
5759
known-first-party = ['tail_jsonl']
5860

59-
[per-file-ignores]
61+
[lint.per-file-ignores]
6062
'./tail_jsonl/../*.py' = [
6163
'INP001', # File `/<>.py` is part of an implicit namespace package. Add an `__init__.py`.
6264
]
@@ -77,9 +79,10 @@ known-first-party = ['tail_jsonl']
7779
'D100', # Missing docstring in public module
7880
'D103', # Missing docstring in public function
7981
'EM102', # Exception must not use an f-string literal, assign to variable first
82+
'PLC2701', # Private name import `_<>` from external module
8083
'PT004', # flake8-pytest-style: fixture does not return
8184
'S101', # Use of `assert` detected
8285
]
8386

84-
[pylint]
87+
[lint.pylint]
8588
max-args = 6

docs/docs/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050

5151
- migrate to corallium's rich_printer and styles
5252

53+
54+
- begin migration to corallium and calcipy v1 with copier template
55+
5356
## 1.1.2 (2023-02-16)
5457

5558
### Fix

docs/docs/DEVELOPER_GUIDE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ poetry config pypi-token.pypi ...
5353
| `tail_jsonl/scripts.py` | 18 | 0 | 11 | 90.9% |
5454
| **Totals** | 95 | 1 | 28 | 94.5% |
5555

56-
Generated on: 2023-10-14
56+
Generated on: 2024-04-18
5757
<!-- {cte} -->

docs/docs/STYLE_GUIDE.md

+42-42
Original file line numberDiff line numberDiff line change
@@ -9,51 +9,51 @@ We use [Commitizen](https://github.com/commitizen-tools/commitizen) to manage bo
99
> `type(scope): description`
1010
1111
- **Types**
12-
- *fix*: A bug fix
13-
- *feat*: A new feature
14-
- *docs*: Documentation-only changes (code comments, separate docs)
15-
- *style*: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons)
16-
- *perf*: A code change that improves performance
17-
- *refactor*: A change to production code that is not a *fix*, *feat*, or *perf*
18-
- *test*: Adding missing or correcting existing tests
19-
- *build*: Changes that affect the build system or external dependencies
20-
- *ci*: Changes to our CI configuration files and scripts
21-
- A `!` can be used to indicate a breaking change (`refactor!: drop support for Node 6`)
22-
- **SemVer Rules**
23-
- Based on commit type, the version will be auto-incremented: `fix : PATCH // feat : MINOR // BREAKING CHANGE : MAJOR`
12+
- *fix*: A bug fix
13+
- *feat*: A new feature
14+
- *docs*: Documentation-only changes (code comments, separate docs)
15+
- *style*: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons)
16+
- *perf*: A code change that improves performance
17+
- *refactor*: A change to production code that is not a *fix*, *feat*, or *perf*
18+
- *test*: Adding missing or correcting existing tests
19+
- *build*: Changes that affect the build system or external dependencies
20+
- *ci*: Changes to our CI configuration files and scripts
21+
- A `!` can be used to indicate a breaking change (`refactor!: drop support for Node 6`)
22+
- **SemVer Rules**
23+
- Based on commit type, the version will be auto-incremented: `fix : PATCH // feat : MINOR // BREAKING CHANGE : MAJOR`
2424
- **Scopes**
25-
- A Class, File name, Issue Number, other appropriate noun. As examples: `build(poetry): bump requests to v3` or `style(#32): add missing type annotations`
25+
- A Class, File name, Issue Number, other appropriate noun. As examples: `build(poetry): bump requests to v3` or `style(#32): add missing type annotations`
2626
- **Tips**
27-
- What if a commit fits multiple types?
28-
- Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is the focus on more organized and intentional changes
29-
- Use `git rebase -i` to fix commit names prior to merging if incorrect types/scopes are used
27+
- What if a commit fits multiple types?
28+
- Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is the focus on more organized and intentional changes
29+
- Use `git rebase -i` to fix commit names prior to merging if incorrect types/scopes are used
3030

3131
### Git Description Guidelines
3232

3333
- [Commit message guidelines](https://writingfordevelopers.substack.com/p/how-to-write-a-commit-message)
34-
- Full sentence with verb (*lowercase*) and concise description. Below are modified examples for Conventional Commits
35-
- `fix(roles): bug in admin role permissions`
36-
- `feat(ui): implement new button design`
37-
- `build(pip): upgrade package to remove vulnerabilities`
38-
- `refactor: file structure to improve code readability`
39-
- `perf(cli): rewrite methods`
40-
- `feat(api): endpoints to implement new customer dashboard`
34+
- Full sentence with verb (*lowercase*) and concise description. Below are modified examples for Conventional Commits
35+
- `fix(roles): bug in admin role permissions`
36+
- `feat(ui): implement new button design`
37+
- `build(pip): upgrade package to remove vulnerabilities`
38+
- `refactor: file structure to improve code readability`
39+
- `perf(cli): rewrite methods`
40+
- `feat(api): endpoints to implement new customer dashboard`
4141
- [How to write a good commit message](https://chris.beams.io/posts/git-commit/)
42-
- A diff will tell you what changed, but only the commit message can properly tell you why.
43-
- Keep in mind: [This](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) [has](https://www.git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_commit_guidelines) [all](https://github.com/torvalds/subsurface-for-dirk/blob/master/README.md#contributing) [been](http://who-t.blogspot.co.at/2009/12/on-commit-messages.html) [said](https://github.com/erlang/otp/wiki/writing-good-commit-messages) [before](https://github.com/spring-projects/spring-framework/blob/30bce7/CONTRIBUTING.md#format-commit-messages).
44-
- From the seven rules of a great Git commit message:
45-
- 2. [Try for 50 characters, but consider 72 the hard limit](https://chris.beams.io/posts/git-commit/#limit-50)
46-
- 7. [Use the body to explain what and why vs. how](https://chris.beams.io/posts/git-commit/#why-not-how)
42+
- A diff will tell you what changed, but only the commit message can properly tell you why.
43+
- Keep in mind: [This](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) [has](https://www.git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_commit_guidelines) [all](https://github.com/torvalds/subsurface-for-dirk/blob/master/README.md#contributing) [been](http://who-t.blogspot.co.at/2009/12/on-commit-messages.html) [said](https://github.com/erlang/otp/wiki/writing-good-commit-messages) [before](https://github.com/spring-projects/spring-framework/blob/30bce7/CONTRIBUTING.md#format-commit-messages).
44+
- From the seven rules of a great Git commit message:
45+
- (2) [Try for 50 characters, but consider 72 the hard limit](https://chris.beams.io/posts/git-commit/#limit-50)
46+
- (7) [Use the body to explain what and why vs. how](https://chris.beams.io/posts/git-commit/#why-not-how)
4747

4848
### Issue Labels and Milestones
4949

5050
Personal Guide
5151

52-
- For Issue Labels, see [labels.yml][labels]
52+
- For Issue Labels, see \[labels.yml\]\[labels\]
5353
- Milestones
54-
- **Current Tasks**: main milestone (*name could change based on a specific project, sprint, or month*)
55-
- **Next Tasks**
56-
- **Blue Sky**
54+
- **Current Tasks**: main milestone (*name could change based on a specific project, sprint, or month*)
55+
- **Next Tasks**
56+
- **Blue Sky**
5757

5858
<details>
5959
<summary>Research</summary>
@@ -127,25 +127,25 @@ Personal Guide
127127

128128
<!-- Revisit -->
129129

130-
- [Git: The Simple Guide][simple_git]
131-
- [Commit Messages][gcmsg] and [why use the present tense](https://news.ycombinator.com/item?id=8874177)
130+
- \[Git: The Simple Guide\]\[simple_git\]
131+
- \[Commit Messages\]\[gcmsg\] and [why use the present tense](https://news.ycombinator.com/item?id=8874177)
132132
- [GitHub's Advice on GitHub](https://github.com/erlang/otp/wiki/Writing-good-commit-messages)
133133
- [Most Comprehensive Guide](https://chris.beams.io/posts/git-commit/)
134134
- [Git Pro Book (free)](https://git-scm.com/book/en/v2)
135-
- [Bash Tab-Completion Snippet](https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash)
135+
- [Bash Tab-Completion Snippet](https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash)
136136

137137
## Python
138138

139139
<!-- Revisit -->
140140

141141
- Python Style Guides
142-
- <https://gist.github.com/sloria/7001839>
143-
- <http://www.nilunder.com/blog/2013/08/03/pythonic-sensibilities/>
144-
- <https://innoq.github.io/cards42org_en/>
145-
- <https://docs.openstack.org/hacking/latest/user/hacking.html#styleguide>
146-
- <https://www.python.org/doc/humor/>
147-
- <https://docs.python-guide.org/writing/reading/>
148-
- <https://realpython.com/python-refactoring/>
142+
- <https://gist.github.com/sloria/7001839>
143+
- <http://www.nilunder.com/blog/2013/08/03/pythonic-sensibilities/>
144+
- <https://innoq.github.io/cards42org_en/>
145+
- <https://docs.openstack.org/hacking/latest/user/hacking.html#styleguide>
146+
- <https://www.python.org/doc/humor/>
147+
- <https://docs.python-guide.org/writing/reading/>
148+
- <https://realpython.com/python-refactoring/>
149149

150150
## ADRs
151151

0 commit comments

Comments
 (0)