Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a13fc13

Browse files
D. J.:
- Changed project structure and github workflows
1 parent ee7c8c9 commit a13fc13

File tree

8 files changed

+137
-17
lines changed

8 files changed

+137
-17
lines changed

‎.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Report a bug to help us improve.
4+
title: "[BUG] <Brief summary of the issue>"
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
## Summary
10+
11+
Provide a brief summary of the issue in one or two sentences.
12+
13+
## Steps to Reproduce
14+
15+
List a clear, step-by-step guide to reproduce the issue:
16+
17+
1. Step one
18+
2. Step two
19+
3. Step three
20+
21+
## Environment
22+
23+
Provide key details about the environment:
24+
25+
- OS: (e.g., Windows 10, macOS Monterey, Ubuntu 20.04)
26+
- Python Version: (e.g. python==3.10)
27+
- Dependencies: List any relevant library or package versions (e.g. pandas==1.3.5).
28+
29+
## Checklist
30+
31+
- [ ] I have searched the existing issues to make sure this bug hasn’t already been reported.
32+
- [ ] I am using the latest version of the project.
33+
- [ ] I have provided enough context for the team to understand the bug.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Propose a new feature or an improvement for the project.
4+
title: "[FEATURE] <Brief summary of the issue>"
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
## Summary
10+
11+
Provide a brief summary of the feature request in one or two sentences.
12+
13+
## Checklist
14+
15+
Please ensure the following before submitting your feature request:
16+
17+
- [ ] I have searched the existing issues to make sure this feature hasn’t already been requested or implemented.
18+
- [ ] I am using the latest version of the project.
19+
- [ ] I have provided enough context for the team to understand the request.

‎.github/workflows/check-format.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,20 @@ jobs:
1717
steps:
1818
- name: Set up the repository
1919
uses: actions/checkout@v4
20+
- name: Install uv
21+
run: |
22+
curl -LsSf https://astral.sh/uv/install.sh | sh
2023
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
22-
with:
23-
python-version: ${{ matrix.python-version }}
24+
run: |
25+
uv venv --python ${{ matrix.python-version }}
26+
echo "VIRTUAL_ENV=$(pwd)/.venv" >> $GITHUB_ENV
27+
echo "$(pwd)/.venv/bin" >> $GITHUB_PATH
2428
- name: Install dependencies
2529
run: |
26-
pip install -r requirements.txt
30+
uv pip install --group dev
2731
- name: Check Format with flake8
2832
run: |
2933
# stop the build if there are Python syntax errors or undefined names
30-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
34+
flake8 ./projectX --count --select=E9,F63,F7,F82 --show-source --statistics
3135
# exit-zero treats all errors as warnings. Black has 88 max-line-length
32-
flake8 . --count --extend-ignore=E203,C901 --exit-zero --max-complexity=10 --max-line-length=88 --statistics
36+
flake8 ./projectX --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics

‎.github/workflows/publish-testpypi.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish TestPyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
9+
jobs:
10+
publish-to-testpypi:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: ["ubuntu-latest"]
15+
python-version: ["3.10"]
16+
name: ${{ matrix.os }} python-${{ matrix.python-version }}
17+
steps:
18+
- name: Set up the repository
19+
uses: actions/checkout@v4
20+
- name: Install uv
21+
run: |
22+
curl -LsSf https://astral.sh/uv/install.sh | sh
23+
- name: Update version for TestPyPI
24+
run: |
25+
VERSION_SUFFIX=$(date +%Y%m%d%H%M%S)
26+
sed -i "s/^version = \"\(.*\)\"/version = \"1円.dev$VERSION_SUFFIX\"/" pyproject.toml
27+
- name: Build package
28+
run: |
29+
uv build
30+
- name: Publish to TestPyPI
31+
run: |
32+
uv publish --index testpypi --token ${{ secrets.TEST_PYPI_API_TOKEN }}

‎.github/workflows/run-unittests.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,17 @@ jobs:
1717
steps:
1818
- name: Set up the repository
1919
uses: actions/checkout@v4
20+
- name: Install uv
21+
run: |
22+
curl -LsSf https://astral.sh/uv/install.sh | sh
2023
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
22-
with:
23-
python-version: ${{ matrix.python-version }}
24+
run: |
25+
uv venv --python ${{ matrix.python-version }}
26+
echo "VIRTUAL_ENV=$(pwd)/.venv" >> $GITHUB_ENV
27+
echo "$(pwd)/.venv/bin" >> $GITHUB_PATH
2428
- name: Install dependencies
2529
run: |
26-
pip install -r requirements.txt
30+
uv pip install --group dev
2731
- name: Run Unittests
2832
run: |
2933
pytest

‎.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

‎pyproject.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[project]
2+
name = "awesome-python-leetcode"
3+
version = "0.0.1"
4+
description = "Python Solutions for LeetCode Problems!"
5+
authors = [
6+
{ name = "Dennis Jabs" },
7+
]
8+
requires-python = ">=3.10"
9+
readme = "README.md"
10+
license = { file = "LICENSE" }
11+
12+
dependencies = [
13+
"numpy>=2.2.5",
14+
]
15+
16+
[dependency-groups]
17+
dev = [
18+
"black>=23.7.0",
19+
"flake8>=7.3.0",
20+
"isort>=5.12.0",
21+
"pytest>=7.4.0",
22+
"pytest-cov>=4.1.0",
23+
"pytest-mock>=3.14.1",
24+
]
25+
26+
[project.urls]
27+
Homepage = "https://github.com/nobodyPerfecZ/python-project-template"
28+
Issues = "https://github.com/nobodyPerfecZ/python-project-template/issues"
29+
30+
[[tool.uv.index]]
31+
name = "testpypi"
32+
url = "https://test.pypi.org/simple/"
33+
publish-url = "https://test.pypi.org/legacy/"
34+
explicit = true

‎requirements.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /