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

build: Update scaffolding, tooling #38

Merged
merged 1 commit into from
Jan 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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: pip
directory: /
schedule:
interval: weekly
labels:
- dependencies
commit-message:
prefix: "build(deps)"
41 changes: 9 additions & 32 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,23 @@ name: Linters

on:
pull_request:
push:
branches: [main]

jobs:
gitlint:
commitizen:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
sparse-checkout: |
pyproject.toml
sparse-checkout-cone-mode: false

- name: Set up python environment
uses: actions/setup-python@v4
with:
cache: 'pip'

- run: pip install gitlint

# NOTE: first commit using conventional-commits: 8115756
- run: gitlint --fail-without-commits --commits 8115756..HEAD

pre-commit:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3

- name: Install poetry
run: pipx install poetry

- name: Set up python environment
uses: actions/setup-python@v4
with:
cache: 'poetry'

- run: poetry install --no-root --with=dev --sync

- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install commitizen
run: pipx install commitizen

- run: poetry run pre-commit run --show-diff-on-failure --color=always --all-files
- run: cz check --rev-range origin/main..HEAD
shell: bash
16 changes: 16 additions & 0 deletions .github/workflows/poetry-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Poetry Build

on:
pull_request:

jobs:
poetry-build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry

- run: poetry build
1 change: 0 additions & 1 deletion .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ jobs:
- uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
plugins: "poetry-dynamic-versioning-plugin"
36 changes: 17 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,41 @@
ci:
autofix_prs: false
autoupdate_schedule: quarterly
autoupdate_commit_msg: 'chore: [pre-commit.ci] pre-commit autoupdate'

repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.262'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.11'
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
- id: ruff-format

- repo: https://github.com/psf/black
rev: "23.3.0"
hooks:
- id: black

- repo: local
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.8.0'
hooks:
- id: mypy
name: mypy
entry: poetry run mypy
require_serial: true
language: system
types: [python]
additional_dependencies:
- types-requests
- types-python-dateutil
- types-tqdm
- types-PyYAML

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
- id: check-ast

- repo: https://github.com/jorisroovers/gitlint
rev: 'v0.19.1'
- repo: https://github.com/commitizen-tools/commitizen
rev: 'v3.13.0'
hooks:
- id: gitlint
- id: commitizen

- repo: https://github.com/python-poetry/poetry
rev: '1.4.2'
rev: '1.7.1'
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## Unreleased

### Feat

- Allow configuration of config envvar
- Add config file support

### Fix

- Update user-agent URL

### Refactor

- Use requests lib for all requests

## v0.5.1 (2023-04-26)

### Fix

- Package entrypoint moved

## v0.5.0 (2023-04-26)

### Fix

- Propagate package version where needed

## v0.4.3 (2023-04-22)

## v0.4.2 (2023-04-22)

## v0.4.1 (2023-04-21)

### Fix

- Restore slugify functionality
- PyPI references improvements

## v0.4.0 (2023-04-21)

### Fix

- Restore argparse error handling
- Restore progress bar functionality
- Make script callable properly via main func

### Refactor

- Pay down complexity tech debt
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.PHONY: git-hooks
git-hooks: .git/hooks/pre-commit .git/hooks/commit-msg

.git/hooks/%:
@pre-commit install --hook-type $*
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@

![Podcast Archiver Logo](assets/icon.png)

[![PyPI](https://img.shields.io/pypi/v/podcast-archiver.svg)](https://pypi.org/project/podcast-archiver/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/podcast-archiver.svg)](https://pypi.org/project/podcast-archiver/)
[![version](https://img.shields.io/pypi/v/podcast-archiver.svg)](https://pypi.org/project/podcast-archiver/)
[![python](https://img.shields.io/pypi/pyversions/podcast-archiver.svg)](https://pypi.org/project/podcast-archiver/)
[![downloads](https://img.shields.io/pypi/dm/podcast-archiver)](https://pypi.org/project/podcast-archiver/)

[![Code Quality](https://app.codacy.com/project/badge/Grade/d0c31899a9964ccc82fa4080717d45a6)](https://app.codacy.com/gh/janw/podcast-archiver/dashboard)
[![codecov](https://codecov.io/gh/janw/podcast-archiver/branch/main/graph/badge.svg?token=G8WI2ZILRG)](https://codecov.io/gh/janw/podcast-archiver)
[![pre-commit.ci](https://results.pre-commit.ci/badge/github/janw/podcast-archiver/main.svg)](https://results.pre-commit.ci/latest/github/janw/podcast-archiver/main)

[![Linter: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
[![Code style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![Dependency management: poetry](https://img.shields.io/badge/deps-poetry-blueviolet.svg)](https://poetry.eustace.io/docs/)
[![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://docs.astral.sh/ruff/)
[![poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/docs/)
[![pre-commit](https://img.shields.io/badge/-pre--commit-f8b424?logo=pre-commit&labelColor=grey)](https://github.com/pre-commit/pre-commit)

</div>

Expand Down
2 changes: 1 addition & 1 deletion podcast_archiver/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "dev"
__version__ = "v0.5.1"
Loading