Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: antonagestam/abcattrs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.1.0
Choose a base ref
...
head repository: antonagestam/abcattrs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Mar 20, 2022

  1. Copy the full SHA
    f0ad387 View commit details
  2. Bump version

    antonagestam committed Mar 20, 2022
    Copy the full SHA
    1590689 View commit details

Commits on Jun 7, 2022

  1. Copy the full SHA
    bf569ca View commit details
  2. Copy the full SHA
    d8008a5 View commit details
  3. Bump version

    antonagestam committed Jun 7, 2022
    Copy the full SHA
    a925644 View commit details

Commits on Jun 28, 2022

  1. Copy the full SHA
    1627740 View commit details

Commits on Jul 2, 2022

  1. Copy the full SHA
    1b07eb6 View commit details
  2. Copy the full SHA
    7f179ed View commit details
  3. Copy the full SHA
    6fb97c3 View commit details

Commits on Sep 17, 2022

  1. Copy the full SHA
    4586a48 View commit details
  2. Copy the full SHA
    2b7c059 View commit details
  3. Copy the full SHA
    0dcbf2f View commit details
  4. Copy the full SHA
    1444240 View commit details
  5. Fix premature check on abstract class (#23)

    `@abstractattrs` check shouldn't interpret an abstract class as
    concrete. We're now checking if a class is abstract before
    verifying abstract attributes.
    
    I'm aware that there's a discrepancy here. If there's no methods
    decorated as `@abstractmethod` and we only have ´@abstractattrs` we'll
    still need to inherit `abc.ABC` on each subclass.
    
    However, this change still covers some additional cases
    flaeppe authored Sep 17, 2022
    Copy the full SHA
    0afc414 View commit details
  6. Copy the full SHA
    e799e2b View commit details
  7. Add badges (#27)

    antonagestam authored Sep 17, 2022
    Copy the full SHA
    f62b4ae View commit details
  8. Bump version (#28)

    antonagestam authored Sep 17, 2022
    Copy the full SHA
    c076d26 View commit details
  9. Copy the full SHA
    3642aad View commit details

Commits on Sep 25, 2022

  1. Update README.md (#30)

    antonagestam authored Sep 25, 2022
    Copy the full SHA
    ce916c0 View commit details

Commits on Feb 7, 2023

  1. Copy the full SHA
    eba59d8 View commit details

Commits on Jun 22, 2023

  1. Copy the full SHA
    6ba195c View commit details

Commits on Nov 25, 2024

  1. Copy the full SHA
    29a7647 View commit details
  2. Copy the full SHA
    1823ce6 View commit details
  3. Copy the full SHA
    b54844d View commit details

Commits on Nov 28, 2024

  1. Copy the full SHA
    d1feb25 View commit details

Commits on Nov 30, 2024

  1. Copy the full SHA
    7e20fe2 View commit details
  2. Copy the full SHA
    aa935a2 View commit details

Commits on Jan 25, 2025

  1. Copy the full SHA
    7f73c8f View commit details
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = True

[*]
end_of_line = lf
insert_final_newline = True
indent_style = space
indent_size = 4
trim_trailing_whitespace = True

[*.py]
charset = utf-8
max_line_length = 88

[*.{yml,yaml,md,toml}]
indent_size = 2

[Makefile]
indent_style = tab
57 changes: 40 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -3,43 +3,66 @@ on:
push:
branches:
- main
workflow_dispatch:
pull_request:

jobs:
lint:
name: Static analysis
uses: less-action/reusables/.github/workflows/pre-commit.yaml@v2
with:
python-version: "3.10"
uses: antonagestam/goose/.github/workflows/run.yaml@0.9.0

check-build:
name: Check packaging metadata
uses: less-action/reusables/.github/workflows/python-test-build.yaml@v2
uses: less-action/reusables/.github/workflows/python-test-build.yaml@v8

test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
restore-keys: ${{ runner.os }}-pip
cache: pip
cache-dependency-path: setup.cfg
check-latest: true
- run: pip install -e '.[test]'
- run: coverage run -m pytest
- run: coverage report -m && coverage xml
- name: Report coverage
uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v5
if: '!github.event.schedule'
with:
file: coverage.xml
fail_ci_if_error: true
files: coverage.xml
name: codecov-py${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

type-check:
name: Type check
runs-on: ubuntu-latest
env:
FORCE_COLOR: "1"
COLUMNS: "150"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
cache-dependency-path: requirements-typing.txt
check-latest: true
- name: mypy cache
uses: actions/cache@v4
with:
path: .mypy_cache
key: "${{ runner.os }}-mypy-3.13-${{ hashFiles('requirements-typing.txt') }}"
restore-keys: |
${{ runner.os }}-mypy-3.13
${{ runner.os }}-mypy
- run: pip install -e .
- run: pip install -r requirements-typing.txt
- run: mypy --strict
43 changes: 40 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -6,6 +6,43 @@ on:

jobs:
build-and-publish:
uses: less-action/reusables/.github/workflows/python-publish.yaml@v2
secrets:
pypi_api_token: ${{ secrets.PYPI_API_TOKEN }}
name: Build and publish
runs-on: ubuntu-latest
permissions:
# permission required for trusted publishing
id-token: write
environment:
name: pypi
url: https://pypi.org/p/abcattrs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
cache-dependency-path: pyproject.toml
check-latest: true
- name: Install dependencies
run: python3 -m pip install --upgrade build pkginfo
- name: Build
run: python3 -m build --sdist --wheel .
- name: Inspect built wheel version
id: inspect-wheel-version
run: |
python3 << 'EOF' >> $GITHUB_OUTPUT
from pathlib import Path
from pkginfo import Wheel
[wheel_path] = Path("dist").glob("*.whl")
wheel = Wheel(wheel_path)
print(f"version={wheel.version}")
EOF
- name: Fail on version mismatch
if: ${{ steps.inspect-wheel-version.outputs.version != github.event.release.tag_name }}
run: |
echo "💥 The version of the built wheel does not match the release tag."
echo
echo "Release tag: '${{ github.event.release.tag_name }}'"
echo "Packaged version: '${{ steps.inspect-wheel-version.outputs.version }}'"
exit 1
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

# Dynamic version file
src/abcattrs/_version.py
1 change: 1 addition & 0 deletions .goose/check-manifest/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"source_ecosystem":{"language":"python","version":"3.13"},"source_dependencies":["check-manifest","setuptools-scm==8.1.0","setuptools==75.8.0","wheel==0.45.1"],"lock_files":[{"path":"requirements.txt","checksum":"sha256:a866d614d1a89c9f82d480e2e8413bb6f553fd7f7bb6ab2d62d9b82ffd4682f5"}],"checksum":"sha256:8d9ad830bd90c33447dd587dcef3b27eba51010775a1cb606141886557ef4cc6"}
21 changes: 21 additions & 0 deletions .goose/check-manifest/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
build==1.2.2.post1 \
--hash=sha256:1d61c0887fa860c01971625baae8bdd338e517b836a2f70dd1f7aa3a6b2fc5b5 \
--hash=sha256:b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7
check-manifest==0.50 \
--hash=sha256:6ab3e3aa72a008da3314b432f4c768c9647b4d6d8032f9e1a4672a572118e48c \
--hash=sha256:d300f9f292986aa1a30424af44eb45c5644e0a810e392e62d553b24bb3393494
packaging==24.2 \
--hash=sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759 \
--hash=sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f
pyproject-hooks==1.2.0 \
--hash=sha256:1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8 \
--hash=sha256:9e5c6bfa8dcc30091c74b0cf803c81fdd29d94f01992a7707bc97babb1141913
setuptools==75.8.0 \
--hash=sha256:c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6 \
--hash=sha256:e3982f444617239225d675215d51f6ba05f845d4eec313da4418fdbb56fb27e3
setuptools-scm==8.1.0 \
--hash=sha256:42dea1b65771cba93b7a515d65a65d8246e560768a66b9106a592c8e7f26c8a7 \
--hash=sha256:897a3226a6fd4a6eb2f068745e49733261a21f70b1bb28fce0339feb978d9af3
wheel==0.45.1 \
--hash=sha256:661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729 \
--hash=sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248
1 change: 1 addition & 0 deletions .goose/node/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"source_ecosystem":{"language":"node","version":"23.0.0"},"source_dependencies":["prettier"],"lock_files":[{"path":"package-lock.json","checksum":"sha256:880e610dfc3c8cad3ab578a985fc6176cbe20f7afcdca7092ecd0dcdea17ce05"},{"path":"package.json","checksum":"sha256:c5008cb00d6009f6d901cfe35523169a3deb91979b71fce65d6ac79fdace548b"}],"checksum":"sha256:63c94eb2dd8667b5913cd4987fff55c8ca053792106e3a16ee499af9ea6d0acd"}
27 changes: 27 additions & 0 deletions .goose/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .goose/node/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"lockfileVersion":3,"dependencies":{"prettier":"*"}}
1 change: 1 addition & 0 deletions .goose/python/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"source_ecosystem":{"language":"python","version":"3.13"},"source_dependencies":["blacken-docs","check-jsonschema","pre-commit-hooks","ruff"],"lock_files":[{"path":"requirements.txt","checksum":"sha256:bbe0025e78a4b1ecc1d7d1fbbdf58aaa7b1aafa1915885bb8919ed2e6ed695aa"}],"checksum":"sha256:552abb00fbdaacd384fffffc071f23ca30a67a3118f0c5540eb4702e735f1af2"}
Loading