Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
uses: actions/dependency-review-action@v4
20 changes: 8 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,30 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
poetry-version: ["1.8.1"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
- name: Python Poetry Action
uses: abatilo/actions-poetry@v3
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: |
poetry install --with dev,extras
uv sync --extra dev --extra extras
- name: Run tests
run: |
poetry run coverage run -m pytest
poetry run coverage lcov -o coverage/lcov.info
poetry run coverage html -d coverage
uv run coverage run -m pytest
uv run coverage lcov -o coverage/lcov.info
uv run coverage html -d coverage
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report-${{ matrix.python-version }}
path: coverage
- name: Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-added-large-files
Expand All @@ -22,16 +22,16 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
rev: 7.2.0
hooks:
- id: flake8
additional_dependencies: ["importlib-metadata<5.0.0"]
- repo: https://github.com/psf/black
rev: 24.8.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.16.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
943 changes: 0 additions & 943 deletions poetry.lock

This file was deleted.

59 changes: 31 additions & 28 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
[tool.poetry]
[project]
name = "flickr-download"
version = "0.3.8"
description = "Download photos from Flickr"
authors = ["Allan Beaufour <[email protected]>"]
authors = [{name = "Allan Beaufour", email = "[email protected]"}]
readme = "README.md"
license = "Apache-2.0"
packages = [{ include = "flickr_download" }]
repository = "https://github.com/beaufour/flickr-download"
license = {text = "Apache-2.0"}
requires-python = ">=3.9,<4.0"
dependencies = [
"flickr-api>=0.7.7",
"python-dateutil>=2.8.1",
"PyYAML>=5.3,<7.0",
"pathvalidate>=2.5.2,<4.0.0",
"importlib-metadata~=4.2.0; python_version<'3.8'",
"interrogate>=1.5.0",
"usingversion>=0.1.2",
"setuptools>=75.1,<81.0",
]

[tool.poetry.scripts]
flickr_download = "flickr_download.flick_download:main"

[tool.poetry.dependencies]
python = ">=3.9,<4.0"
flickr-api = "^0.7.7"
python-dateutil = "^2.8.1"
PyYAML = ">=5.3,<7.0"
pathvalidate = ">=2.5.2,<4.0.0"
importlib-metadata = { version = "~4.2.0", python = "<3.8" }
interrogate = "^1.5.0"
usingversion = "^0.1.2"
setuptools = ">=75.1,<81.0"
[project.optional-dependencies]
extras = [
"coverage>=6.5,<8.0",
"python-coveralls>=2.9.3",
]
dev = [
"pytest>=7.2,<9.0",
"flake8>=4.0.1,<8.0.0",
"black>=22.8,<26.0",
"pre-commit>=2.20,<5.0",
]

[tool.poetry.group.extras.dependencies]
coverage = ">=6.5,<8.0"
python-coveralls = "^2.9.3"
[project.scripts]
flickr_download = "flickr_download.flick_download:main"

[tool.poetry.group.dev.dependencies]
pytest = ">=7.2,<9.0"
flake8 = ">=4.0.1,<8.0.0"
black = ">=22.8,<26.0"
pre-commit = ">=2.20,<5.0"
[project.urls]
Repository = "https://github.com/beaufour/flickr-download"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.black]
line-length = 100
Expand Down
17 changes: 7 additions & 10 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VERSION=$(poetry version -s)
VERSION=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
echo Getting ready to release version ${VERSION}

if [[ $(git tag -l | grep ${VERSION}) ]]; then
Expand All @@ -13,13 +13,10 @@ if [[ -n $(git status -s) ]]; then
exit 1
fi

git tag v`poetry version -s`
git tag v${VERSION}
git push --tags
poetry build
poetry publish
poetry version patch
git add pyproject.toml
git commit -m "Bumps to version `poetry version -s`"
git push

echo Remember to edit the relase notes on https://github.com/beaufour/flickr-download/releases
uv build
uv publish
# Note: uv doesn't have built-in version bumping, you'll need to manually update pyproject.toml
echo "Remember to manually bump version in pyproject.toml and commit"
echo "Remember to edit the release notes on https://github.com/beaufour/flickr-download/releases"
Loading
Loading