Skip to content

Commit

Permalink
Update project with changes from plugin template
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmayer committed Aug 20, 2024
1 parent eb56d2b commit 4ba4f91
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
custom: https://donate.getpelican.com
github: justinmayer
liberapay: pelican
26 changes: 13 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ on: [push, pull_request]
env:
PYTEST_ADDOPTS: "--color=yes"

permissions:
contents: read

jobs:
test:
name: Test - ${{ matrix.python-version }}
name: Test - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }} & PDM
uses: pdm-project/setup-pdm@v3
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
cache: true
Expand All @@ -34,7 +37,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Validate links in Markdown files
uses: JustinBeckwith/linkinator-action@v1
Expand All @@ -43,11 +46,9 @@ jobs:
linksToSkip: "https://pypi.org/project/pelican-minify/"

- name: Set up Python & PDM
uses: pdm-project/setup-pdm@v3
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.10"
cache: true
cache-dependency-path: ./pyproject.toml

- name: Install dependencies
run: pdm install
Expand All @@ -67,25 +68,24 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Check release
id: check_release
run: |
python -m pip install autopub[github]
python -m pip install autopub httpx
python -m pip install https://github.com/scikit-build/github-release/archive/master.zip
autopub check
- name: Publish
if: ${{ steps.check_release.outputs.autopub_release=='true' }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
autopub prepare
autopub commit
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Minify: A Plugin for Pelican

[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/minify/main.yml?branch=main)](https://github.com/pelican-plugins/minify/actions)
[![PyPI Version](https://img.shields.io/pypi/v/pelican-minify)](https://pypi.org/project/pelican-minify/)
[![Downloads](https://img.shields.io/pypi/dm/pelican-minify)](https://pypi.org/project/pelican-minify/)
![License](https://img.shields.io/pypi/l/pelican-minify?color=blue)

This Pelican plugin can compress HTML & CSS files as well as inline CSS and JavaScript in HTML files.
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ keywords = [
"css",
"javascript",
]
readme = "README.md"
license = {text = "MIT"}
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
Expand All @@ -35,7 +35,6 @@ classifiers = [
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
]

requires-python = ">=3.8.1,<4.0"
dependencies = [
"pelican>=4.5",
Expand All @@ -45,7 +44,7 @@ dependencies = [
[project.urls]
Homepage = "https://github.com/pelican-plugins/minify"
"Issue Tracker" = "https://github.com/pelican-plugins/minify/issues"
"Funding" = "https://donate.getpelican.com/"
Funding = "https://donate.getpelican.com/"

[project.optional-dependencies]
markdown = ["markdown>=3.4"]
Expand All @@ -71,7 +70,7 @@ source-includes = [
"DEVELOPMENT.md",
]
includes = ["pelican/"]
excludes = ["tasks.py"]
excludes = ["**/.DS_Store", "**/test_data/**", "tasks.py"]

[tool.autopub]
project-name = "Minify"
Expand Down
4 changes: 2 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def setup(c):
"""Set up the development environment."""
if which("pdm") or ACTIVE_VENV:
tools(c)
c.run(f"{CMD_PREFIX}python -m pip install --upgrade pip")
c.run(f"{PDM} install")
c.run(f"{CMD_PREFIX}python -m pip install --upgrade pip", pty=PTY)
c.run(f"{PDM} update --dev", pty=PTY)
precommit(c)
logger.info("\nDevelopment environment should now be set up and ready!\n")
else:
Expand Down

0 comments on commit 4ba4f91

Please sign in to comment.