Skip to content

Commit

Permalink
chore: Template upgrade
Browse files Browse the repository at this point in the history
Also prepare Insiders.
  • Loading branch information
pawamoy committed Jan 15, 2024
1 parent 2c4ba75 commit d604282
Show file tree
Hide file tree
Showing 15 changed files with 906 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 1.1.3
_commit: 1.2.0
_src_path: gh:pawamoy/copier-pdm
author_email: [email protected]
author_fullname: Timothée Mazzucotelli
Expand All @@ -8,11 +8,13 @@ copyright_date: '2021'
copyright_holder: Timothée Mazzucotelli
copyright_holder_email: [email protected]
copyright_license: ISC License
insiders: false
insiders: true
insiders_repository_name: griffe
project_description: Signatures for entire Python programs. Extract the structure,
the frame, the skeleton of your project, to generate API documentation or find
breaking changes in your API.
project_name: griffe
public_release: true
python_package_command_line_name: griffe
python_package_distribution_name: griffe
python_package_import_name: griffe
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,29 @@ jobs:
- 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.9"},
{"python-version": "3.10"},
{"python-version": "3.11"},
{"python-version": "3.12"}
]' | tr -d '[:space:]' >> $GITHUB_OUTPUT
else
echo 'jobs=[]' >> $GITHUB_OUTPUT
fi
tests:

needs: exclude-test-jobs
strategy:
max-parallel: 4
matrix:
Expand All @@ -69,6 +90,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
exclude: ${{ fromJSON(needs.exclude-test-jobs.outputs.jobs) }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.python-version == '3.12' }}

Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,31 @@ jobs:
run: git fetch --depth=1 --tags
- name: Setup Python
uses: actions/setup-python@v4
- name: Install build
if: github.repository_owner == 'pawamoy-insiders'
run: python -m pip install build
- name: Build dists
if: github.repository_owner == 'pawamoy-insiders'
run: python -m build
- name: Upload dists artifact
uses: actions/upload-artifact@v3
if: github.repository_owner == 'pawamoy-insiders'
with:
name: griffe-insiders
path: ./dist/*
- name: Install git-changelog
if: github.repository_owner != 'pawamoy-insiders'
run: pip install git-changelog
- name: Prepare release notes
if: github.repository_owner != 'pawamoy-insiders'
run: git-changelog --release-notes > release-notes.md
- name: Create release with assets
uses: softprops/action-gh-release@v1
if: github.repository_owner == 'pawamoy-insiders'
with:
files: ./dist/*
- name: Create release
uses: softprops/action-gh-release@v1
if: github.repository_owner != 'pawamoy-insiders'
with:
body_path: release-notes.md
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
SHELL := bash
DUTY := $(if $(VIRTUAL_ENV),,pdm run) duty
export PDM_MULTIRUN_VERSIONS ?= 3.8 3.9 3.10 3.11 3.12
export PDM_MULTIRUN_USE_VENVS ?= $(if $(shell pdm config python.use_venv | grep True),1,0)

args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
check_quality_args = files
Expand Down
6 changes: 6 additions & 0 deletions docs/.overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

{% block announce %}

<a href="{{ 'insiders/#how-to-become-a-sponsor' | url }}"><strong>Sponsorship</strong></a>
is now available!
<span class="twemoji heart pulse">
{% include ".icons/octicons/heart-fill-16.svg" %}
</span> &mdash;

For updates follow <strong>@pawamoy</strong> on
<a rel="me" href="https://fosstodon.org/@pawamoy">
<span class="twemoji mastodon">
Expand Down
124 changes: 124 additions & 0 deletions docs/css/insiders.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
@keyframes heart {

0%,
40%,
80%,
100% {
transform: scale(1);
}

20%,
60% {
transform: scale(1.15);
}
}

@keyframes vibrate {
0%, 2%, 4%, 6%, 8%, 10%, 12%, 14%, 16%, 18% {
-webkit-transform: translate3d(-2px, 0, 0);
transform: translate3d(-2px, 0, 0);
}
1%, 3%, 5%, 7%, 9%, 11%, 13%, 15%, 17%, 19% {
-webkit-transform: translate3d(2px, 0, 0);
transform: translate3d(2px, 0, 0);
}
20%, 100% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}

.heart {
color: #e91e63;
}

.pulse {
animation: heart 1000ms infinite;
}

.vibrate {
animation: vibrate 2000ms infinite;
}

.new-feature svg {
fill: var(--md-accent-fg-color) !important;
}

a.insiders {
color: #e91e63;
}

.sponsorship-list {
width: 100%;
}

.sponsorship-item {
border-radius: 100%;
display: inline-block;
height: 1.6rem;
margin: 0.1rem;
overflow: hidden;
width: 1.6rem;
}

.sponsorship-item:focus, .sponsorship-item:hover {
transform: scale(1.1);
}

.sponsorship-item img {
filter: grayscale(100%) opacity(75%);
height: auto;
width: 100%;
}

.sponsorship-item:focus img, .sponsorship-item:hover img {
filter: grayscale(0);
}

.sponsorship-item.private {
background: var(--md-default-fg-color--lightest);
color: var(--md-default-fg-color);
font-size: .6rem;
font-weight: 700;
line-height: 1.6rem;
text-align: center;
}

.mastodon {
color: #897ff8;
border-radius: 100%;
box-shadow: inset 0 0 0 .05rem currentcolor;
display: inline-block;
height: 1.2rem !important;
padding: .25rem;
transition: all .25s;
vertical-align: bottom !important;
width: 1.2rem;
}

.premium-sponsors {
text-align: center;
}

#silver-sponsors img {
height: 140px;
}

#bronze-sponsors img {
height: 140px;
}

#bronze-sponsors p {
display: flex;
flex-wrap: wrap;
justify-content: center;
}

#bronze-sponsors a {
display: block;
flex-shrink: 0;
}

.sponsors-total {
font-weight: bold;
}
7 changes: 7 additions & 0 deletions docs/insiders/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

## griffe Insiders

### 1.0.0 <small>April 22, 2023</small> { id="1.0.0" }

- Release first Insiders version
1 change: 1 addition & 0 deletions docs/insiders/goals.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
goals: {}
Loading

0 comments on commit d604282

Please sign in to comment.