Skip to content

Commit b8177d8

Browse files
committed
chore: version 1.0.0
1 parent 3d704fe commit b8177d8

6 files changed

Lines changed: 30 additions & 37 deletions

File tree

‎.github/workflows/docker-publish.yml‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,3 @@ jobs:
4040
tags: |
4141
dbpedia/databus-python-client:latest
4242
dbpedia/databus-python-client:${{ steps.package.outputs.version }}
43-
44-
- name: Update Docker Hub overview
45-
uses: peter-evans/dockerhub-description@v5
46-
with:
47-
username: ${{ secrets.DBP_DOCKERHUB_CREDENTIAL_USERNAME }}
48-
password: ${{ secrets.DBP_DOCKERHUB_CREDENTIAL_TOKEN_PUSHIMAGES }}
49-
repository: dbpedia/databus-python-client
50-
short-description: Command-line and Python client for downloading, deploying and deleting datasets on DBpedia Databus.
51-
readme-filepath: ./doc/docker/README.md

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ Before using the client, install it via pip:
4141
python3 -m pip install databusclient
4242
```
4343

44-
Note: the PyPI release was updated and this repository prepares version `0.15`. If you previously installed `databusclient` via `pip` and observe different CLI behavior, upgrade to the latest release:
44+
Note: this repository prepares version `1.0.0`. If you previously installed `databusclient` via `pip` and observe different CLI behavior, upgrade to the latest release:
4545

4646
```bash
47-
python3 -m pip install --upgrade databusclient==0.15
47+
python3 -m pip install --upgrade databusclient==1.0.0
4848
```
4949

5050
You can then use the client in the command line:

‎databusclient/__init__.py‎

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,11 @@
55
``python -m databusclient``.
66
"""
77

8-
from importlib.metadata import PackageNotFoundError, version
9-
from pathlib import Path
10-
import tomllib
11-
128
from databusclient import cli
139
from databusclient.api.deploy import create_dataset, create_distribution, deploy
10+
from databusclient.version import __version__
1411

15-
16-
# Source checkouts do not always have current package metadata installed, so
17-
# prefer pyproject.toml locally and fall back to installed metadata for wheels
18-
def _get_version() -> str:
19-
pyproject = Path(__file__).resolve().parent.parent / "pyproject.toml"
20-
if pyproject.exists():
21-
with pyproject.open("rb") as f:
22-
return tomllib.load(f)["tool"]["poetry"]["version"]
23-
24-
try:
25-
return version("databusclient")
26-
except PackageNotFoundError:
27-
return "0.0.0"
28-
29-
30-
__version__ = _get_version()
31-
32-
__all__ = ["create_dataset", "deploy", "create_distribution"]
12+
__all__ = ["__version__", "create_dataset", "deploy", "create_distribution"]
3313

3414

3515
def run():

‎databusclient/manifest/writer.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import os
1212

1313
from databusclient.manifest.context import ManifestContext
14+
from databusclient.version import __version__
1415

1516
# JSON-LD context using DataID vocabulary — same vocabulary used
1617
# by the Databus platform itself for semantic interoperability.
@@ -23,7 +24,6 @@
2324
}
2425

2526
_SCHEMA_VERSION = "1.0"
26-
_CLIENT_VERSION = "0.15"
2727

2828

2929
class ManifestWriter:
@@ -70,7 +70,7 @@ def build_manifest_dict(context: ManifestContext) -> dict:
7070
"@context": _JSONLD_CONTEXT,
7171
"@type": "dbus:OperationManifest",
7272
"dbus:schemaVersion": _SCHEMA_VERSION,
73-
"dbus:clientVersion": _CLIENT_VERSION,
73+
"dbus:clientVersion": __version__,
7474
"dbus:command": context.command,
7575
"dcterms:issued": {
7676
"@value": context.issued,
@@ -170,4 +170,4 @@ def _resolve_available_path(path: str) -> str:
170170
candidate = f"{base}_{counter}{ext}"
171171
if not os.path.exists(candidate):
172172
return candidate
173-
counter += 1
173+
counter += 1

‎databusclient/version.py‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
"""Version helpers for databusclient."""
2+
3+
from importlib.metadata import PackageNotFoundError, version
4+
from pathlib import Path
5+
import tomllib
6+
7+
8+
# Source checkouts do not always have current package metadata installed, so
9+
# prefer pyproject.toml locally and fall back to installed metadata for wheels.
10+
def get_version() -> str:
11+
pyproject = Path(__file__).resolve().parent.parent / "pyproject.toml"
12+
if pyproject.exists():
13+
with pyproject.open("rb") as f:
14+
return tomllib.load(f)["tool"]["poetry"]["version"]
15+
16+
try:
17+
return version("databusclient")
18+
except PackageNotFoundError:
19+
return "0.0.0"
20+
21+
22+
__version__ = get_version()

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "databusclient"
3-
version = "0.15.1"
3+
version = "1.0.0"
44
description = "A simple client for submitting, downloading, and deleting data on the DBpedia Databus"
55
authors = ["DBpedia Association"]
66
license = "Apache-2.0 License"

0 commit comments

Comments
 (0)