Skip to content

introducing renovate and update a first group of workflows #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4c02f6a
Create renovate.json
tschm Apr 16, 2025
66bd2a3
chore(deps): update astral-sh/setup-uv action to v5
renovate[bot] Apr 16, 2025
e405d52
specify non-standard location of pre-commit file in renovate.json
tschm Apr 16, 2025
140cdbf
Update renovate.json
tschm Apr 16, 2025
5369394
Merge pull request #1 from tschm/renovate/astral-sh-setup-uv-5.x
tschm Apr 16, 2025
b7b240e
Without pre-commit in enabled managers?
tschm Apr 16, 2025
b30a5bc
Tell renovate about the location of pyproject.toml
tschm Apr 16, 2025
1ccba8f
Update renovate.json
tschm Apr 16, 2025
cf5de1c
Update renovate.json
tschm Apr 16, 2025
76c4e6b
Update renovate.json
tschm Apr 16, 2025
3460d5f
Update renovate.json
tschm Apr 16, 2025
072f4dd
revisit renovate.json
tschm Apr 16, 2025
7314918
revisit renovate.json
tschm Apr 16, 2025
2765ca2
revisit renovate.json
tschm Apr 16, 2025
5f0d490
revisit renovate.json
tschm Apr 16, 2025
831ce7d
renovate failed to parse the yaml file
tschm Apr 16, 2025
225a866
renovate failed to parse the yaml file
tschm Apr 16, 2025
4997d48
If the License is an MD file it needs to respect all those md rules
tschm Apr 16, 2025
0fbeb14
ignore the .idea folder
tschm Apr 16, 2025
0009171
simple Makefile to run pre-commit locally
tschm Apr 16, 2025
b7facd1
Respect the md rules in techdebt
tschm Apr 16, 2025
840c2c2
Respect the md rules in examples.md
tschm Apr 16, 2025
a281ca8
following the change in LICENSE.md to LICENSE
tschm Apr 16, 2025
b334f56
chore(deps): update pre-commit hook rhysd/actionlint to v1.7.7 (#2)
renovate[bot] Apr 16, 2025
15f55eb
chore(deps): update pre-commit hook crate-ci/typos to v1.31.1
renovate[bot] Apr 16, 2025
65a23fb
chore(deps): update pre-commit hook pre-commit/pre-commit-hooks to v5
renovate[bot] Apr 16, 2025
54f8b7e
complaint with pep621
tschm Apr 16, 2025
dbf02ae
Merge pull request #5 from tschm/renovate/crate-ci-typos-1.x
tschm Apr 16, 2025
92a5e5f
Merge pull request #7 from tschm/renovate/pre-commit-pre-commit-hooks…
tschm Apr 16, 2025
3929451
chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.5
renovate[bot] Apr 16, 2025
30d3679
Merge pull request #4 from tschm/renovate/astral-sh-ruff-pre-commit-0.x
tschm Apr 16, 2025
6e4341f
Update LICENSE
tschm Apr 17, 2025
b826cf8
chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.1…
renovate[bot] Apr 17, 2025
439d744
chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.1…
renovate[bot] Apr 25, 2025
ffafcd7
chore(deps): update pre-commit hook crate-ci/typos to v1.31.2 (#11)
renovate[bot] Apr 28, 2025
88766a8
chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.1…
renovate[bot] May 1, 2025
d787ae5
chore(deps): update pre-commit hook crate-ci/typos to v1.32.0 (#13)
renovate[bot] May 2, 2025
f23ff6e
chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.1…
renovate[bot] May 9, 2025
2067232
chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.1…
renovate[bot] May 15, 2025
6ac2b3d
chore(deps): update pre-commit hook igorshubovych/markdownlint-cli to…
renovate[bot] May 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"extends": [
"config:recommended",
":enablePreCommit",
":automergeMinor",
":dependencyDashboard",
":semanticCommits",
":pinDevDependencies"
],
"enabledManagers": [
"github-actions",
"pep621",
"pre-commit"
],
"packageRules": [
{
"matchManagers": ["pre-commit"],
"matchPaths": ["src/py/.pre-commit-config.yaml"]
},
{
"matchManagers": ["pep621"],
"matchPaths": ["src/py/pyproject.toml"]
}
]
}
4 changes: 2 additions & 2 deletions .github/workflows/publish_testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
- name: Install Dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install xvfb
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
- uses: actions/setup-python@v5
with:
python-version-file: "./src/py/pyproject.toml"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
working-directory: ./src/py/
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
- uses: actions/setup-python@v5
with:
python-version-file: "./src/py/pyproject.toml"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ src/py/integration_tests/report*
# avoid ignore .gitkeep
!src/py/integration_tests/renders/.gitkeep
node_modules/

# IDE
.idea
File renamed without changes.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.DEFAULT_GOAL := help

venv:
@curl -LsSf https://astral.sh/uv/install.sh | sh
@uv venv --python '3.12'


.PHONY: install
install: venv ## Install a virtual environment
@uv pip install --upgrade pip
@uv sync --all-extras --dev --frozen


.PHONY: fmt
fmt: venv ## Run autoformatting and linting
@uv pip install pre-commit
@uv run pre-commit install --config src/py/.pre-commit-config.yaml
@uv run pre-commit run --config src/py/.pre-commit-config.yaml --all-files


.PHONY: help
help: ## Display this help screen
@echo -e "\033[1mAvailable commands:\033[0m"
@grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' | sort
65 changes: 36 additions & 29 deletions src/py/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
%YAML 1.2
---
exclude: |
(?x)(
src/py/site/.*|
src/py/integration_tests/mocks/.*|
src/py/intergation_tests/renders/.*|
src/py/integration_tests/renders/.*|
src/js/.*|
\.js$
)
default_install_hook_types: [pre-commit, commit-msg]
default_stages: [pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -30,7 +28,7 @@ repos:
- id: add-trailing-comma
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.2
rev: v0.11.10
hooks:
# Run the linter.
- id: ruff
Expand All @@ -39,23 +37,22 @@ repos:
- id: ruff-format
types_or: [python, pyi]
# options: ignore one line things [E701]
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
name: yamllint
description: This hook runs yamllint.
entry: yamllint
language: python
types: [file, yaml]
args: ['-d', "{\
extends: default,\
rules: {\
colons: { max-spaces-after: -1 }\
}\
}"]

# you check the actions below
#- repo: https://github.com/adrienverge/yamllint
# rev: v1.35.1
# hooks:
# - id: yamllint
# name: yamllint
# description: This hook runs yamllint.
# entry: yamllint
# language: python
# types: [file, yaml]
# args: ['-d', '{"extends": "default",
# "rules": {"colons": {"max-spaces-after": -1}}}']

- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
rev: v1.7.7
hooks:
- id: actionlint
name: Lint GitHub Actions workflow files
Expand All @@ -64,6 +61,7 @@ repos:
types: ["yaml"]
files: ^\.github/workflows/
entry: actionlint

- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
Expand All @@ -75,19 +73,28 @@ repos:
entry: gitlint
args: [--staged, -c, "general.ignore=B6,T3", --msg-filename]
stages: [commit-msg]

- repo: https://github.com/crate-ci/typos
rev: v1.28.2
rev: v1.32.0
hooks:
- id: typos
- repo: https://github.com/markdownlint/markdownlint
rev: v0.13.0

# - repo: https://github.com/markdownlint/markdownlint
# rev: v0.13.0
# hooks:
# - id: markdownlint
# name: Markdownlint
# description: Run markdownlint on your Markdown files
# entry: mdl --rules ~MD026 --style .markdown.rb
# language: ruby
# files: \.(md|mdown|markdown)$

# no ruby acrobatic needed
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.45.0
hooks:
- id: markdownlint
name: Markdownlint
description: Run markdownlint on your Markdown files
entry: mdl --rules ~MD026 --style .markdown.rb
language: ruby
files: \.(md|mdown|markdown)$

- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion src/py/REFACTOR_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Techdebt

We are just at the line of techdebt:

How to refactor:


1. We need more thoughtful design of how to manage parallel tasking with async/await
a. We are beginning to look a bit like callback hell.
2. The above would probably accompany a switch from inheritance of choreo to composition
Expand Down
9 changes: 2 additions & 7 deletions src/py/docs/examples.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Kaleido Code Snippets


### Basic
## Basic

```python
import plotly.express as px
Expand Down Expand Up @@ -31,7 +30,6 @@ figures = [fig, fig2]

kaleido.write_fig_sync(fig, path="./output/")


## Multiple image write with error collection

error_log = []
Expand All @@ -50,7 +48,6 @@ if error_log:
print(str(e))
raise RuntimeError("{len(error_log)} images failed.")


## async/await style of above

await kaleido.write_fig(
Expand All @@ -61,12 +58,11 @@ await kaleido.write_fig(
)
```

### Generator (for batch processing)
## Generator (for batch processing)

Generating all of the plotly figures can take too much memory depending on the
number of figures, so use a generator:


```python
import plotly.express as px
import kaleido
Expand All @@ -88,7 +84,6 @@ def generate_figures(): # can be async as well
kaleido.write_fig_sync(generate_figures(), path="./output/", n=4)
# file names will be taken from figure title


### If you need more control, use an object

def generate_figure_objects():
Expand Down
15 changes: 2 additions & 13 deletions src/py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ kaleido = ['vendor/**']
[project]
name = "kaleido"
description = "Plotly graph export library"
license = {file = "LICENSE.md"}
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.8"
dynamic = ["version"]
Expand All @@ -39,7 +39,7 @@ Repository = "https://github.com/plotly/kaleido"
kaleido_mocker = "kaleido._mocker:build_mocks"
kaleido_get_chrome = "choreographer.cli._cli_utils:get_chrome_cli"

[dependency-groups]
[project.optional-dependencies]
dev = [
"pytest",
"pytest-asyncio",
Expand All @@ -52,17 +52,6 @@ dev = [
"pandas>=2.0.3",
]

#docs = [
# "mkquixote @ git+ssh://[email protected]/geopozo/mkquixote; python_version>= '3.11'",
# "mkdocs>=1.6.1",
# "mkdocs-material>=9.5.49",
#]

#[tool.uv.sources]
#mkquixote = { path = "../../../mkquixote", editable = true }
#choreographer = { path = "../../../devtools_protocol", editable = true }
#logistro = { path = "../../../logistro", editable = true }

[tool.ruff.lint]
select = ["ALL"]
ignore = [
Expand Down
27 changes: 12 additions & 15 deletions src/py/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.