Skip to content

Commit

Permalink
build: copier and dependency updates
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Dec 10, 2023
1 parent 83b1715 commit 57530fe
Show file tree
Hide file tree
Showing 17 changed files with 888 additions and 929 deletions.
496 changes: 284 additions & 212 deletions .calcipy_packaging.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Answer file maintained by Copier for: https://github.com/KyleKing/calcipy_template
# DO NOT MODIFY THIS FILE. Edit by re-running copier and changing responses to the questions
# Check into version control.
_commit: 1.8.2
_commit: 1.9.4
_src_path: gh:KyleKing/calcipy_template
author_email: [email protected]
author_name: Kyle King
Expand Down
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# E501 - defer line length to other tools
# PIE786 - Use precise exception handlers
# W503 - Python 3 standard is a line break BEFORE binary operator, so ignore W503. Enforce W504
ignore = E501,PIE786,W503
ignore = E501,F401,PIE786,W503
max-function-length = 55
max-line-length = 120
min-python-version = 3.9
Expand Down
29 changes: 2 additions & 27 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ description: Install requested pipx dependencies, configure the system python, a

inputs:
os:
default: ubuntu-22.04
default: ubuntu-latest
pipx-packages:
default: ""
poetry-version:
default: 1.6.1
default: 1.7.1
python-version:
required: true

Expand All @@ -19,36 +19,11 @@ env:
runs:
using: composite
steps:
- name: Setup Local Variables
id: variable-setup
run: |
echo "pipx-home=$PIPX_HOME" >> $GITHUB_OUTPUT
echo "pipx-bin-dir=$PIPX_BIN_DIR" >> $GITHUB_OUTPUT
export BASE64_PIPX_ID=$(echo -n 'poetry==${{ inputs.poetry-version }} ${{ inputs.pipx-packages }}' | base64)
echo "cache-key-pipx=pipx-${{ inputs.os }}-${{ inputs.python-version }}-$BASE64_PIPX_ID" >> $GITHUB_OUTPUT
shell: bash

- name: Cache pipx
id: cache-pipx
# cache doesn't have permission to extract to "opt/"
if: ${{ inputs.os != 'macos-latest' }}
uses: actions/cache@v3
with:
# https://pypa.github.io/pipx/how-pipx-works
path: |
${{ steps.variable-setup.outputs.pipx-home }}
${{ steps.variable-setup.outputs.pipx-bin-dir }}
key: ${{ steps.variable-setup.outputs.cache-key-pipx }}

- name: Install Poetry ${{ inputs.poetry-version }} and '${{ inputs.pipx-packages }}'
if: ${{ steps.cache-pipx.outputs.cache-hit != 'true' }}
run: |
for tool in "poetry==${{ inputs.poetry-version }}" ${{ inputs.pipx-packages }}; do
pipx install $tool
done
# Resolves https://github.com/python-poetry/poetry/issues/7611
poetry self add setuptools==68.1.2
shell: bash

- name: Debug pipx
Expand Down
16 changes: 0 additions & 16 deletions .github/codeql-config.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
os: [ubuntu-latest]
python-version: ["3.9"]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
os: [ubuntu-latest]
python-version: ["3.9"]
steps:
- uses: actions/checkout@v4
Expand Down
52 changes: 0 additions & 52 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run Labeler
if: success()
uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/update_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ permissions:
# Repository contents, commits, branches, downloads, releases, and merges.
contents: write

env:
COLUMNS: 120

jobs:
docs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
os: [ubuntu-latest]
python-version: ["3.9"]
steps:
- uses: actions/checkout@v4
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ default_install_hook_types: ["commit-msg", "pre-commit", "pre-push"]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
Expand All @@ -42,33 +42,33 @@ repos:
- id: trailing-whitespace
exclude: __snapshots__/.*\.ambr
- repo: https://github.com/commitizen-tools/commitizen
rev: 3.6.0
rev: 3.12.0
hooks:
- id: commitizen
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies: ["mdformat-mkdocs[recommended]"]
additional_dependencies: ["mdformat-mkdocs[recommended]>=1.0.6"]
args: [--wrap=no]
exclude: _.+\.md|CHANGELOG\.md|CODE_TAG_SUMMARY\.md
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
rev: v0.9.0.6
hooks:
- id: shellcheck
args: [--severity=warning]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
rev: "v3.1.0"
hooks:
- id: prettier
additional_dependencies:
# Note: this version must be the same as the hook revision
- "prettier@3.0.3"
- "prettier@3.1.0"
- "prettier-plugin-sh"
exclude: \.copier-answers\.yml|tests/.*/cassettes/.*\.yaml
types_or: [html, javascript, json, shell, yaml]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
rev: v1.33.0
hooks:
- id: yamllint
exclude: tests/.*/cassettes/.*\.yaml
Expand All @@ -92,7 +92,7 @@ repos:
args: [--never]
files: tail_jsonl/.*\.py
- repo: https://github.com/KyleKing/calcipy
rev: 2.0.0
rev: 2.0.2
hooks:
- id: copier-forbidden-files
- id: lint-fix
Expand Down
6 changes: 3 additions & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ load-plugins=
pylint.extensions.broad_try_clause,
pylint.extensions.check_elif,
pylint.extensions.code_style,
pylint.extensions.comparetozero,
pylint.extensions.comparison_placement,
pylint.extensions.confusing_elif,
pylint.extensions.consider_refactoring_into_while_condition,
pylint.extensions.consider_ternary_expression,
pylint.extensions.dunder,
pylint.extensions.empty_comment,
pylint.extensions.emptystring,
pylint.extensions.eq_without_hash,
pylint.extensions.for_any_all,
pylint.extensions.mccabe,
Expand All @@ -27,7 +25,9 @@ load-plugins=
pylint.extensions.redefined_variable_type,
pylint.extensions.set_membership,
pylint.extensions.typing,
pylint.extensions.while_used
pylint.extensions.while_used,
use-implicit-booleaness-not-comparison-to-string,
use-implicit-booleaness-not-comparison-to-zero

[BASIC]
include-naming-hint=yes
Expand Down
2 changes: 2 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ignore = [
'ANN102', # Missing type annotation for `cls` in classmethod
'ANN401', # Dynamically typed expressions (typing.Any) are disallowed in `**kwargs`
'BLE001', # Do not catch blind exception: `Exception`
'CPY001', # Missing copyright notice at top of file
'D203', # "1 blank line required before class docstring" (Conflicts with D211)
'D213', # "Multi-line docstring summary should start at the second line" (Conflicts with D212)
'D4', # Numpy-Style Docstrings (e.g. "Section name should end with a newline ("Returns")")
Expand All @@ -32,6 +33,7 @@ ignore = [
'TRY003', # Avoid specifying long messages outside the exception class
]
line-length = 120
preview = true
select = ['ALL']
target-version = 'py39'
unfixable = [
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python 3.11.2 3.9.13
python 3.12.0 3.9.13
3 changes: 0 additions & 3 deletions docs/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@

- migrate to corallium's rich_printer and styles


- begin migration to corallium and calcipy v1 with copier template

## 1.1.2 (2023-02-16)

### Fix
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ markdown_extensions:
- fenced_code
- footnotes
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.details
- pymdownx.highlight:
linenums: true
Expand Down
Loading

0 comments on commit 57530fe

Please sign in to comment.