Skip to content

Commit 9ad9569

Browse files
authored
Merge pull request #16 from offbyone/vendor-webassets
Vendor webassets code
2 parents 17faf0d + 7e32761 commit 9ad9569

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+11621
-158
lines changed

.github/workflows/main.yml

+33-45
Original file line numberDiff line numberDiff line change
@@ -5,68 +5,62 @@ on: [push, pull_request]
55
env:
66
PYTEST_ADDOPTS: "--color=yes"
77

8-
jobs:
8+
permissions:
9+
contents: read
910

11+
jobs:
1012
test:
11-
name: Test - ${{ matrix.python-version }}
13+
name: Test - Python ${{ matrix.python-version }}
1214
runs-on: ubuntu-latest
1315
strategy:
1416
matrix:
15-
python-version: ["3.8", "3.9", "3.10", "3.11"]
17+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1618

1719
steps:
18-
- uses: actions/checkout@v3
19-
20-
- name: Install Poetry
21-
run: pipx install poetry
22-
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v4
20+
- uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
23+
- name: Install pdm
24+
uses: pdm-project/setup-pdm@v4
2525
with:
2626
python-version: ${{ matrix.python-version }}
27-
cache: "poetry"
28-
cache-dependency-path: "pyproject.toml"
27+
cache: true
28+
cache-dependency-path: ./pyproject.toml
29+
version: "2.20.0"
2930

3031
- name: Install dependencies
3132
run: |
32-
poetry env use "${{ matrix.python-version }}"
33-
poetry run pip install --upgrade libsass
34-
poetry install --no-interaction
33+
pdm install
3534
3635
- name: Run tests
37-
run: poetry run invoke tests
38-
36+
run: pdm run invoke tests
3937

4038
lint:
4139
name: Lint
4240
runs-on: ubuntu-latest
4341

4442
steps:
45-
- uses: actions/checkout@v3
43+
- uses: actions/checkout@v4
44+
with:
45+
persist-credentials: false
4646

4747
- name: Validate links in Markdown files
4848
uses: JustinBeckwith/linkinator-action@v1
4949
with:
5050
retry: true
5151

52-
- name: Install Poetry
53-
run: pipx install poetry
54-
55-
- name: Set up Python
56-
uses: actions/setup-python@v4
52+
- name: Install pdm
53+
uses: pdm-project/setup-pdm@v4
5754
with:
58-
python-version: "3.9"
59-
cache: "poetry"
60-
cache-dependency-path: "pyproject.toml"
55+
python-version: "3.10"
56+
version: "2.20.0"
6157

6258
- name: Install dependencies
6359
run: |
64-
poetry env use "3.9"
65-
poetry install --no-interaction
60+
pdm install
6661
6762
- name: Run linters
68-
run: poetry run invoke lint --diff
69-
63+
run: pdm run invoke lint --diff
7064

7165
deploy:
7266
name: Deploy
@@ -80,31 +74,25 @@ jobs:
8074
id-token: write
8175

8276
steps:
83-
- uses: actions/checkout@v3
84-
with:
85-
token: ${{ secrets.GH_TOKEN }}
77+
- uses: actions/checkout@v4
8678

87-
- name: Set up Python
88-
uses: actions/setup-python@v4
89-
with:
90-
python-version: "3.9"
79+
- name: Install uv
80+
uses: astral-sh/setup-uv@v3
9181

9282
- name: Check release
9383
id: check_release
9484
run: |
95-
python -m pip install --upgrade pip
96-
python -m pip install autopub[github]
97-
autopub check
85+
uvx --with 'autopub[github]' autopub check
9886
9987
- name: Publish
10088
if: ${{ steps.check_release.outputs.autopub_release=='true' }}
10189
env:
102-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10391
run: |
104-
autopub prepare
105-
autopub commit
106-
autopub build
107-
autopub githubrelease
92+
uvx --with 'autopub[github]' autopub prepare
93+
uvx --with 'autopub[github]' autopub commit
94+
uvx --with 'autopub[github]' autopub build
95+
uvx --with 'autopub[github]' autopub githubrelease
10896
10997
- name: Upload package to PyPI
11098
if: ${{ steps.check_release.outputs.autopub_release=='true' }}

.gitignore

-1
This file was deleted.

.pre-commit-config.yaml

+6-15
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ci:
55
# See https://pre-commit.com/hooks.html for info on hooks
66
repos:
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v4.4.0
8+
rev: v5.0.0
99
hooks:
1010
- id: check-added-large-files
1111
- id: check-ast
@@ -20,18 +20,9 @@ repos:
2020
- id: forbid-new-submodules
2121
- id: trailing-whitespace
2222

23-
- repo: https://github.com/psf/black
24-
rev: 23.3.0
23+
- repo: https://github.com/astral-sh/ruff-pre-commit
24+
rev: v0.7.1
2525
hooks:
26-
- id: black
27-
28-
- repo: https://github.com/PyCQA/flake8
29-
rev: 3.9.2
30-
hooks:
31-
- id: flake8
32-
args: [--max-line-length=88]
33-
34-
- repo: https://github.com/PyCQA/isort
35-
rev: 5.11.5
36-
hooks:
37-
- id: isort
26+
- id: ruff
27+
- id: ruff-format
28+
args: ["--check"]

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

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

78
This [Pelican](https://github.com/getpelican/pelican) plugin allows you to use

0 commit comments

Comments
 (0)