Skip to content

Commit

Permalink
2024 redux and modernized tooling (#23)
Browse files Browse the repository at this point in the history
* Moved from pip-tools to uv, updated configs for tools, ran 'pre-commit autoupdate'

* Bumps to latest GitHub Actions versions and using uv in CI

* Bringing Ruff to pass on content

* Removed extra 'markup' TOML section

* Bumped up geekdocs and hugo versions to latest

* Added 2024 redux note
  • Loading branch information
jamesbraza authored Sep 1, 2024
1 parent 70e7df6 commit 71c0104
Show file tree
Hide file tree
Showing 12 changed files with 850 additions and 152 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ jobs:
build:
runs-on: ubuntu-latest
env:
GEEKDOC_VERSION: 0.41.3
# NOTE: keep Hugo version >= 0.111.0, for table of contents improvements
HUGO_VERSION: 0.119.0
GEEKDOC_VERSION: 1.0.0
HUGO_VERSION: 0.133.1
steps:
- name: Install Hugo CLI
# yamllint disable rule:line-length
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
cache: "pip"
- run: python -m pip install -r requirements.txt
- uses: pre-commit/[email protected]
- run: pytest
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv sync
- uses: pre-commit/[email protected]
- run: uv run pytest
86 changes: 51 additions & 35 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,73 +4,89 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/adrienverge/yamllint
rev: v1.32.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
- id: yamllint
args: [--strict]
- id: black-jupyter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.3.3
hooks:
- id: prettier
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
additional_dependencies: [".[tomli]"]
- repo: https://github.com/myint/rstcheck
rev: v6.2.0
rev: v6.2.4
hooks:
- id: rstcheck
additional_dependencies:
- sphinx
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
- repo: https://github.com/srstevenson/nb-clean
rev: 3.3.0
hooks:
- id: prettier
- id: nb-clean
args: [--preserve-cell-outputs, --remove-empty-cells]
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: [--strict]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
args:
- --check-filenames
- --check-hidden
- --ignore-words-list=astroid,ned,ser
- repo: https://github.com/myint/docformatter
rev: v1.7.5
additional_dependencies: [".[toml]"]
- repo: https://github.com/hadolint/hadolint
rev: v2.13.0-beta
hooks:
- id: docformatter
args:
- --in-place
- --pre-summary-newline
- --black
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.10.0
- id: hadolint-docker
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: black
args: [--preview]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.1
- id: check-mailmap
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.19
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: validate-pyproject
additional_dependencies:
- validate-pyproject-schema-store[all]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
rev: v1.11.2
hooks:
- id: mypy
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
entry: uv run pylint
language: system
types: [python]
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10.11
3.12.5
3 changes: 0 additions & 3 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ title = "PyCon Redux"
contentDir = "content/en"
languageName = "English"

# Needed for mermaid shortcodes
[markup]

[markup.goldmark.renderer]
# Needed for mermaid shortcode
unsafe = true
Expand Down
3 changes: 1 addition & 2 deletions content/en/2023/nanoservices/nanoservices.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ def moving_window_average_gen(
data: Iterable[float] = (),
window_size: int = 3,
) -> Generator[float | int | None, float, None]:
"""
Run a nanoservice for a simple moving window average.
"""Run a nanoservice for a simple moving window average.
Starter: https://docs.python.org/3/library/collections.html#deque-recipes
Expand Down
20 changes: 20 additions & 0 deletions content/en/2024/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: 2024
draft: false
---

[PyCon USA 2024](https://us.pycon.org/2024/) general information:

- Location: David L. Lawrence Convention Center in Pittsburgh, PA
- Talks: Friday May 17th to Sunday May 19th
- [Conference schedule](https://us.pycon.org/2024/schedule/)

{{< hint type=note icon=gdoc_fire title="Didn't go">}}
Unfortunately this site's main author did not attend PyCon USA in 2024
due to recently starting a new job,
so there is no redux this time.

If you have a suggestion for a talk, saying, occurrence, etc, please
[open a GitHub issue](https://github.com/jamesbraza/pycon-redux.com/issues/new)
or make a PR into this repo adding the relevant content.
{{< /hint >}}
6 changes: 4 additions & 2 deletions content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ geekdocNav: false
---

<span class="badge-placeholder">[![Lint and Test](https://github.com/jamesbraza/pycon-redux/actions/workflows/lint-test.yaml/badge.svg)](https://github.com/jamesbraza/pycon-redux/actions/workflows/lint-test.yaml)</span>
<span class="badge-placeholder">[![Hugo Version](https://img.shields.io/badge/Hugo-0.119.0-blue.svg)](https://gohugo.io)</span>
<span class="badge-placeholder">[![Geekdocs Version](https://img.shields.io/badge/Geekdocs-0.41.3-blue.svg)](https://geekdocs.de/)</span>
<span class="badge-placeholder">[![Hugo Version](https://img.shields.io/badge/Hugo-0.133.1-blue.svg)](https://gohugo.io)</span>
<span class="badge-placeholder">[![Geekdocs Version](https://img.shields.io/badge/Geekdocs-1.0.0-blue.svg)](https://geekdocs.de/)</span>
<span class="badge-placeholder">[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/jamesbraza/pycon-redux/blob/main/LICENSE)</span>

The Python Conference (PyCon) is an amazing experience,
Expand All @@ -25,3 +25,5 @@ Hope you enjoy!
{{< button size="large" relref="2022" >}}Go to 2022 redux{{< /button >}}
\
{{< button size="large" relref="2023" >}}Go to 2023 redux{{< /button >}}
\
{{< button size="large" relref="2024" >}}No 2024 redux{{< /button >}}
Loading

0 comments on commit 71c0104

Please sign in to comment.