Skip to content

Add initial implementation of the mkdocs-color-swatch-plugin #1

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

Merged
merged 7 commits into from
Apr 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
37 changes: 37 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "saturday"
time: "07:00"
labels:
- "dependencies"
assignees:
- "fabieu"
groups:
major-updates:
update-types:
- "major"
minor-updates:
update-types:
- "minor"
- "patch"
other-updates:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "saturday"
time: "07:00"
labels:
- "dependencies"
assignees:
- "fabieu"
groups:
gh-actions:
patterns:
- "*"
20 changes: 20 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
changelog:
exclude:
labels:
- ignore-for-release
categories:
- title: Breaking Changes ⚠️
labels:
- "breaking change"
- title: Bug Fixes 🐛
labels:
- "bug"
- title: Features 🎉
labels:
- "enhancement"
- title: Dependency Updates ⬆️
labels:
- "dependencies"
- title: Other Changes
labels:
- "*"
68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build and publish mkdocs-color-swatch-plugin

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
variables:
name: Set environment variables
runs-on: ubuntu-latest
container:
image: ${{ vars.PYTHON_IMAGE }}
outputs:
version: ${{ env.VERSION }}
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install poetry
run: pip install poetry==${{ vars.POETRY_VERSION }}

- name: Save version to environment
run: echo "VERSION=$(poetry version -s)" >> "$GITHUB_ENV"

- name: Display version
run: echo "Version ${{ env.VERSION }}"
test:
uses: ./.github/workflows/test.yml
publish:
name: Publish package to PYPI
runs-on: ubuntu-latest
needs:
- test
- variables
container:
image: ${{ vars.PYTHON_IMAGE }}
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install poetry
run: pip install poetry==${{ vars.POETRY_VERSION }}

- name: Install project dependencies
run: poetry install

- name: Public package to PYPI via Poetry
run: poetry publish --build --no-interaction --username __token__ --password ${{ secrets.PYPI_TOKEN }}
create-release:
name: Create release
runs-on: ubuntu-latest
needs:
- variables
- publish
timeout-minutes: 5
steps:
- name: Release
uses: softprops/action-gh-release@v2
with:
name: Release v${{ needs.variables.outputs.version }}
tag_name: v${{ needs.variables.outputs.version }}
target_commitish: ${{ github.sha }}
generate_release_notes: true
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test Python Package

on:
pull_request:
branches:
- main
workflow_call:
workflow_dispatch:

jobs:
test:
name: Run tests with pytest
runs-on: ubuntu-latest
container:
image: ${{ vars.PYTHON_IMAGE }}
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Poetry
run: pip install poetry==${{ vars.POETRY_VERSION }}

- name: Install dependencies
run: poetry install

- name: Run pytest
run: poetry run pytest
90 changes: 79 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -94,12 +95,6 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
Expand Down Expand Up @@ -167,8 +162,81 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
10 changes: 10 additions & 0 deletions .idea/.gitignore

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

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

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

9 changes: 9 additions & 0 deletions .idea/misc.xml

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

9 changes: 9 additions & 0 deletions .idea/mkdocs-color-swatch-plugin.iml

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

Loading