Skip to content

Commit

Permalink
feat: Generate project using copier-pdm template
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Jan 5, 2024
1 parent 39a8547 commit a018851
Show file tree
Hide file tree
Showing 46 changed files with 2,316 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changes here will be overwritten by Copier
_commit: 0.15.10
_src_path: gh:pawamoy/copier-pdm
author_email: pawamoy@pm.me
author_fullname: Timothée Mazzucotelli
author_username: pawamoy
copyright_date: '2023'
copyright_holder: Timothée Mazzucotelli
copyright_holder_email: pawamoy@pm.me
copyright_license: ISC License
insiders: true
project_description: MkDocs plugin to generate a manpage from the documentation site.
project_name: MkDocs Manpage
python_package_command_line_name: ''
python_package_distribution_name: mkdocs-manpage
python_package_import_name: mkdocs_manpage
repository_name: mkdocs-manpage
repository_namespace: pawamoy
repository_provider: github.com

4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github: pawamoy
ko_fi: pawamoy
custom:
- https://www.paypal.me/pawamoy
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: unconfirmed
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Run command '...'
3. Scroll down to '...'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**System (please complete the following information):**
- `MkDocs Manpage` version: [e.g. 0.2.1]
- Python version: [e.g. 3.8]
- OS: [Windows/Linux]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
112 changes: 112 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: ci

on:
push:
branches:
- master
pull_request:
branches:
- master

defaults:
run:
shell: bash

env:
LANG: en_US.utf-8
LC_ALL: en_US.utf-8
PYTHONIOENCODING: UTF-8

jobs:

quality:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.8"

- name: Resolving dependencies
run: pdm lock -v --no-cross-platform -G ci-quality

- name: Install dependencies
run: pdm install -G ci-quality

- name: Check if the documentation builds correctly
run: pdm run duty check-docs

- name: Check the code quality
run: pdm run duty check-quality

- name: Check if the code is correctly typed
run: pdm run duty check-types

- name: Check for vulnerabilities in dependencies
run: pdm run duty check-dependencies

- name: Check for breaking changes in the API
run: pdm run duty check-api

exclude-test-jobs:
runs-on: ubuntu-latest
outputs:
jobs: ${{ steps.exclude-jobs.outputs.jobs }}
steps:
- id: exclude-jobs
run: |
if ${{ github.repository_owner == 'pawamoy-insiders' }}; then
echo 'jobs=[
{"os": "macos-latest"},
{"os": "windows-latest"},
{"python-version": "3.8"},
{"python-version": "3.9"},
{"python-version": "3.10"},
{"python-version": "3.11"}
]' | tr -d '[:space:]' >> $GITHUB_OUTPUT
else
echo 'jobs=[]' >> $GITHUB_OUTPUT
fi
tests:

needs: exclude-test-jobs
strategy:
max-parallel: 4
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
exclude: ${{ fromJSON(needs.exclude-test-jobs.outputs.jobs) }}

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: ${{ matrix.python-version }}

- name: Resolving dependencies
run: pdm lock -v --no-cross-platform -G ci-tests

- name: Install dependencies
run: pdm install --no-editable -G ci-tests

- name: Run the test suite
run: pdm run duty test
32 changes: 32 additions & 0 deletions .github/workflows/dists.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: dists

on: push
permissions:
contents: write

jobs:
build:
name: Build dists
runs-on: ubuntu-latest
if: github.repository_owner == 'pawamoy-insiders'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v3
- name: Install build
run: python -m pip install build
- name: Build dists
run: python -m build
- name: Upload dists artifact
uses: actions/upload-artifact@v3
with:
name: mkdocs-manpage-insiders
path: ./dist/*
- name: Create release and upload assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./dist/*
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.idea/
__pycache__/
*.py[cod]
dist/
*.egg-info/
build/
htmlcov/
.coverage*
pip-wheel-metadata/
.pytest_cache/
.mypy_cache/
site/
pdm.lock
pdm.toml
.pdm-plugins/
.pdm-python
__pypackages__/
.venv/
.cache/
7 changes: 7 additions & 0 deletions .gitpod.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM gitpod/workspace-full
USER gitpod
ENV PIP_USER=no
ENV PYTHON_VERSIONS=
RUN pip3 install pipx; \
pipx install pdm; \
pipx ensurepath
13 changes: 13 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
vscode:
extensions:
- ms-python.python

image:
file: .gitpod.dockerfile

ports:
- port: 8000
onOpen: notify

tasks:
- init: make setup
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- insertion marker -->

0 comments on commit a018851

Please sign in to comment.