Skip to content

Commit

Permalink
Update metadata and config
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Sep 24, 2022
1 parent 288f0c0 commit ea767f8
Show file tree
Hide file tree
Showing 18 changed files with 50 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@
name: "changelog: skip"

# Other labels
- color: 28a745
description: "To automatically merge PRs that are ready"
name: automerge
- color: 0366d6
description: "For dependencies and dependabot"
description: "For dependencies"
name: dependencies
- 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
18 changes: 18 additions & 0 deletions .github/workflows/require-pr-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Require PR label

on:
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]

jobs:
label:
runs-on: ubuntu-latest

steps:
- uses: mheap/github-action-required-labels@v2
with:
mode: minimum
count: 1
labels:
"changelog: Added, changelog: Changed, changelog: Deprecated, changelog:
Fixed, changelog: Removed, changelog: Security, changelog: skip"
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11-dev", "pypy-3.7", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.11-dev", "pypy-3.8", "3.7", "3.8", "3.9", "3.10"]
os: [windows-latest, macos-latest, ubuntu-latest]

steps:
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ repos:
rev: 5.10.1
hooks:
- id: isort
args: [--add-import=from __future__ import annotations]

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
Expand All @@ -30,6 +31,7 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2021 Hugo van Kemenade
Copyright (c) 2018-2022 Hugo van Kemenade

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![PyPI downloads](https://img.shields.io/pypi/dm/norwegianblue.svg)](https://pypistats.org/packages/norwegianblue)
[![Test](https://github.com/hugovk/norwegianblue/actions/workflows/test.yml/badge.svg)](https://github.com/hugovk/norwegianblue/actions)
[![codecov](https://codecov.io/gh/hugovk/norwegianblue/branch/main/graph/badge.svg)](https://codecov.io/gh/hugovk/norwegianblue)
[![GitHub](https://img.shields.io/github/license/hugovk/norwegianblue.svg)](LICENSE.txt)
[![Licence](https://img.shields.io/github/license/hugovk/norwegianblue.svg)](LICENSE.txt)
[![Code style: Black](https://img.shields.io/badge/code%20style-Black-000000.svg)](https://github.com/psf/black)

<p align="center"><img src="https://raw.githubusercontent.com/hugovk/norwegianblue/main/img/eol-python.png" width="319" height="197"></p>
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
- [ ] Check installation:

```bash
pip3 uninstall -y norwegianblue && pip3 install -U norwegianblue
pip3 uninstall -y norwegianblue && pip3 install -U norwegianblue && norwegianblue --version
```
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires = [

[project]
name = "norwegianblue"
description = "CLI to show end-of-life dates for a number of products."
description = "CLI to show end-of-life dates for a number of products"
readme = "README.md"
keywords = [
"end-of-life",
Expand Down Expand Up @@ -43,6 +43,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
[project.optional-dependencies]
tests = [
Expand Down
2 changes: 2 additions & 0 deletions scripts/run_command.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import subprocess


Expand Down
2 changes: 1 addition & 1 deletion src/norwegianblue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Python 3.8+
import importlib.metadata as importlib_metadata
except ImportError:
# Python 3.7 and lower
# Python 3.7
import importlib_metadata # type: ignore

__version__ = importlib_metadata.version(__name__)
Expand Down
2 changes: 2 additions & 0 deletions src/norwegianblue/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from norwegianblue import cli

if __name__ == "__main__":
Expand Down
2 changes: 2 additions & 0 deletions src/norwegianblue/_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import random

d = {}
Expand Down
4 changes: 3 additions & 1 deletion src/norwegianblue/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
Something missing? Please contribute! https://endoflife.date/contribute
"""
from __future__ import annotations

import argparse
import atexit
import logging
Expand Down Expand Up @@ -50,7 +52,7 @@ def main() -> None:
"--color",
default="auto",
choices=("yes", "no", "auto"),
help="color terminal output",
help="Color the terminal output",
)
parser.add_argument(
"--clear-cache", action="store_true", help="Clear cache before running"
Expand Down
2 changes: 2 additions & 0 deletions tests/data/expected_output.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

EXPECTED_HTML = """
<table>
<thead>
Expand Down
2 changes: 2 additions & 0 deletions tests/data/sample_response.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

SAMPLE_RESPONSE_ALL_JSON = """
[
"alpine",
Expand Down
2 changes: 2 additions & 0 deletions tests/test_cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""
Unit tests for norwegianblue cache
"""
from __future__ import annotations

import tempfile
from pathlib import Path

Expand Down
2 changes: 2 additions & 0 deletions tests/test_norwegianblue.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""
Unit tests for norwegianblue
"""
from __future__ import annotations

import json
import os
from pathlib import Path
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ envlist =
cog
lint
pins
py{311, 310, 39, 38, 37}
py{py3, 311, 310, 39, 38, 37}
isolated_build = true

[testenv]
Expand All @@ -30,7 +30,7 @@ skip_install = true
deps =
pre-commit
commands =
pre-commit run --all-files
pre-commit run --all-files --show-diff-on-failure

[testenv:pins]
extras =
Expand Down

0 comments on commit ea767f8

Please sign in to comment.