Skip to content
Merged

Dev #62

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
40 changes: 0 additions & 40 deletions .devcontainer/README.md

This file was deleted.

78 changes: 0 additions & 78 deletions .devcontainer/devcontainer.json

This file was deleted.

17 changes: 0 additions & 17 deletions .devcontainer/setup.sh

This file was deleted.

13 changes: 6 additions & 7 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ include:

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of any
kind
- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without
Expand Down Expand Up @@ -58,8 +57,8 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be repor
directly to the community leaders responsible for enforcement. All complaints will be
reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
individual reporting any incident.
All community leaders are obligated to respect the privacy and security of the individual
reporting any incident.

## Enforcement Guidelines

Expand All @@ -81,9 +80,9 @@ inappropriate. A public apology may be requested.

**Consequence**: A warning with consequences for continued behavior. No interaction with
the people involved, including unsolicited interaction with those enforcing the Code of
Conduct, for a specified period of time. This includes avoiding interactions in
community spaces as well as external channels like social media. Violating these terms
may lead to a temporary or permanent ban.
Conduct, for a specified period of time. This includes avoiding interactions in community
spaces as well as external channels like social media. Violating these terms may lead to
a temporary or permanent ban.

### 3. Temporary Ban

Expand Down
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ You can contribute by:
Start by opening an issue to describe your proposed change or the problem you
encountered. This helps maintainers review and guide the work before coding begins.

> For minor changes, such as typo fixes, you may skip this step and submit a pull
> request directly.
> For minor changes, such as typo fixes, you may skip this step and submit a pull request
> directly.

### Step 2: Make Your Changes

Expand Down Expand Up @@ -75,7 +75,7 @@ To set up locally:
3. Clone the repository and run:

```bash
make install
make setup
```

> If using `uv`, a compatible virtual environment will be created automatically.
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ body:
attributes:
label: "System Information"
description: "Please provide details about your system configuration."
placeholder:
"python-project-template version:\nPlatform/OS:\nPython version:"
placeholder: "python-project-template version:\nPlatform/OS:\nPython version:"
validations:
required: true

Expand Down
19 changes: 3 additions & 16 deletions .github/actions/build-mkdocs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,17 @@ runs:
- name: Setup gh-pages Branch
shell: bash
run: |
# Store current branch
CURRENT_BRANCH=$(git branch --show-current)

# Check if gh-pages branch exists
if git ls-remote --heads origin gh-pages | grep -q gh-pages; then
echo "gh-pages branch exists, fetching..."
git fetch origin gh-pages:gh-pages
else
echo "gh-pages branch doesn't exist, creating..."
if ! git ls-remote --heads origin gh-pages | grep -q gh-pages; then
CURRENT_BRANCH=$(git branch --show-current)
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "Initial gh-pages commit"
git push origin gh-pages
git checkout "$CURRENT_BRANCH"
fi

- name: Build and Deploy Docs with Mike
- name: Build and Deploy Docs
shell: bash
run: |
echo "Deploying Docs Version: ${{ inputs.docs-version }}"
uv run mike deploy --push --update-aliases "${{ inputs.docs-version }}" latest

- name: Set Default Version to Docs
shell: bash
run: |
echo "Setting 'Latest' as Default Version"
uv run mike set-default --push latest
40 changes: 6 additions & 34 deletions .github/actions/create-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,52 +26,24 @@ runs:
run: |
if gh release view "${{ inputs.version }}" >/dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "Release ${{ inputs.version }} already exists"
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "Release ${{ inputs.version }} doesn't exist"
fi
env:
GH_TOKEN: ${{ inputs.token }}

- name: Generate Release Notes
- name: Create Release
if: steps.check_release.outputs.exists == 'false'
shell: bash
run: |
echo "Generating release notes..."
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
RANGE="${LAST_TAG:+$LAST_TAG..HEAD}"
COMMITS=$(git log ${RANGE:---max-count=10} --pretty=format:"- %s" --no-merges)

if [ -z "$LAST_TAG" ]; then
echo "No previous tags found, using last 10 commits..."
COMMITS=$(git log --pretty=format:"- %s" --no-merges -10)
else
echo "Previous tag found: $LAST_TAG"
COMMITS=$(git log "${LAST_TAG}..HEAD" --pretty=format:"- %s" --no-merges)
fi

cat > release-notes.md << EOF
## Changes

$COMMITS
EOF

echo "Release notes generated:"
cat release-notes.md

- name: Create Release
if: steps.check_release.outputs.exists == 'false'
shell: bash
run: |
echo "Creating release ${{ inputs.version }}..."
gh release create "${{ inputs.version }}" \
--title "${{ inputs.version }}" \
--notes-file release-notes.md
echo "Release ${{ inputs.version }} created successfully"
--notes "## Changes

$COMMITS"
env:
GH_TOKEN: ${{ inputs.token }}

- name: Skip Release
if: steps.check_release.outputs.exists == 'true'
shell: bash
run: |
echo "Skipping release creation - ${{ inputs.version }} already exists"
31 changes: 6 additions & 25 deletions .github/actions/setup-python-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,39 +25,20 @@ runs:
enable-cache: true

- name: Install dependencies with uv
id: install-deps
shell: bash
run: |
# Check if we should install all extras
if [ -z "${{ inputs.uv-group }}" ] && [ -z "${{ inputs.uv-extra }}" ]; then
echo "Installing all extras (default when no group or extra specified)..."
uv sync --all-extras
elif [ "${{ inputs.uv-extra }}" = "--all-extras" ]; then
echo "Installing all extras (explicitly requested)..."
if [ -n "${{ inputs.uv-group }}" ]; then
echo "Note: Installing all extras overrides the specified group: ${{ inputs.uv-group }}"
fi
uv sync --all-extras
ARGS=""
if [ "${{ inputs.uv-extra }}" = "--all-extras" ] || [ -z "${{ inputs.uv-group }}${{ inputs.uv-extra }}" ]; then
ARGS="--all-extras"
else
echo "Installing with group: ${{ inputs.uv-group }}, and extra: ${{ inputs.uv-extra }}..."
if [ -n "${{ inputs.uv-group }}" ] && [ -n "${{ inputs.uv-extra }}" ]; then
uv sync --group ${{ inputs.uv-group }} --extra ${{ inputs.uv-extra }}
elif [ -n "${{ inputs.uv-group }}" ]; then
uv sync --group ${{ inputs.uv-group }}
elif [ -n "${{ inputs.uv-extra }}" ]; then
uv sync --extra ${{ inputs.uv-extra }}
else
uv sync
fi
[ -n "${{ inputs.uv-group }}" ] && ARGS="$ARGS --group ${{ inputs.uv-group }}"
[ -n "${{ inputs.uv-extra }}" ] && ARGS="$ARGS --extra ${{ inputs.uv-extra }}"
fi
uv sync $ARGS

- name: Verify uv and environment
id: verify
shell: bash
run: |
echo "uv version:"
uv --version
echo "Virtual environments:"
uv venv list
echo "Python version:"
uv run python --version
23 changes: 23 additions & 0 deletions .github/actions/test-code/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test Code
description: Run Python tests with Pytest

inputs:
src-project-folder:
description: "Directory where the project is located"
required: true
default: "src"

src-tests-folder:
description: "Directory where the tests are located"
required: true
default: "tests"

runs:
using: composite
steps:
- name: Run tests with Pytest
shell: bash
run: |
if [ -d "${{ inputs.src-tests-folder }}" ] && [ -n "$(find ${{ inputs.src-tests-folder }} -name 'test_*.py')" ]; then
uv run pytest ${{ inputs.src-tests-folder }}
fi
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ updates:
labels:
- "dependencies"
- "python"

Loading
Loading