Skip to content

Commit 4e7c705

Browse files
committed
🎉 Initial commit with Copier files
0 parents  commit 4e7c705

25 files changed

+2333
-0
lines changed

.copier-answers.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changes here will be overwritten by Copier
2+
_commit: 69a1902
3+
_src_path: [email protected]:inokufu/python-project-template.git
4+
author_email: [email protected]
5+
author_name: Inokufu
6+
min_python_version: '3.12'
7+
package_name: logger
8+
project_description: Python logger
9+
project_name: Logger

.editorconfig

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# Top-most EditorConfig file
4+
root = true
5+
6+
# All files
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
charset = utf-8
11+
indent_style = space
12+
trim_trailing_whitespace = true
13+
14+
# Python files
15+
[*.py]
16+
indent_size = 4
17+
max_line_length = 88
18+
19+
# Configuration files
20+
[*.{ini,yml,yaml,toml}]
21+
indent_size = 2
22+
23+
# JSON files
24+
[*.{json,jsonld}]
25+
indent_size = 2
26+
27+
# Markdown files
28+
[*.md]
29+
indent_size = 2
30+
max_line_length = 80
31+
trim_trailing_whitespace = false
32+
33+
[Makefile]
34+
indent_style = tab
35+
indent_size = 4

.env.example

Whitespace-only changes.

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: Report a problem or unexpected behavior
4+
labels: bug
5+
---
6+
7+
<!--
8+
Tips for a good bug report:
9+
- Make sure you're using the latest version
10+
- Try to be specific and provide as much detail as possible
11+
- Include reproducible steps, code samples or screenshots when relevant
12+
-->
13+
14+
## Description
15+
16+
<!-- Provide a clear and concise description of the issue you're experiencing -->
17+
18+
## Steps to Reproduce
19+
20+
<!-- Provide specific steps that can be followed to reproduce the issue -->
21+
22+
1.
23+
2.
24+
3.
25+
26+
## Expected Behavior
27+
28+
<!-- Describe what you expected to happen -->
29+
30+
## Actual Behavior
31+
32+
<!-- Describe what actually happened instead -->
33+
34+
## Reproducibility
35+
36+
<!-- How often does this issue occur when following the steps? (Always, Sometimes, Random) -->
37+
38+
## Screenshots/Logs
39+
40+
<!-- If applicable, add screenshots or relevant log output to help explain your problem -->
41+
42+
```
43+
# Paste logs here if applicable
44+
```
45+
46+
## Environment Information
47+
48+
<!-- Complete the following information about your environment -->
49+
50+
| Software/Hardware | Version/Details |
51+
|-----------------------------|-----------------|
52+
| Project Version | x.x.x |
53+
| Operating System | |
54+
| Browser (if relevant) | |
55+
| Device (if relevant) | |
56+
| Other relevant dependencies | |
57+
58+
## Possible Solution
59+
60+
<!-- Not required, but if you have suggestions on how to fix the issue, please describe -->
61+
62+
<!-- For maintainers: -->
63+
<!--
64+
- [ ] Steps verified
65+
- [ ] Reproducible in clean environment
66+
- [ ] Similar issues searched
67+
-->
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
name: 🚀 Feature Request
3+
about: Suggest an idea or enhancement for this project
4+
labels: enhancement
5+
---
6+
7+
## Feature Description
8+
9+
<!-- Provide a clear and concise description of the feature you're proposing -->
10+
11+
## Problem Statement
12+
13+
<!-- Describe the problem or limitation that this feature would address -->
14+
15+
## Proposed Solution
16+
17+
<!-- Describe how you envision this feature working -->
18+
19+
## Use Cases
20+
21+
<!-- Describe specific use cases where this feature would be beneficial -->
22+
23+
1.
24+
2.
25+
3.
26+
27+
## Expected Benefits
28+
29+
<!-- Explain the benefits this feature would bring to users/the project -->
30+
31+
## Possible Implementation
32+
33+
<!-- Optional: If you have ideas about how to implement this feature, share them here -->
34+
35+
## Alternatives Considered
36+
37+
<!-- Have you considered alternative solutions or workarounds? Please describe them -->
38+
39+
## Additional Context
40+
41+
<!-- Add any other context, screenshots, mockups, or examples about the feature request here -->
42+
43+
## Impact
44+
45+
<!-- How would this feature impact existing functionality? Would it require changes to the API? -->
46+
47+
## Priority
48+
49+
<!-- How important is this feature to you? (Critical, High, Medium, Low) -->
50+
51+
## Are you willing to submit a PR?
52+
53+
<!-- Would you be willing to implement this feature yourself if approved? -->
54+
55+
- [ ] Yes, I would be willing to submit a PR for this feature
56+
- [ ] No, I would need assistance with implementation
57+
- [ ] No, I'm just suggesting the idea
58+
59+
<!--
60+
Note: Feature requests are evaluated based on their alignment with project goals,
61+
potential benefit to users, and implementation complexity. Not all feature requests
62+
can be implemented, but all are appreciated and considered.
63+
-->

.github/ISSUE_TEMPLATE/question.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: ❓ Question
3+
about: Ask a question about how to use this project
4+
title: "[QUESTION] "
5+
labels: question
6+
---
7+
8+
## Question
9+
10+
<!-- Describe your question clearly and concisely -->
11+
12+
## Context
13+
14+
<!-- Provide relevant context for your question. What are you trying to achieve? -->
15+
16+
## What I've Already Tried
17+
18+
<!-- Describe what you've already tried to solve your problem -->
19+
20+
## Relevant Documentation
21+
22+
<!-- Link to any documentation you've consulted. Is something missing or unclear? -->
23+
24+
## Code Example
25+
26+
<!-- If applicable, provide a minimal code example that illustrates your question -->
27+
28+
```python
29+
# Your code here

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Pull Request
2+
3+
## Description
4+
5+
<!-- Provide a concise description of the changes you've made -->
6+
7+
## Related Issue
8+
9+
<!-- Link to the related issue, if applicable -->
10+
Fixes #[issue_number]
11+
12+
## Type of Change
13+
14+
<!-- Mark the appropriate option with an "x" -->
15+
16+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
17+
- [ ] ✨ New feature (non-breaking change which adds functionality)
18+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality
19+
to not work as expected)
20+
- [ ] 📝 Documentation update
21+
- [ ] ♻️ Code refactor
22+
- [ ] ⚡ Performance improvement
23+
- [ ] 🧪 Test implementation/update
24+
- [ ] 🔧 Configuration change
25+
- [ ] 🔄 CI/CD related changes
26+
27+
## Motivation and Context
28+
29+
<!-- Why is this change required? What problem does it solve? -->
30+
31+
## How Has This Been Tested?
32+
33+
<!-- Please describe how you tested your changes -->
34+
35+
- [ ] Unit tests
36+
- [ ] Integration tests
37+
- [ ] Manual tests
38+
- [ ] Other (please specify):
39+
40+
## Screenshots/Recordings
41+
42+
<!-- If appropriate, include screenshots or recordings to demonstrate the changes -->
43+
44+
## Implementation Details
45+
46+
<!-- Provide a brief overview of the implementation, if necessary -->
47+
48+
## Checklist
49+
50+
<!-- Mark the appropriate options with an "x" -->
51+
52+
- [ ] My code follows the [style guidelines](../docs/CONTRIBUTING.md) of this project
53+
- [ ] I have performed a self-review of my own code
54+
- [ ] I have commented my code, particularly in hard-to-understand areas
55+
- [ ] I have made corresponding changes to the documentation
56+
- [ ] My changes generate no new warnings or errors
57+
- [ ] I have added tests that prove my fix is effective or that my feature works
58+
- [ ] New and existing unit tests pass locally with my changes
59+
60+
## Deployment Notes
61+
62+
<!-- Note any special deployment considerations, if applicable -->
63+
64+
## Additional Notes
65+
66+
<!-- Add any other context about the pull request here -->

.github/workflows/ci.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master, develop]
6+
pull_request:
7+
branches: [main, master, develop]
8+
workflow_dispatch:
9+
# Uncomment to activate regular checks:
10+
# schedule:
11+
# - cron: "0 0 * * 0" # Weekly on Sundays
12+
13+
jobs:
14+
lint:
15+
name: Lint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Rye
22+
id: setup-rye
23+
uses: eifinger/setup-rye@v4
24+
with:
25+
enable-cache: true
26+
github-token: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Install dependencies
29+
if: steps.setup-rye.outputs.cache-hit != 'true'
30+
run: make install
31+
32+
- name: Cache pre-commit
33+
uses: actions/cache@v4
34+
with:
35+
path: ~/.cache/pre-commit
36+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
37+
38+
- name: Run pre-commit checks
39+
run: make precommit
40+
41+
- name: Lint
42+
run: make lint
43+
44+
- name: Lint GitHub Actions
45+
uses: eifinger/actionlint-action@v1
46+
47+
test:
48+
name: Test Python
49+
needs: lint
50+
runs-on: ubuntu-latest
51+
strategy:
52+
matrix:
53+
python-version: ["3.12"] # Add additional versions as needed
54+
fail-fast: false
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v4
58+
59+
- name: Setup Rye
60+
id: setup-rye
61+
uses: eifinger/setup-rye@v4
62+
with:
63+
enable-cache: true
64+
cache-prefix: ${{ matrix.python-version }}
65+
github-token: ${{ secrets.GITHUB_TOKEN }}
66+
67+
- name: Pin Python ${{ matrix.python-version }}
68+
run: rye pin ${{ matrix.python-version }}
69+
70+
- name: Install dependencies
71+
if: steps.setup-rye.outputs.cache-hit != 'true'
72+
run: make install
73+
74+
- name: Run tests with coverage
75+
run: make test
76+
77+
- name: Upload coverage report as artifact
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: coverage-report-${{ matrix.python-version }}
81+
path: |
82+
htmlcov/
83+
coverage.xml
84+
retention-days: 7
85+
86+
greeting:
87+
name: Greet first-time contributors
88+
runs-on: ubuntu-latest
89+
if: github.event_name == 'pull_request' || github.event_name == 'issues'
90+
steps:
91+
- uses: actions/first-interaction@v1
92+
with:
93+
repo-token: ${{ secrets.GITHUB_TOKEN }}
94+
pr-message: 'Hello @${{ github.actor }}, thank you for submitting a PR! We will review it soon.'
95+
issue-message: |
96+
Hello @${{ github.actor }}, thank you for your interest in our project!
97+
If this is a bug report, please provide screenshots and steps to reproduce your issue.

0 commit comments

Comments
 (0)