From 7516d85ff887f321a6109beae27ea39082ace318 Mon Sep 17 00:00:00 2001 From: Dzmitry Pryskoka Date: Sun, 1 Oct 2023 18:34:05 +0300 Subject: [PATCH] Change pypi auth credentials; remove __version__ --- .github/workflows/publish.yml | 4 ++-- README.md | 2 +- src/kataloger/__init__.py | 3 --- src/kataloger/__main__.py | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 964b578..c010788 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,8 +29,8 @@ jobs: - name: Publish package env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} run: twine upload dist/* diff --git a/README.md b/README.md index abaf45d..9a09761 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Cataloger +## Kataloger [![Python version](https://img.shields.io/badge/python-3.11-blue.svg)](https://pypi.python.org/pypi/kataloger) diff --git a/src/kataloger/__init__.py b/src/kataloger/__init__.py index 22b3916..e69de29 100644 --- a/src/kataloger/__init__.py +++ b/src/kataloger/__init__.py @@ -1,3 +0,0 @@ -from importlib.metadata import version - -__version__ = version(__package__ or __name__) diff --git a/src/kataloger/__main__.py b/src/kataloger/__main__.py index 1851b01..0520bd9 100644 --- a/src/kataloger/__main__.py +++ b/src/kataloger/__main__.py @@ -1,11 +1,11 @@ import sys from argparse import ArgumentParser +from importlib.metadata import version from pathlib import Path from typing import Optional import asyncio -from kataloger import __version__ as kataloger_version from kataloger.catalog_updater_builder import CatalogUpdaterBuilder from kataloger.data.kataloger_configuration import KatalogerConfiguration from kataloger.execptions.kataloger_configuration_exception import KatalogerConfigurationException @@ -59,7 +59,7 @@ def parse_arguments() -> KatalogerConfiguration: parser.add_argument( "--version", action="version", - version=f"%(prog)s {kataloger_version}", + version=f"%(prog)s {version(__package__ or __name__)}", ) arguments = parser.parse_args()