Skip to content

Commit 9038f8f

Browse files
Prepare for 1.1.6 (#15)
1 parent 7518a48 commit 9038f8f

File tree

8 files changed

+99
-100
lines changed

8 files changed

+99
-100
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
21+
python-version: [3.9, "3.10", 3.11, 3.12, 3.13]
2222

2323
steps:
2424
- uses: actions/checkout@v4
@@ -31,20 +31,9 @@ jobs:
3131
with:
3232
python-version: ${{ matrix.python-version }}
3333

34-
- uses: actions/cache@v4
35-
id: depcache
36-
with:
37-
path: deps
38-
key: requirements-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
39-
40-
- name: Download dependencies
41-
if: steps.depcache.outputs.cache-hit != 'true'
42-
run: |
43-
pip download --dest=deps -r requirements.txt
44-
4534
- name: Install dependencies
4635
run: |
47-
pip install -U --no-index --find-links=deps deps/*
36+
pip install -r requirements.txt
4837
4938
- name: Run tests
5039
run: |
@@ -74,19 +63,19 @@ jobs:
7463
bash <(curl -s https://codecov.io/bash)
7564
7665
- name: Install distribution dependencies
77-
run: pip install --upgrade twine setuptools wheel
78-
if: matrix.python-version == 3.10
66+
run: pip install build
67+
if: matrix.python-version == 3.12
7968

8069
- name: Create distribution package
81-
run: python setup.py sdist bdist_wheel
82-
if: matrix.python-version == 3.10
70+
run: python -m build
71+
if: matrix.python-version == 3.12
8372

8473
- name: Upload distribution package
8574
uses: actions/upload-artifact@master
8675
with:
87-
name: dist-package-${{ matrix.python-version }}
76+
name: dist
8877
path: dist
89-
if: matrix.python-version == 3.10
78+
if: matrix.python-version == 3.12
9079

9180
publish:
9281
runs-on: ubuntu-latest
@@ -96,17 +85,28 @@ jobs:
9685
- name: Download a distribution artifact
9786
uses: actions/download-artifact@v4
9887
with:
99-
name: dist-package-3.10
88+
name: dist
10089
path: dist
101-
- name: Publish distribution 📦 to Test PyPI
102-
uses: pypa/gh-action-pypi-publish@master
90+
91+
- name: Use Python 3.12
92+
uses: actions/setup-python@v1
10393
with:
104-
skip_existing: true
105-
user: __token__
106-
password: ${{ secrets.test_pypi_password }}
107-
repository_url: https://test.pypi.org/legacy/
94+
python-version: '3.12'
95+
96+
- name: Install dependencies
97+
run: |
98+
pip install twine
99+
100+
- name: Publish distribution 📦 to Test PyPI
101+
run: |
102+
twine upload -r testpypi dist/*
103+
env:
104+
TWINE_USERNAME: __token__
105+
TWINE_PASSWORD: ${{ secrets.test_pypi_password }}
106+
108107
- name: Publish distribution 📦 to PyPI
109-
uses: pypa/gh-action-pypi-publish@master
110-
with:
111-
user: __token__
112-
password: ${{ secrets.pypi_password }}
108+
run: |
109+
twine upload -r pypi dist/*
110+
env:
111+
TWINE_USERNAME: __token__
112+
TWINE_PASSWORD: ${{ secrets.pypi_password }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ __pycache__
66
*.egg-info
77
*.tar.gz
88
.mypy_cache
9+
dist/*

CHANGELOG.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,24 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.1.6] - 2024-11-07 :snake:
9-
- Drop python3.6 and python3.7 support
10-
- Use `obj.model_dump` instead of `obj.dict` for Pydantic V2
11-
- Workflow maintenance
12-
- Applies `black`, `flake8`, `isort`, `mypy`
8+
## [1.1.6] - 2025-03-29 :snake:
9+
10+
- Drop Python 3.6 and Python 3.7 support.
11+
- Use `obj.model_dump` instead of `obj.dict` for Pydantic V2.
12+
- Add support for `Decimal` in `FriendlyEncoder`.
13+
- Apply `black`, `flake8`, `isort`, `mypy`.
14+
- Replace `setup.py` with `pyproject.toml`.
15+
- Workflow maintenance.
1316

1417
## [1.1.5] - 2022-03-14 :tulip:
15-
- Adds `py.typed` file
16-
- Adds `ConflictException`
18+
19+
- Add `py.typed` file.
20+
- Add `ConflictException`.
1721

1822
## [1.1.4] - 2020-11-08 :octocat:
19-
- Completely migrates to GitHub Workflows
20-
- Improves build to test Python 3.6 and 3.9
21-
- Improves the `json.FriendlyEncoder` class to handle built-in `dataclasses`
22-
- Adds a changelog
23-
- Improves badges
23+
24+
- Migrate to GitHub Workflows.
25+
- Improve build to test Python 3.6 and 3.9.
26+
- Improve the `json.FriendlyEncoder` class to handle built-in `dataclasses`.
27+
- Add a changelog.
28+
- Improve badges.

essentials.code-workspace

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
11
{
2-
"folders": [
3-
{
4-
"path": "."
5-
}
6-
],
7-
"settings": {
8-
"python.testing.pytestArgs": [
9-
"."
2+
"folders": [
3+
{
4+
"path": "."
5+
}
106
],
11-
"files.trimTrailingWhitespace": true,
12-
"files.trimFinalNewlines": true,
13-
"python.testing.unittestEnabled": false,
14-
"python.testing.nosetestsEnabled": false,
15-
"python.testing.pytestEnabled": true,
16-
"python.linting.pylintEnabled": false,
17-
"python.linting.flake8Enabled": true,
18-
"python.linting.mypyEnabled": true,
19-
"python.linting.enabled": true,
20-
"[python]": {
21-
"editor.tabSize": 4,
22-
"editor.rulers": [
23-
88,
24-
100
25-
]
7+
"settings": {
8+
"python.testing.pytestArgs": [
9+
"."
10+
],
11+
"files.trimTrailingWhitespace": true,
12+
"files.trimFinalNewlines": true,
13+
"python.testing.unittestEnabled": false,
14+
"python.testing.pytestEnabled": true,
15+
"[python]": {
16+
"editor.tabSize": 4,
17+
"editor.rulers": [
18+
88,
19+
100
20+
]
21+
}
2622
}
27-
}
2823
}

essentials/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "1.1.6"

essentials/json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import dataclasses
88
import json
99
from datetime import date, datetime, time
10+
from decimal import Decimal
1011
from enum import Enum
1112
from typing import Any
1213
from uuid import UUID
13-
from decimal import Decimal
1414

1515
__all__ = ["FriendlyEncoder", "dumps"]
1616

pyproject.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "essentials"
7+
dynamic = ["version"]
8+
description = "General purpose classes and functions"
9+
readme = "README.md"
10+
license = { file = "LICENSE" }
11+
authors = [{ name = "Roberto Prevato", email = "[email protected]" }]
12+
keywords = ["core", "utilities"]
13+
classifiers = [
14+
"Development Status :: 5 - Production/Stable",
15+
"License :: OSI Approved :: MIT License",
16+
"Programming Language :: Python :: 3",
17+
"Programming Language :: Python :: 3.9",
18+
"Programming Language :: Python :: 3.10",
19+
"Programming Language :: Python :: 3.11",
20+
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
22+
"Operating System :: OS Independent",
23+
]
24+
urls = { homepage = "https://github.com/Neoteroi/essentials" }
25+
26+
[tool.hatch.version]
27+
path = "essentials/__init__.py"
28+
29+
[tool.setuptools.packages.find]
30+
include = ["essentials", "essentials.typesutils", "essentials.decorators"]

setup.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)