Skip to content
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

Add Touch as namespace plugin #2

Merged
merged 26 commits into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a29fb4c
Add a touch plugin
almet Aug 17, 2013
a305859
Make touch plugin touch files with lists
arty-name Jul 20, 2014
a3a5c31
Update timestamps of generated feeds as well
arty-name Aug 28, 2014
4286d23
Convert to namespace plugin filesystem layout
wombelix Mar 3, 2021
ac594d4
Modernize code for Python 3.6+
wombelix Mar 3, 2021
ff29de7
Add code style and CI/CD configuration
wombelix Mar 3, 2021
2e541d8
Apply code style conventions to project
wombelix Mar 3, 2021
39554dc
Add pyproject file to project
wombelix Mar 3, 2021
578e3ff
Update README, LICENSE and add CONTRIBUTING
wombelix Mar 3, 2021
4a4f97d
feat(pre-commit): updated to latest version
wombelix May 23, 2022
c1eeb5d
Require Python 3.8+
justinmayer Apr 5, 2023
346753a
Update linter dependency versions
justinmayer Apr 5, 2023
f98fa53
Enhance GitHub Actions CI configuration
justinmayer Apr 5, 2023
2f6dae0
Improve Invoke tasks
justinmayer Apr 5, 2023
b78e7f0
Fix README build status badge
justinmayer Apr 5, 2023
a5ba810
Improve plugin description in README
justinmayer Apr 5, 2023
0e6e4d4
Add funding links
justinmayer Apr 5, 2023
f93876d
Lint code via Ruff instead of Flake8 & isort
justinmayer Apr 24, 2023
b1a9b1f
Adjust code to comply with new Ruff-powered rules
justinmayer Apr 24, 2023
c667f18
Add docstrings to plugin functions
justinmayer Apr 24, 2023
a8dee40
Replace sys.exit() with `raise SystemExit()`
justinmayer Apr 24, 2023
fc0d7d6
Hide deprecation warnings when running tests
justinmayer Apr 24, 2023
8b9ca3e
Remove test file and CI job (no tests exist yet)
justinmayer Apr 24, 2023
0a8ad9e
Skip PyPI badge link validation in CI
justinmayer Apr 24, 2023
3bc3741
Improve Pip/Poetry caching strategy in CI context
justinmayer Apr 24, 2023
4598f45
Prepare release
justinmayer Apr 28, 2023
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
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.py]
max_line_length = 88

[*.yml]
indent_size = 2
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: justinmayer
liberapay: pelican
72 changes: 72 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: build

on: [push, pull_request]

env:
PYTEST_ADDOPTS: "--color=yes"

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Validate links in Markdown files
uses: JustinBeckwith/linkinator-action@v1
with:
retry: true
linksToSkip: "https://pypi.org/project/pelican-touch/"

- name: Install Poetry
run: pipx install poetry

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "poetry"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
run: |
poetry env use "3.9"
poetry install --no-interaction

- name: Run linters
run: poetry run invoke lint --diff

deploy:
name: Deploy
environment: Deployment
needs: [lint]
runs-on: ubuntu-latest
if: github.ref=='refs/heads/main' && github.event_name!='pull_request'

steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Check release
id: check_release
run: |
python -m pip install poetry githubrelease httpx==0.18.2 autopub
echo "release=$(autopub check)" >> $GITHUB_OUTPUT

- name: Publish
if: ${{ steps.check_release.outputs.release=='' }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
git remote set-url origin https://[email protected]/${{ github.repository }}
autopub prepare
poetry build
autopub commit
autopub githubrelease
poetry publish -u __token__ -p $PYPI_PASSWORD
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
poetry.lock
31 changes: 31 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
ci:
autoupdate_schedule: quarterly

# See https://pre-commit.com/hooks.html for info on hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: forbid-new-submodules
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.262
hooks:
- id: ruff
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Contributing
============

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on [existing issues][].

To start contributing to this plugin, review the [Contributing to Pelican][] documentation, beginning with the **Contributing Code** section.

[existing issues]: https://github.com/pelican-plugins/touch/issues
[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html
Loading