Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck committed Apr 11, 2024
1 parent 9f9a6cb commit f89f064
Show file tree
Hide file tree
Showing 41 changed files with 1,574 additions and 804 deletions.
39 changes: 21 additions & 18 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
_commit: bf2dfcf
_src_path: gh:bswck/skeleton
author_username: bswck
_commit: 0.0.2rc-210-g3b97536
_src_path: gh:skeleton-ci/skeleton-python
author: bswck
cli: true
copyright: Bartosz Sławecki
description: Set up projects for development quickly.
docs: true
docs_slug: project
email_address: [email protected]
github_username: bswck
license_name: MIT
org_full_name: Bartosz Sławecki
package_name: project
project_description: Automatically detect backends & initialize virtual environments
for your Python repo clones.
publish_on_pypi: true
pypi_project_description: Automatically detect backends & initialize virtual environments
for your Python repo clones.
pypi_project_name: project
python_version: '3.8'
repo_name: project
email: [email protected]
github: bswck
license: MIT
package: pj
precommit: true
pypi: true
pypi_description: Set up projects for development quickly.
pypi_project: pj
pypy: true
python: '3.8'
python_until: ''
repo: pj
rtd: pj
tests: true
use_precommit: true
tidelift: false
visibility: public
wip: true
6 changes: 3 additions & 3 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was generated from bswck/skeleton@bf2dfcf.
# This file was generated from skeleton-ci/skeleton[email protected].
# Instead of changing this particular file, you might want to alter the template:
# https://github.com/bswck/skeleton/tree/bf2dfcf/project/.github/%23%25%20if%20author_username%20%3D%3D%20%22bswck%22%20%25%23FUNDING.yml%23%25%20endif%20%25%23.jinja
# https://github.com/skeleton-ci/skeleton-python/tree/0.0.2rc-210-g3b97536/project/.github/%23%25%20if%20author%20%3D%3D%20%22bswck%22%20%25%23FUNDING.yml%23%25%20endif%20%25%23.jinja

github: "bswck"
github: "bswck"
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file was generated from bswck/skeleton@bf2dfcf.
# This file was generated from skeleton-ci/skeleton[email protected].
# Instead of changing this particular file, you might want to alter the template:
# https://github.com/bswck/skeleton/tree/bf2dfcf/project/.github/ISSUE_TEMPLATE/bug.yml.jinja
# https://github.com/skeleton-ci/skeleton-python/tree/0.0.2rc-210-g3b97536/project/.github/ISSUE_TEMPLATE/bug.yml.jinja

# docs https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was generated from bswck/skeleton@bf2dfcf.
# This file was generated from skeleton-ci/skeleton[email protected].
# Instead of changing this particular file, you might want to alter the template:
# https://github.com/bswck/skeleton/tree/bf2dfcf/project/.github/ISSUE_TEMPLATE/config.yml.jinja
# https://github.com/skeleton-ci/skeleton-python/tree/0.0.2rc-210-g3b97536/project/.github/ISSUE_TEMPLATE/config.yml.jinja

blank_issues_enabled: true
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/functionality.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file was generated from bswck/skeleton@bf2dfcf.
# This file was generated from skeleton-ci/skeleton[email protected].
# Instead of changing this particular file, you might want to alter the template:
# https://github.com/bswck/skeleton/tree/bf2dfcf/project/.github/ISSUE_TEMPLATE/functionality.yml.jinja
# https://github.com/skeleton-ci/skeleton-python/tree/0.0.2rc-210-g3b97536/project/.github/ISSUE_TEMPLATE/functionality.yml.jinja

# docs https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Thank you for contributing to project! 🎉
Thank you for contributing to **pj**! 🎉
Provide a general summary of your proposed changes in the Title field above.
-->
Expand All @@ -22,7 +22,7 @@ This pull request is:
- [ ] A new feature implementation
- Please include the issue number, and create an issue if none exists, which must
include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message extended description.
- Please include: `Fixes #<issue number>` in the commit message extended description.
- Please include tests.

**Have a great day!**
47 changes: 47 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,53 @@
# This file was generated from skeleton-ci/[email protected].
# Instead of changing this particular file, you might want to alter the template:
# https://github.com/skeleton-ci/skeleton-python/tree/0.0.2rc-210-g3b97536/project/.github/dependabot.yml.jinja

version: 2
updates:
- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "daily"
groups:
submodules:
dependency-type: "production"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
ignore:
# Actions managed by https://github.com/skeleton-ci/skeleton-python
- dependency-name: "actions/checkout"
- dependency-name: "actions/setup-python"
- dependency-name: "codecov/codecov-action"
- dependency-name: "pypa/gh-action-pypi-publish"
- dependency-name: "pypa/gh-action-pip-audit"
- dependency-name: "actions/download-artifact"
- dependency-name: "actions/upload-artifact"
- dependency-name: "readthedocs/actions/preview"
groups:
actions:
dependency-type: "development"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
groups:
main:
dependency-type: "production"
ignore:
# Dependencies managed by https://github.com/skeleton-ci/skeleton-python
- dependency-name: "mypy"
- dependency-name: "ruff"
- dependency-name: "towncrier"
- dependency-name: "coverage"
- dependency-name: "pytest"
- dependency-name: "pytest-doctestplus"
- dependency-name: "covdefaults"
- dependency-name: "poethepoet"
- dependency-name: "pre-commit"
- dependency-name: "smokeshow"
- dependency-name: "keyring"
- dependency-name: "markdown-exec"
- dependency-name: "mkdocs-material"
- dependency-name: "mkdocstrings"
31 changes: 31 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file was generated from skeleton-ci/[email protected].
# Instead of changing this particular file, you might want to alter the template:
# https://github.com/skeleton-ci/skeleton-python/tree/0.0.2rc-210-g3b97536/project/.github/workflows/audit.yml.jinja

# IMPORTANT!
# Pinned versions of actions and Poetry are managed in a different repository.
# Do not submit PRs to this file unless for this repo specifically.
# To change this workflow globally, submit a PR to https://github.com/skeleton-ci/skeleton-python.

name: "Audit"

on: ["push"]

jobs:
pip-audit:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- name: "Install Poetry"
run: "pipx install poetry==1.8.2"
- name: "Set up Python 3.8"
uses: "actions/setup-python@v5"
with:
cache: "poetry"
- name: "Install the project"
run: "poetry install"
- name: "Set up Python location for pip-audit"
shell: "bash"
run: 'echo "PIPAPI_PYTHON_LOCATION=$(poetry env info -e)" >> $GITHUB_ENV'
- name: "Audit"
uses: "pypa/[email protected]"
110 changes: 110 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# This file was generated from skeleton-ci/[email protected].
# Instead of changing this particular file, you might want to alter the template:
# https://github.com/skeleton-ci/skeleton-python/tree/0.0.2rc-210-g3b97536/project/.github/workflows/%23%25%20if%20tests%20and%20public%20%25%23coverage.yml%23%25%20endif%20%25%23.jinja

# IMPORTANT!
# Pinned versions of actions and Poetry are managed in a different repository.
# Do not submit PRs to this file unless for this repo specifically.
# To change this workflow globally, submit a PR to https://github.com/skeleton-ci/skeleton-python.

name: "Coverage"

on:
workflow_run:
workflows: ["Tests"]
types: ["completed"]

permissions:
actions: "read"
statuses: "write"

jobs:
combine:
if: "${{github.event.workflow_run.conclusion == 'success'}}"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- name: "Install Poetry"
run: "pipx install poetry==1.8.2"
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
cache: "poetry"
- name: "Install the project"
run: "poetry install --only=dev,dev-skeleton"
- run: "gh run download ${{github.event.workflow_run.id}} --dir .covfiles/"
env:
GH_TOKEN: "${{github.token}}"
- name: "Combine coverage data files from multicontextual runs"
run: "poetry run coverage combine --append .covfiles/*"
- name: "Show coverage report"
run: "poetry run coverage report --show-missing --fail-under=0"
- name: "Upload coverage data file"
uses: "actions/upload-artifact@v4"
with:
name: "coverage"
path: ".coverage"
- run: "poetry run coverage xml --fail-under=0"
- name: "Upload coverage XML report"
uses: "actions/upload-artifact@v4"
with:
name: "coverage-xml"
path: "coverage.xml"
- run: >
poetry run coverage html
--fail-under=0
--directory=.covhtml/
--show-contexts
--title "pj coverage for ${{github.sha}}"
- name: "Upload coverage HTML report"
uses: "actions/upload-artifact@v4"
with:
name: "coverage-html"
path: ".covhtml/"

codecov:
needs: "combine"
if: "${{github.event.workflow_run.pull_requests[0]}}"
runs-on: "ubuntu-latest"
environment: "Coverage"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/download-artifact@v4"
with:
name: "coverage-xml"
merge-multiple: true
- name: "Upload coverage reports to Codecov"
uses: "codecov/codecov-action@v4"
with:
files: "coverage.xml"
env:
CODECOV_TOKEN: "${{secrets.CODECOV_TOKEN}}"

smokeshow:
needs: "combine"
if: "${{github.event.workflow_run.head_branch == 'main'}}"
runs-on: "ubuntu-latest"
environment: "Coverage"
steps:
- uses: "actions/checkout@v4"
- name: "Install Poetry"
run: "pipx install poetry==1.8.2"
- uses: "actions/setup-python@v5"
with:
cache: "poetry"
- name: "Install the project"
run: "poetry install --only=dev,dev-skeleton"
- name: "Download coverage reports"
uses: "actions/download-artifact@v4"
with:
name: "coverage-html"
path: ".covhtml/"
merge-multiple: true
- run: "poetry run smokeshow upload .covhtml/"
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: "Coverage {coverage-percentage}"
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 90
SMOKESHOW_GITHUB_CONTEXT: "coverage"
SMOKESHOW_GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
SMOKESHOW_GITHUB_PR_HEAD_SHA: "${{github.event.workflow_run.head_sha}}"
SMOKESHOW_AUTH_KEY: "${{secrets.SMOKESHOW_AUTH_KEY}}"
29 changes: 29 additions & 0 deletions .github/workflows/doclinks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file was generated from skeleton-ci/[email protected].
# Instead of changing this particular file, you might want to alter the template:
# https://github.com/skeleton-ci/skeleton-python/tree/0.0.2rc-210-g3b97536/project/.github/workflows/%23%25%20if%20docs%20%25%23doclinks.yml%23%25%20endif%20%25%23.jinja

# IMPORTANT!
# Pinned versions of actions and Poetry are managed in a different repository.
# Do not submit PRs to this file unless for this repo specifically.
# To change this workflow globally, submit a PR to https://github.com/skeleton-ci/skeleton-python.

name: "ReadTheDocs Preview"

on:
pull_request_target:
types:
- "opened"
paths:
- "docs/**"
- "CHANGELOG.md"

permissions:
pull-requests: "write"

jobs:
documentation-links:
runs-on: "ubuntu-latest"
steps:
- uses: "readthedocs/actions/preview@v1"
with:
project-slug: "pj"
23 changes: 0 additions & 23 deletions .github/workflows/documentation-links.yml

This file was deleted.

22 changes: 14 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# This file was generated from bswck/skeleton@bf2dfcf.
# This file was generated from skeleton-ci/skeleton[email protected].
# Instead of changing this particular file, you might want to alter the template:
# https://github.com/bswck/skeleton/tree/bf2dfcf/project/.github/workflows/lint.yml.jinja
# https://github.com/skeleton-ci/skeleton-python/tree/0.0.2rc-210-g3b97536/project/.github/workflows/lint.yml.jinja

# IMPORTANT!
# Pinned versions of actions and Poetry are managed in a different repository.
# Do not submit PRs to this file unless for this repo specifically.
# To change this workflow globally, submit a PR to https://github.com/skeleton-ci/skeleton-python.

name: "Lint"

Expand All @@ -11,12 +16,13 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- name: "Install Poetry"
run: "pipx install poetry==1.8.2"
- name: "Set up Python 3.8"
uses: "actions/setup-python@v4"
uses: "actions/setup-python@v5"
with:
python-version: "3.8"
- name: "Install Ruff"
run: |
pip install ruff
cache: "poetry"
- name: "Install the project"
run: "poetry install --only=dev,dev-skeleton"
- name: "Analyze the code with Ruff"
run: "ruff ."
run: "poetry run ruff check ."
Loading

0 comments on commit f89f064

Please sign in to comment.