Skip to content

Commit

Permalink
Merge pull request #42 from camptocamp/dpkg-clone
Browse files Browse the repository at this point in the history
Clone the image dict
  • Loading branch information
sbrunner authored Jan 9, 2025
2 parents 1f6cf2b + 2039ed5 commit a484a88
Show file tree
Hide file tree
Showing 17 changed files with 127 additions and 254 deletions.
4 changes: 0 additions & 4 deletions .bandit.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/tag-publish/0.7.1/tag_publish/schema.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/tag-publish/0.13.3/tag_publish/schema.json

pypi:
versions:
versions_type:
- tag
- stabilization_branch
- default_branch
Expand Down
100 changes: 13 additions & 87 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,102 +1,28 @@
{
extends: ['config:base'],
timezone: 'Europe/Zurich',
schedule: 'after 5pm on the first day of the month',
labels: ['dependencies'],
separateMajorMinor: true,
separateMinorPatch: true,
prHourlyLimit: 0,
prConcurrentLimit: 0,
baseBranches: ['master'],
'pre-commit': { enabled: true },
lockFileMaintenance: {
enabled: true,
automerge: true,
schedule: 'after 5pm on the first day of the month',
},
regexManagers: [
/** Do updates on pre-commit additional dependencies */
{
fileMatch: ['^\\.pre\\-commit\\-config\\.yaml$'],
matchStrings: [" +- '?(?<depName>[^' @=]+)(@|==)(?<currentValue>[^' @=]+)'? # (?<datasource>.+)"],
},
extends: [
'config:base',
'github>camptocamp/gs-renovate-config-preset:base.json5#0.3.3',
'github>camptocamp/gs-renovate-config-preset:ci.json5#0.3.3',
'github>camptocamp/gs-renovate-config-preset:pre-commit.json5#0.3.3',
'github>camptocamp/gs-renovate-config-preset:python.json5#0.3.3',
'github>camptocamp/gs-renovate-config-preset:json-schema.json5#0.3.3',
'github>camptocamp/gs-renovate-config-preset:shellcheck.json5#0.3.3',
],
minimumReleaseAge: '7 days',
customManagers: [
/** Do update on the schema present in the ci/config.yaml */
{
fileMatch: ['^ci/config\\.yaml$'],
matchStrings: [
'.*https://raw\\.githubusercontent\\.com/(?<depName>[^\\s]+)/(?<currentValue>[0-9\\.]+)/.*',
],
datasourceTemplate: 'github-tags',
},
/** Python version in actions/setup-python action */
{
fileMatch: ['^\\.github/workflows/.*\\.yaml$'],
matchStrings: [' python-version: [\'"](?<currentValue>[0-9\\.]+)[\'"]'],
datasourceTemplate: 'python-version',
depNameTemplate: 'python',
customType: 'regex',
},
{
fileMatch: ['^tag_publish/versions.yaml$'],
matchStrings: ['(?<depName>.*): (?<currentValue>.*) # (?<datasource>.*)'],
},
],
packageRules: [
/** Automerge the patch, the minor and the dev dependency */
{
matchBaseBranches: ['master'],
matchUpdateTypes: ['minor', 'patch'],
automerge: true,
},
/** Auto merge the dev dependency update */
{
matchDepTypes: ['devDependencies'],
automerge: true,
},
/** Group and auto merge the patch updates */
{
matchUpdateTypes: ['patch'],
groupName: 'all patch versions',
automerge: true,
},
/** Group and auto merge the minor updates */
{
matchUpdateTypes: ['minor'],
groupName: 'all minor versions',
automerge: true,
},
/** Group Poetry packages */
{
matchPackagePrefixes: ['poetry'],
groupName: 'CI/build dependencies',
automerge: true,
},
/** Group and auto merge the CI dependencies */
{
matchFileNames: ['.github/**', '.pre-commit-config.yaml', 'ci/**'],
groupName: 'CI/build dependencies',
automerge: true,
},
/** Accept only the patch on stabilization branches */
{
matchBaseBranches: ['/^[0-9]+\\.[0-9]+$/'],
matchUpdateTypes: ['major', 'minor', 'pin', 'digest', 'lockFileMaintenance', 'rollback', 'bump'],
enabled: false,
},
/** Support the 4 parts of shellcheck-py version with a v prefix */
{
versioning: 'regex:^v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)\\.(?<build>\\d+)$',
matchDepNames: ['shellcheck-py/shellcheck-py'],
},
/** Disable upgrading the supported Python version */
{
matchFileNames: ['pyproject.toml'],
enabled: false,
matchDepNames: ['python'],
},
/** Packages published very recently are not pushed to stabilization branches for security reasons */
{
matchBaseBranches: ['/^[0-9]+\\.[0-9]+$/'],
minimumReleaseAge: '7 days',
customType: 'regex',
},
],
}
22 changes: 0 additions & 22 deletions .github/workflows/backport.yaml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/clean.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: "pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}\npre-commit-"
- run: pre-commit run --all-files
- run: git diff --exit-code --patch > /tmp/pre-commit.patch || true
- run: pre-commit run --all-files --color=always
- run: git diff --exit-code --patch > /tmp/pre-commit.patch; git diff --color; git reset --hard || true
if: failure()
- uses: actions/upload-artifact@v4
with:
Expand Down
14 changes: 10 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ repos:
- id: jsonschema-validator
files: |-
(?x)^(
ci/config\.yaml
\.github/ghci\.yaml
|\.github/publish\.yaml
)$
- repo: https://github.com/sbrunner/jsonschema2md2
rev: 1.3.0
Expand Down Expand Up @@ -101,12 +102,13 @@ repos:
hooks:
- id: prospector
args:
- --tool=pydocstyle
- --tool=ruff
- --die-on-tool-error
- --output-format=pylint
additional_dependencies:
- prospector-profile-duplicated==1.8.1 # pypi
- prospector-profile-utils==1.12.2 # pypi
- prospector-profile-duplicated==1.10.4 # pypi
- prospector-profile-utils==1.15.1 # pypi
- ruff==0.7.3 # pypi
- repo: https://github.com/mheap/json-schema-spell-checker
rev: main
hooks:
Expand All @@ -121,3 +123,7 @@ repos:
- --ignore-numbers
- --ignore-acronyms
- --en-us
- repo: https://github.com/sbrunner/python-versions-hook
rev: 0.8.0
hooks:
- id: python-versions
16 changes: 9 additions & 7 deletions .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ inherits:
- utils:base
- utils:no-design-checks
- utils:fix
- utils:unsafe
- duplicated

doc-warnings: true

ignore-paths:
- tag_publish/configuration.py

pylint:
disable:
- missing-module-docstring
mypy:
options:
python-version: '3.9'

bandit:
ruff:
options:
config: .bandit.yaml
target-version: py39
disable:
- S607 # Starting a process with a partial executable path [See: https://docs.astral.sh/ruff/rules/start-process-with-partial-path]
- S603 # `subprocess` call: check for execution of untrusted input [See: https://docs.astral.sh/ruff/rules/subprocess-without-shell-equals-true]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020-2024, Camptocamp SA
Copyright (c) 2020-2025, Camptocamp SA
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 4 additions & 0 deletions jsonschema-gentypes.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/sbrunner/jsonschema-gentypes/2.9.3/jsonschema_gentypes/schema.json

headers: |
"""
Automatically generated file from a JSON schema.
"""
python_version: '3.9'

pre_commit:
enabled: true
hooks_skip:
Expand Down
44 changes: 36 additions & 8 deletions poetry.lock

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

Loading

0 comments on commit a484a88

Please sign in to comment.