Skip to content

Commit 7a6f947

Browse files
authored
hatchling (#59)
* Convert yaqc to hatchling * Hatchling for yaqd-core * yaqd fakes, ci , changelogs
1 parent d125cb8 commit 7a6f947

File tree

14 files changed

+100
-86
lines changed

14 files changed

+100
-86
lines changed

.github/workflows/python-publish.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This workflows will upload a Python Package using flit when a release is created
1+
# This workflows will upload a Python Package when a release is created
22
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
33

44
name: Upload Python Package
@@ -21,34 +21,34 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip!=22.1.*
24-
pip install flit
24+
pip install build twine
2525
- name: Build and publish yaqd-core
2626
if: startsWith( github.ref_name, 'yaqd-core-')
2727
env:
28-
FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }}
29-
FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD_YAQD_CORE }}
28+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
29+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD_YAQD_CORE }}
3030
run: |
3131
cd yaqd-core
32-
flit install
33-
flit publish
32+
python -m build .
33+
twine upload dist/*
3434
3535
- name: Build and publish yaqc
3636
if: startsWith( github.ref_name, 'yaqc-')
3737
env:
38-
FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }}
39-
FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD_YAQC }}
38+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
39+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD_YAQC }}
4040
run: |
4141
cd yaqc
42-
flit install
43-
flit publish
42+
python -m build .
43+
twine upload dist/*
4444
4545
- name: Build and publish yaqd-core
4646
if: startsWith( github.ref_name, 'yaqd-fakes-')
4747
env:
48-
FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }}
49-
FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD_YAQD_FAKES }}
48+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
49+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD_YAQD_FAKES }}
5050
run: |
5151
cd yaqd-fakes
52-
flit install
53-
flit publish
52+
python -m build .
53+
twine upload dist/*
5454

yaqc/CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
55

66
## [Unreleased]
77

8+
## [2023.6.0]
9+
810
### Fixed
911
- fastavro >=1.7 prevents infrequent CPU locking from bad string parsing
1012

1113
### Added
1214
- `timeout` argument to Client, defaulting to 10 seconds
1315

16+
### Changed
17+
- moved to hatchling build system
18+
1419
## [2022.5.0]
1520

1621
### Changed
@@ -118,7 +123,8 @@ There are no actual code changes, this release is to update the release pipeline
118123
### Added
119124
- initial release
120125

121-
[Unreleased]: https://github.com/yaq-project/yaq-python/compare/yaqc-2022.5.0...main
126+
[Unreleased]: https://github.com/yaq-project/yaq-python/compare/yaqc-2023.6.0...main
127+
[2023.6.0]: https://github.com/yaq-project/yaq-python/compare/yaqc-2022.5.0...yaqc-2023.6.0
122128
[2022.5.0]: https://github.com/yaq-project/yaq-python/compare/yaqc-2022.4.0...yaqc-2022.5.0
123129
[2022.4.0]: https://github.com/yaq-project/yaq-python/compare/yaqc-2021.12.0...yaqc-2022.4.0
124130
[2021.12.0]: https://github.com/yaq-project/yaq-python/compare/yaqc-2021.10.0...yaqc-2021.12.0

yaqc/pyproject.toml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,42 @@
11
[build-system]
2-
requires = ["flit_core >=2,<4"]
3-
build-backend = "flit_core.buildapi"
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
44

5-
[tool.flit.metadata]
6-
module = "yaqc"
7-
author = "yaq developers"
8-
home-page = "https://yaq.fyi"
5+
[project]
6+
name = "yaqc"
7+
authors = [{name="yaq developers"}]
98
requires-python = ">=3.6"
10-
requires = ["fastavro>=1.7"]
11-
description-file="README.md"
9+
dependencies = ["fastavro>=1.7"]
10+
dynamic = ["version"]
11+
license = "LGPL-3.0-only"
12+
description="Generic yaq client."
13+
readme="README.md"
1214
classifiers=[
13-
"Development Status :: 5 - Production/Stable",
15+
"Development Status :: 5 - Production/Stable",
1416
"Intended Audience :: Science/Research",
1517
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
1618
"Natural Language :: English",
1719
"Programming Language :: Python :: 3",
1820
"Programming Language :: Python :: 3.8",
1921
"Programming Language :: Python :: 3.9",
2022
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
2124
"Topic :: Scientific/Engineering",
2225
]
2326

24-
[tool.flit.metadata.urls]
27+
[project.urls]
28+
"Home Page" = "https://yaq.fyi"
2529
Source = "https://github.com/yaq-project/yaq-python"
2630
Issues = "https://github.com/yaq-project/yaq-python/issues"
27-
Documentation = "https://python.yaq.fyi/yaqc/"
31+
Documentation = "https://yaq.fyi/blog/yaqc/"
2832

2933

30-
[tool.flit.metadata.requires-extra]
34+
[project.optional-dependencies]
3135
dev = ["black", "pre-commit"]
3236

37+
[tool.hatch.version]
38+
path = "yaqc/__version__.py"
39+
3340
[tool.black]
3441
line-length = 99
3542
target-version = ['py36', 'py37', 'py38']

yaqc/yaqc/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

yaqc/yaqc/__version__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
__all__ = ["__version__", "__branch__"]
1212

1313

14-
# read from VERSION file
15-
with open(str(here / "VERSION")) as f:
16-
__version__ = f.read().strip()
14+
__version__ = "2023.6.0"
1715

1816
try:
1917
__branch__ = (

yaqd-core/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
77

88
### Changed
99
- Upgraded appdirs to platformdirs
10+
- moved to hatchling build system
1011

1112
## [2023.2.0]
1213

yaqd-core/pyproject.toml

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,40 @@
11
[build-system]
2-
requires = ["flit_core >=2,<3.2"]
3-
build-backend = "flit_core.buildapi"
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
44

5-
[tool.flit.metadata]
6-
module = "yaqd_core"
7-
dist-name = "yaqd-core"
8-
author = "yaq developers"
9-
home-page = "https://yaq.fyi"
5+
[project]
6+
name = "yaqd-core"
7+
author = [{name="yaq developers"}]
108
requires-python = ">=3.7"
11-
requires = ["platformdirs", "tomli", "tomli-w", "fastavro>=1.4.0"]
12-
description-file="README.md"
9+
dependencies = ["platformdirs", "tomli", "tomli-w", "fastavro>=1.4.0"]
10+
readme="README.md"
11+
dynamic = ["version"]
12+
license = "LGPL-3.0-only"
1313
classifiers=[
14-
"Development Status :: 5 - Production/Stable",
15-
"Intended Audience :: Science/Research",
16-
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
17-
"Natural Language :: English",
18-
"Programming Language :: Python :: 3",
19-
"Programming Language :: Python :: 3.8",
20-
"Programming Language :: Python :: 3.9",
21-
"Programming Language :: Python :: 3.10",
22-
"Programming Language :: Python :: 3.11",
23-
"Topic :: Scientific/Engineering",
14+
"Development Status :: 5 - Production/Stable",
15+
"Intended Audience :: Science/Research",
16+
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
17+
"Natural Language :: English",
18+
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3.8",
20+
"Programming Language :: Python :: 3.9",
21+
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: 3.11",
23+
"Topic :: Scientific/Engineering",
2424
]
2525

26-
[tool.flit.metadata.urls]
26+
[project.urls]
27+
"Home Page" = "https://yaq.fyi"
2728
Documentation = "http://yaq-core-python.yaq.fyi/"
2829
Source = "https://github.com/yaq-project/yaq-python"
29-
Issues = "https://github.com/yaq-project/yaq-python/-/issues"
30+
Issues = "https://github.com/yaq-project/yaq-python/issues"
3031

31-
[tool.flit.metadata.requires-extra]
32+
[project.optional-dependencies]
3233
dev = ["black", "pre-commit"]
3334

35+
[tool.hatch.version]
36+
path = "yaqd_core/__version__.py"
37+
3438
[tool.black]
3539
line-length = 99
3640
target-version = ['py37', 'py38']

yaqd-core/yaqd_core/AVRO_VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

yaqd-core/yaqd_core/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

yaqd-core/yaqd_core/__version__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@
99

1010
__all__ = ["__version__", "__branch__", "__avro_version__"]
1111

12-
# read from AVRO_VERSION file
13-
with open(str(here / "AVRO_VERSION")) as f:
14-
__avro_version__ = f.read().strip()
12+
__avro_version__ = "1.9.2"
1513

16-
# read from VERSION file
17-
with open(str(here / "VERSION")) as f:
18-
__version__ = f.read().strip()
14+
__version__ = "2023.6.0"
1915

2016
try:
2117
__branch__ = (

0 commit comments

Comments
 (0)