Skip to content

Commit

Permalink
Merge pull request #331 from hugovk/update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored May 2, 2022
2 parents eec2f40 + ac55c99 commit 2d6c902
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 24 deletions.
19 changes: 12 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
version: 2
updates:
- package-ecosystem: pip
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
time: "03:00"
open-pull-requests-limit: 10
labels:
- "changelog: skip"
- dependencies
- "dependencies"
ignore:
- dependency-name: respx
versions:
- 0.17.0
- package-ecosystem: github-actions
- dependency-name: "*"
update-types:
- "version-update:semver-minor"
- "version-update:semver-patch"
- package-ecosystem: pip
directory: "/"
schedule:
interval: monthly
time: "03:00"
open-pull-requests-limit: 10
labels:
- dependencies
- "changelog: skip"
- "dependencies"
ignore:
- dependency-name: respx
versions:
- 0.17.0
8 changes: 7 additions & 1 deletion .github/labels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default GitHub labels.
# Default GitHub labels
- color: d73a4a
description: "Something isn't working"
name: bug
Expand Down Expand Up @@ -55,12 +55,18 @@
- color: 0366d6
description: "For dependencies and dependabot"
name: dependencies
- color: 0052cc
description: "Documentation"
name: docs
- color: f4660e
description: ""
name: Hacktoberfest
- color: f4660e
description: "To credit accepted Hacktoberfest PRs"
name: hacktoberfest-accepted
- color: d65e88
description: "Deploy and release"
name: release
- color: fbca04
description: "Unit tests, linting, CI, etc."
name: testing
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
deploy:
if: github.repository_owner == 'hugovk'
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
Expand All @@ -24,7 +24,7 @@ jobs:
with:
python-version: "3.10"
cache: pip
cache-dependency-path: "setup.py"
cache-dependency-path: setup.cfg

- name: Install dependencies
run: |
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.11-dev", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
# Include new variables for Codecov
- { codecov-flag: GHA_Ubuntu, os: ubuntu-latest }
- { codecov-flag: GHA_macOS, os: macos-latest }
- { codecov-flag: GHA_Windows, os: windows-latest }
os: [windows-latest, macos-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v3
Expand All @@ -27,7 +22,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: "setup.py"
cache-dependency-path: setup.cfg

- name: Install dependencies
run: |
Expand All @@ -52,7 +47,7 @@ jobs:
tox -e pins
- name: Upload coverage
uses: codecov/codecov-action@v3.1.0
uses: codecov/codecov-action@v3
with:
flags: ${{ matrix.codecov-flag }}
flags: ${{ matrix.os }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
9 changes: 7 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
rev: v2.32.0
hooks:
- id: pyupgrade
args: [--py37-plus]
Expand Down Expand Up @@ -28,7 +28,7 @@ repos:
- id: python-check-blanket-noqa

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.2.0
hooks:
- id: check-merge-conflict
- id: check-toml
Expand All @@ -41,6 +41,11 @@ repos:
- id: setup-cfg-fmt
args: [--max-py-version=3.11]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.3.3
hooks:
- id: pyproject-fmt

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 0.5.2
hooks:
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=45",
"setuptools_scm[toml]>=6.2",
"wheel",
]

[tool.black]
target_version = ["py37"]
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ keywords =
BigQuery
project_urls =
Source=https://github.com/hugovk/pypistats
Changelog=https://github.com/hugovk/pypistats/releases

[options]
packages = find:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup


def local_scheme(version) -> str:
def local_scheme(version: str) -> str:
"""Skip the local version (eg. +xyz of 0.6.1.dev4+gdf99fe2)
to be able to upload to Test PyPI"""
return ""
Expand Down
1 change: 0 additions & 1 deletion src/pypistats/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
"""
Python interface to PyPI Stats API
https://pypistats.org/api
Expand Down

0 comments on commit 2d6c902

Please sign in to comment.