Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from the upstream template #47

Merged
merged 8 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
49 changes: 25 additions & 24 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
{
"template": "[email protected]:Lee-W/cookiecutter-python-template.git",
"commit": "de3aaf4ec023a27696ee1de45838d53c72a16da6",
"context": {
"cookiecutter": {
"project_name": "mail handler",
"project_slug": "mail_handler",
"project_description": "Generate emails through the template and send mails.",
"github_username": "Lee-W",
"github_url": "https://github.com/pycontw/mail_handler",
"author_name": "Wei Lee",
"author_email": "[email protected]",
"python_version": "3.7",
"dependency_management_tool": "poetry",
"default_branch": "master",
"use_strict_mypy_config": "n",
"build_pypi_package": "y",
"build_docker_image": "n",
"open_source_license": "MIT license",
"_template_version": "1.0.0",
"_template": "[email protected]:Lee-W/cookiecutter-python-template.git"
}
},
"directory": null,
"checkout": null
"template": "[email protected]:Lee-W/cookiecutter-python-template.git",
"commit": "c3fe47bcc95ce02269935885e52c7aef32c5119f",
"context": {
"cookiecutter": {
"project_name": "mail handler",
"project_slug": "mail_handler",
"project_description": "Generate emails through the template and send mails.",
"github_username": "Lee-W",
"github_url": "https://github.com/pycontw/mail_handler",
"author_name": "Wei Lee",
"author_email": "[email protected]",
"python_version": "3.8",
"dependency_management_tool": "poetry",
"default_branch": "master",
"use_strict_mypy_config": "n",
"build_pypi_package": "y",
"build_docker_image": "n",
"open_source_license": "MIT license",
"auto_detect_update_from_cruft_template": "y",
"_template_version": "1.9.2",
"_template": "[email protected]:Lee-W/cookiecutter-python-template.git"
}
},
"directory": null,
"checkout": null
}
35 changes: 0 additions & 35 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 🛠 Bug report
description: Create a report to help us improve
title: Good bug title tells us about precise symptom, not about the root cause.
labels: [bug]
body:
- type: textarea
id: description
attributes:
label: Description
description: |
A clear and concise description of what the bug is
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Run ...
2. ...
3. ...
validations:
required: true
- type: textarea
id: current-behavior
attributes:
label: Current behavior
description: What happens actually so you think this is a bug.
validations:
required: true
- type: textarea
id: desired-behavior
attributes:
label: Desired behavior
description: |
A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: |
If applicable, add screenshots to help explain your problem.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/documentation.md

This file was deleted.

29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 📖 Documentation
description: Suggest an improvement for the documentation of this project
title: Content to be added or fixed
labels: [documentation]
body:
- type: checkboxes
id: type
attributes:
label: Type
options:
- label: Content inaccurate
- label: Content missing
- label: Typo
- type: input
id: url
attributes:
label: URL
placeholder: |
URL to the code we did not clearly describe or the document page where the content is inaccurate
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: |
A clear and concise description of what content should be added or fixed
validations:
required: true
19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🚀 Feature request
description: Suggest an idea for this project
title: "<One feature request per issue>"
labels: [feature]
body:
- type: textarea
id: description
attributes:
label: Description
description: |
A clear and concise description for us to know your idea.
validations:
required: true
- type: textarea
id: possible-solution
attributes:
label: Possible Solution
description: |
A clear and concise description of what you want to happen.
- type: textarea
id: additional-context
attributes:
label: Additional context
description: |
Add any other context or screenshots about the feature request here.
- type: textarea
id: related-issue
attributes:
label: Additional context
description: |
If applicable, add link to existing issue also help us know better.
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
updates:
-
# Maintain dependencies for GitHub Actions
package-ecosystem: github-actions
directory: /
schedule:
interval: daily
labels:
- dependencies
commit-message:
prefix: "ci"
include: "scope"
-
# Maintain python dependencies
package-ecosystem: pip
directory: /
schedule:
interval: daily
labels:
- dependencies
commit-message:
prefix: "build"
include: "scope"
75 changes: 75 additions & 0 deletions .github/workflows/cruft-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# /.github/workflows/cruft-update.yml
name: Update repository with Cruft
permissions:
contents: write
pull-requests: write
on:
schedule:
- cron: "0 2 * * 1" # Every Monday at 2am
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- add-paths: .
body: Use this to merge the changes to this repository.
branch: cruft/update
commit-message: "chore: accept new Cruft update"
title: New updates detected with Cruft
- add-paths: .cruft.json
body: Use this to reject the changes in this repository.
branch: cruft/reject
commit-message: "chore: reject new Cruft update"
title: Reject new updates detected with Cruft
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install Cruft
run: pip3 install cruft

- name: Check if update is available
continue-on-error: false
id: check
run: |
CHANGES=0
if [ -f .cruft.json ]; then
if ! cruft check; then
CHANGES=1
fi
else
echo "No .cruft.json file"
fi

echo "has_changes=$CHANGES" >> "$GITHUB_OUTPUT"

- name: Run update if available
if: steps.check.outputs.has_changes == '1'
run: |
git config --global user.email "[email protected]"
git config --global user.name "Wei Lee"

cruft update --skip-apply-ask --refresh-private-variables
git restore --staged .

- name: Create pull request
if: steps.check.outputs.has_changes == '1'
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: ${{ matrix.add-paths }}
commit-message: ${{ matrix.commit-message }}
branch: ${{ matrix.branch }}
delete-branch: true
branch-suffix: timestamp
title: ${{ matrix.title }}
body: |
This is an autogenerated PR. ${{ matrix.body }}

[Cruft](https://cruft.github.io/cruft/) has detected updates from the Cookiecutter repository.
12 changes: 7 additions & 5 deletions .github/workflows/master-updated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ jobs:
name: "Bump version and create changelog with commitizen"
steps:
- name: Check out
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
persist-credentials: false

- name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
Expand All @@ -26,15 +28,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@main
uses: actions/checkout@v4
Lee-W marked this conversation as resolved.
Show resolved Hide resolved
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0

- name: Set up Python 3.7
uses: actions/setup-python@main
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: "3.8"

- name: Install dependencies
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ jobs:
check:
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out
uses: actions/checkout@main
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@main
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
Loading
Loading