Skip to content

Commit 79a9244

Browse files
committed
feat: Generate project with gh:mkdocstrings/handler-template Copier template
1 parent 00cd6f1 commit 79a9244

Some content is hidden

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

49 files changed

+2695
-9
lines changed

.copier-answers.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changes here will be overwritten by Copier
2+
_commit: 0.2.1
3+
_src_path: gh:mkdocstrings/handler-template
4+
author_email: [email protected]
5+
author_fullname: Timothée Mazzucotelli
6+
author_username: pawamoy
7+
copyright_date: '2023'
8+
copyright_holder: Timothée Mazzucotelli
9+
copyright_holder_email: [email protected]
10+
copyright_license: ISC License
11+
insiders: true
12+
language: TypeScript
13+
project_description: A Typescript handler for mkdocstrings.
14+
project_name: mkdocstrings-typescript
15+
python_package_distribution_name: mkdocstrings-typescript
16+
python_package_import_name: typescript
17+
repository_name: typescript
18+
repository_namespace: mkdocstrings
19+
repository_provider: github.com
20+

.github/FUNDING.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
github: pawamoy
2+
ko_fi: pawamoy
3+
custom:
4+
- https://www.paypal.me/pawamoy

.github/ISSUE_TEMPLATE/bug_report.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: unconfirmed
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Run command '...'
17+
3. Scroll down to '...'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**System (please complete the following information):**
27+
- `mkdocstrings-typescript` version: [e.g. 0.2.1]
28+
- Python version: [e.g. 3.8]
29+
- OS: [Windows/Linux]
30+
31+
**Additional context**
32+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: feature
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/ci.yml

+111-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,114 @@
1+
name: ci
12

23
on:
3-
push:
4+
push:
5+
pull_request:
6+
branches:
7+
- main
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
env:
14+
LANG: en_US.utf-8
15+
LC_ALL: en_US.utf-8
16+
PYTHONIOENCODING: UTF-8
17+
418
jobs:
5-
all:
6-
runs-on: ubuntu-latest
7-
steps:
8-
- run: echo "Nothing to do!"
19+
20+
quality:
21+
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v3
27+
28+
- name: Fetch all tags
29+
run: git fetch --depth=1 --tags
30+
31+
- name: Set up PDM
32+
uses: pdm-project/setup-pdm@v3
33+
with:
34+
python-version: "3.8"
35+
36+
- name: Resolving dependencies
37+
run: pdm lock -v --no-cross-platform -G ci-quality
38+
39+
- name: Install dependencies
40+
run: pdm install -G ci-quality
41+
42+
- name: Check if the documentation builds correctly
43+
run: pdm run duty check-docs
44+
45+
- name: Check the code quality
46+
run: pdm run duty check-quality
47+
48+
- name: Check if the code is correctly typed
49+
run: pdm run duty check-types
50+
51+
- name: Check for vulnerabilities in dependencies
52+
run: pdm run duty check-dependencies
53+
54+
- name: Check for breaking changes in the API
55+
run: pdm run duty check-api
56+
57+
exclude-test-jobs:
58+
runs-on: ubuntu-latest
59+
outputs:
60+
jobs: ${{ steps.exclude-jobs.outputs.jobs }}
61+
steps:
62+
- id: exclude-jobs
63+
run: |
64+
if ${{ github.repository_owner == 'pawamoy-insiders' }}; then
65+
echo 'jobs=[
66+
{"os": "macos-latest"},
67+
{"os": "windows-latest"},
68+
{"python-version": "3.9"},
69+
{"python-version": "3.10"},
70+
{"python-version": "3.11"},
71+
{"python-version": "3.12"}
72+
]' | tr -d '[:space:]' >> $GITHUB_OUTPUT
73+
else
74+
echo 'jobs=[]' >> $GITHUB_OUTPUT
75+
fi
76+
77+
tests:
78+
79+
needs: exclude-test-jobs
80+
strategy:
81+
max-parallel: 4
82+
matrix:
83+
os:
84+
- ubuntu-latest
85+
- macos-latest
86+
- windows-latest
87+
python-version:
88+
- "3.8"
89+
- "3.9"
90+
- "3.10"
91+
- "3.11"
92+
- "3.12"
93+
exclude: ${{ fromJSON(needs.exclude-test-jobs.outputs.jobs) }}
94+
runs-on: ${{ matrix.os }}
95+
continue-on-error: ${{ matrix.python-version == '3.12' }}
96+
97+
steps:
98+
- name: Checkout
99+
uses: actions/checkout@v3
100+
101+
- name: Set up PDM
102+
uses: pdm-project/setup-pdm@v3
103+
with:
104+
python-version: ${{ matrix.python-version }}
105+
allow-python-prereleases: true
106+
107+
- name: Resolving dependencies
108+
run: pdm lock -v --no-cross-platform -G ci-tests
109+
110+
- name: Install dependencies
111+
run: pdm install --no-editable -G ci-tests
112+
113+
- name: Run the test suite
114+
run: pdm run duty test

.github/workflows/release.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: release
2+
3+
on: push
4+
permissions:
5+
contents: write
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
if: startsWith(github.ref, 'refs/tags/')
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Fetch all tags
15+
run: git fetch --depth=1 --tags
16+
- name: Setup Python
17+
uses: actions/setup-python@v4
18+
- name: Install build
19+
if: github.repository_owner == 'pawamoy-insiders'
20+
run: python -m pip install build
21+
- name: Build dists
22+
if: github.repository_owner == 'pawamoy-insiders'
23+
run: python -m build
24+
- name: Upload dists artifact
25+
uses: actions/upload-artifact@v3
26+
if: github.repository_owner == 'pawamoy-insiders'
27+
with:
28+
name: typescript-insiders
29+
path: ./dist/*
30+
- name: Install git-changelog
31+
if: github.repository_owner != 'pawamoy-insiders'
32+
run: pip install git-changelog
33+
- name: Prepare release notes
34+
if: github.repository_owner != 'pawamoy-insiders'
35+
run: git-changelog --release-notes > release-notes.md
36+
- name: Create release with assets
37+
uses: softprops/action-gh-release@v1
38+
if: github.repository_owner == 'pawamoy-insiders'
39+
with:
40+
files: ./dist/*
41+
- name: Create release
42+
uses: softprops/action-gh-release@v1
43+
if: github.repository_owner != 'pawamoy-insiders'
44+
with:
45+
body_path: release-notes.md

.gitignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.idea/
2+
__pycache__/
3+
*.py[cod]
4+
dist/
5+
*.egg-info/
6+
build/
7+
htmlcov/
8+
.coverage*
9+
pip-wheel-metadata/
10+
.pytest_cache/
11+
.mypy_cache/
12+
site/
13+
pdm.lock
14+
pdm.toml
15+
.pdm-plugins/
16+
.pdm-python
17+
__pypackages__/
18+
.venv/
19+
.cache/

.gitpod.dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM gitpod/workspace-full
2+
USER gitpod
3+
ENV PIP_USER=no
4+
RUN pip3 install pipx; \
5+
pipx install pdm; \
6+
pipx ensurepath

.gitpod.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
vscode:
2+
extensions:
3+
- ms-python.python
4+
5+
image:
6+
file: .gitpod.dockerfile
7+
8+
ports:
9+
- port: 8000
10+
onOpen: notify
11+
12+
tasks:
13+
- init: make setup

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7+
8+
<!-- insertion marker -->

0 commit comments

Comments
 (0)