-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: revert to default block string in copier template (#886)
- Loading branch information
Showing
35 changed files
with
262 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,75 @@ | ||
[% macro coverage_badge() %] | ||
[% if repo_platform == 'github' %] | ||
{% macro coverage_badge() %} | ||
{% if repo_platform == 'github' %} | ||
[![Coverage](https://img.shields.io/endpoint?url=https://{{ page_url() }}/_static/badges/coverage.json)](https://{{ page_url() }}/reports/coverage) | ||
[%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %] | ||
{%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %} | ||
[![coverage report](https://{{ repo_url() }}/badges/main/coverage.svg)](https://{{ repo_url() }}/-/commits/main) | ||
[%- endif %] | ||
[% endmacro %] | ||
{%- endif %} | ||
{% endmacro %} | ||
|
||
[% macro license_badge() %] | ||
[% if repo_platform == 'github' %] | ||
{% macro license_badge() %} | ||
{% if repo_platform == 'github' %} | ||
[![GitHub](https://img.shields.io/github/license/{{ repo_namespace }}/{{ repo_name }})]({{ license_url() }}) | ||
[%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %] | ||
{%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %} | ||
[![GitLab](https://img.shields.io/gitlab/license/{{ repo_namespace }}/{{ repo_name }}?gitlab_url=https%3A%2F%2F{{ repo_host }})]({{ license_url() }}) | ||
[%- endif %] | ||
[% endmacro %] | ||
{%- endif %} | ||
{% endmacro %} | ||
|
||
[% macro license_url() %] | ||
[% if repo_platform == 'github' %] | ||
{% macro license_url() %} | ||
{% if repo_platform == 'github' %} | ||
https://{{ repo_url() }}/blob/main/LICENSE | ||
[%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %] | ||
{%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %} | ||
https://{{ repo_url() }}/-/blob/main/LICENSE | ||
[%- endif %] | ||
[% endmacro %] | ||
{%- endif %} | ||
{% endmacro %} | ||
|
||
[% macro logo_badge() %] | ||
{% macro logo_badge() %} | ||
[![Serious Scaffold Python]({{ logo_badge_url() }})](https://serious-scaffold.github.io/ss-python) | ||
[%- endmacro %] | ||
{%- endmacro %} | ||
|
||
[% macro logo_badge_url() %] | ||
{% macro logo_badge_url() %} | ||
https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/ss-python/_static/badges/logo.json | ||
[%- endmacro %] | ||
{%- endmacro %} | ||
|
||
[% macro page_url() %] | ||
[% if repo_platform == 'github' %] | ||
{% macro page_url() %} | ||
{% if repo_platform == 'github' %} | ||
{{ repo_namespace }}.github.io/{{ repo_name }} | ||
[%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %] | ||
[% set repo_namespace_root = repo_namespace.split("/")[0] %] | ||
{%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %} | ||
{% set repo_namespace_root = repo_namespace.split("/")[0] %} | ||
{{ repo_namespace_root }}.{{ page_host }}{{ repo_namespace | replace(repo_namespace_root, "", 1) }}/{{ repo_name }} | ||
[%- endif %] | ||
[% endmacro %] | ||
{%- endif %} | ||
{% endmacro %} | ||
|
||
[% macro pipeline_badge() %] | ||
[% if repo_platform == 'github' %] | ||
{% macro pipeline_badge() %} | ||
{% if repo_platform == 'github' %} | ||
[![CI](https://{{ repo_url() }}/actions/workflows/ci.yml/badge.svg)](https://{{ repo_url() }}/actions/workflows/ci.yml) | ||
[![CommitLint](https://{{ repo_url() }}/actions/workflows/commitlint.yml/badge.svg)](https://{{ repo_url() }}/actions/workflows/commitlint.yml) | ||
[![DevContainer](https://{{ repo_url() }}/actions/workflows/devcontainer.yml/badge.svg)](https://{{ repo_url() }}/actions/workflows/devcontainer.yml) | ||
[![Release](https://{{ repo_url() }}/actions/workflows/release.yml/badge.svg)](https://{{ repo_url() }}/actions/workflows/release.yml) | ||
[![Renovate](https://{{ repo_url() }}/actions/workflows/renovate.yml/badge.svg)](https://{{ repo_url() }}/actions/workflows/renovate.yml) | ||
[![Semantic Release](https://{{ repo_url() }}/actions/workflows/semantic-release.yml/badge.svg)](https://{{ repo_url() }}/actions/workflows/semantic-release.yml) | ||
[%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %] | ||
{%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %} | ||
[![pipeline status](https://{{ repo_url() }}/badges/main/pipeline.svg)](https://{{ repo_url() }}/-/commits/main) | ||
[%- endif %] | ||
[% endmacro %] | ||
{%- endif %} | ||
{% endmacro %} | ||
|
||
[% macro releases_url() %] | ||
[% if repo_platform == 'github' %] | ||
{% macro releases_url() %} | ||
{% if repo_platform == 'github' %} | ||
https://{{ repo_url() }}/releases | ||
[%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %] | ||
{%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %} | ||
https://{{ repo_url() }}/-/releases | ||
[%- endif %] | ||
[% endmacro %] | ||
{%- endif %} | ||
{% endmacro %} | ||
|
||
[% macro release_badge() %] | ||
[% if repo_platform == 'github' %] | ||
{% macro release_badge() %} | ||
{% if repo_platform == 'github' %} | ||
[![Release](https://img.shields.io/github/v/release/{{ repo_namespace }}/{{ repo_name }})] | ||
[%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %] | ||
{%- elif repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %} | ||
[![Latest Release](https://{{ repo_url() }}/-/badges/release.svg)] | ||
[%- endif %] | ||
{%- endif %} | ||
({{ releases_url()}}) | ||
[![PyPI](https://img.shields.io/pypi/v/{{ package_name }})](https://pypi.org/project/{{ package_name }}/) | ||
[%- endmacro %] | ||
{%- endmacro %} | ||
|
||
[% macro repo_url() %] | ||
{% macro repo_url() %} | ||
{{ repo_host }}/{{ repo_namespace }}/{{ repo_name }} | ||
[%- endmacro %] | ||
{%- endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
[% macro version_higher_than(version1, version2) %] | ||
{% macro version_higher_than(version1, version2) %} | ||
{{ "1" if version1.split(".") | map("int") | list >= version2.split(".") | map("int") | list }} | ||
[%- endmacro %] | ||
{%- endmacro %} | ||
|
||
[% macro version_higher_than_validator(version1, version2) %] | ||
{% macro version_higher_than_validator(version1, version2) %} | ||
{{ | ||
"Invalid version. The version '%s' is not higher than '%s'." % (version1, version2) | ||
if not version_higher_than(version1, version2) | ||
}} | ||
[%- endmacro %] | ||
{%- endmacro %} | ||
|
||
[% macro version_between(version, version_min, version_max) %] | ||
{% macro version_between(version, version_min, version_max) %} | ||
{{ | ||
"1" if version_min.split(".") | map("int") | list <= version.split(".") | map("int") | list <= version_max.split(".") | map("int") | list | ||
}} | ||
[%- endmacro %] | ||
{%- endmacro %} | ||
|
||
[% macro version_between_validator(version, version_min, version_max) %] | ||
{% macro version_between_validator(version, version_min, version_max) %} | ||
{{ | ||
"Invalid version. The version '%s' is not between '%s' and '%s'." % (version, version_min, version_max) | ||
if not version_between(version, version_min, version_max) | ||
}} | ||
[%- endmacro %] | ||
{%- endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.