Skip to content
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
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# EditorConfig is awesome: https://EditorConfig.org
# Top-most EditorConfig file; root = true stops search at this directory
root = true

# Defaults for all files
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

# Python
[*.py]
indent_size = 4

# YAML files (e.g. workflows, pre-commit config)
[*.{yml,yaml}]
indent_size = 2

# Markdown files (trailing whitespace often meaningful)
[*.md]
trim_trailing_whitespace = false

# Makefile (requires tab indentation)
[Makefile]
indent_style = tab
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug Report
about: Report a bug to help us improve
title: '[BUG] '
labels: bug
assignees: ''
---

## Description

A clear and concise description of what the bug is.

## Steps to Reproduce

1.
2.
3.

## Expected Behavior

What you expected to happen.

## Actual Behavior

What actually happened.

## Environment

- OS: [e.g., macOS 14.0, Ubuntu 22.04]
- Python version: [e.g., 3.12.0 β€” run `python --version`]
- How you installed TimeRun: [e.g., pip from PyPI, editable install, git clone]

## Additional Context

Add any other context, logs, or information about the problem here. See [CONTRIBUTING.md](https://github.com/HH-MWB/timerun/blob/main/CONTRIBUTING.md#reporting-bugs) for more guidance.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Feature Request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---

## Description

A clear and concise description of what you want to happen.

## Motivation

Explain why this feature would be useful. What problem does it solve?

## Proposed Solution

Describe how you envision this feature working.

## Alternatives Considered

Describe any alternative solutions or features you've considered.

## Additional Context

Add any other context or examples about the feature request here.
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Description

Brief description of what this PR does and why.

## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Other (please describe):

## Related Issues

Fixes #

## Checklist

- [ ] I have run `make lint test` and both pass
- [ ] For new or changed behavior, I have added or updated BDD scenarios in `features/`
- [ ] I have updated the documentation accordingly (if applicable)
37 changes: 29 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,52 @@
---
name: Continuous Integration
name: Run continuous integration

# yamllint disable-line rule:truthy
on:
pull_request:
branches: [main]
branches:
- main
push:
branches: [main]
branches:
- main

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Python 3.11
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.11'
python-version: '3.10'
cache: 'pip'

- name: Run pre-commit hooks
uses: pre-commit/action@v3.0.1

test:
name: Test
runs-on: ubuntu-latest
needs: lint
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
python-version:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand All @@ -40,9 +55,13 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install test dependencies
run: pip install -e ".[dev]"
run: python -m pip install -e ".[dev]"

- name: Audit dependencies
run: python -m pip_audit

- name: Run tests with coverage
run: |
Expand All @@ -57,6 +76,7 @@ jobs:
flags: python${{ matrix.python-version }}

build:
name: Build
runs-on: ubuntu-latest
needs: test
steps:
Expand All @@ -67,9 +87,10 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: 'pip'

- name: Install build dependencies
run: pip install build twine
run: python -m pip install build twine

- name: Build package
run: python -m build
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: Deploy docs to GitHub Pages

# yamllint disable-line rule:truthy
on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: '3.11'

- name: Create venv and install docs dependencies
run: |
python -m venv .venv
.venv/bin/pip install -e ".[docs]"

- name: Build site
run: .venv/bin/zensical build

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: site

deploy:
name: Deploy site
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4
83 changes: 72 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,96 @@
---
name: Release to PyPI

# yamllint disable-line rule:truthy
on:
workflow_dispatch:
release:
types:
- published
- edited

permissions:
contents: write
id-token: write
contents: read

concurrency:
group: release
cancel-in-progress: false

jobs:
release:
build:
name: Build distribution
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
persist-credentials: false

- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: 'pip'

- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install build dependencies
run: pip install build
run: python -m pip install build twine

- name: Build package
run: python -m build

- name: Release to PyPI
- name: Check package
run: twine check dist/*

- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-testpypi:
name: Publish to TestPyPI
needs: build
if: github.event.release.prerelease
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
environment:
name: testpypi
url: https://test.pypi.org/project/timerun/
steps:
- name: Download distribution packages
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

- name: Create tag
run: |
VERSION=$(python -c "import timerun; print(timerun.__version__)")
git tag "v$VERSION"
git push origin "v$VERSION"
publish-pypi:
name: Publish to PyPI
needs: build
if: ${{ !github.event.release.prerelease }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
environment:
name: pypi
url: https://pypi.org/project/timerun/
steps:
- name: Download distribution packages
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading