From f84ab3ac083bae60e6479916e2d009c19d01e7f5 Mon Sep 17 00:00:00 2001 From: Diego Giorgini Date: Wed, 21 Aug 2024 14:02:45 +0200 Subject: [PATCH 1/2] Convert to pyproject.toml; refactor folder structure --- pydlib/__init__.py | 1 + {src/pydlib => pydlib/src}/dlib.py | 0 pyproject.toml | 22 ++++++++++++++++++---- setup.py | 29 ----------------------------- src/pydlib/__init__.py | 6 ------ 5 files changed, 19 insertions(+), 39 deletions(-) create mode 100644 pydlib/__init__.py rename {src/pydlib => pydlib/src}/dlib.py (100%) delete mode 100644 setup.py delete mode 100644 src/pydlib/__init__.py diff --git a/pydlib/__init__.py b/pydlib/__init__.py new file mode 100644 index 0000000..226dad9 --- /dev/null +++ b/pydlib/__init__.py @@ -0,0 +1 @@ +from .src.dlib import has, get, update, delete diff --git a/src/pydlib/dlib.py b/pydlib/src/dlib.py similarity index 100% rename from src/pydlib/dlib.py rename to pydlib/src/dlib.py diff --git a/pyproject.toml b/pyproject.toml index 374b58c..2f30b9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,20 @@ [build-system] -requires = [ - "setuptools>=42", - "wheel" -] +requires = [ "setuptools>=42", "wheel" ] build-backend = "setuptools.build_meta" + +[project] +name = "pydlib" +authors = [ + { name = "Diego Giorgini, Luigi Di Sotto", email = "diego.giorgini@aitechnologies.it" } +] +description = "The Dictionary Library." +version = "0.3.2" +requires-python = ">=3.7" +dependencies = [ + "flatten-dict" +] +dynamic = ["readme"] + +[tool.setuptools.dynamic] +readme = {file = ["README.md"], content-type = "text/markdown"} + diff --git a/setup.py b/setup.py deleted file mode 100644 index 92bf162..0000000 --- a/setup.py +++ /dev/null @@ -1,29 +0,0 @@ -import setuptools - -with open("README.md", "r", encoding="utf-8") as fh: - long_description = fh.read() - -setuptools.setup( - name="pydlib", # Replace with your own username - version="0.3.1", - author="Luigi Di Sotto, Diego Giorgini", - author_email="l.disotto@gmail.com, diego.giorgini@icloud.com", - description="The Dictionary Library.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/aitechnologies-it/dlib", - project_urls={ - "Bug Tracker": "https://github.com/aitechnologies-it/dlib/issues", - }, - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - ], - package_dir={"": "src"}, - packages=setuptools.find_packages(where="src"), - python_requires=">=3.7", - install_requires=[ - "flatten-dict", - ], -) diff --git a/src/pydlib/__init__.py b/src/pydlib/__init__.py deleted file mode 100644 index 49f2a67..0000000 --- a/src/pydlib/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from .dlib import ( - has, - get, - update, - delete -) \ No newline at end of file From 9cf6d8106358ab903ce362d904a9c9e5fec8efcd Mon Sep 17 00:00:00 2001 From: Diego Giorgini Date: Wed, 21 Aug 2024 14:05:12 +0200 Subject: [PATCH 2/2] cicd: update action versions --- .github/workflows/publish-to-pypi.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yaml b/.github/workflows/publish-to-pypi.yaml index 9133d05..c3184a3 100644 --- a/.github/workflows/publish-to-pypi.yaml +++ b/.github/workflows/publish-to-pypi.yaml @@ -15,11 +15,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Set up Python 3.7 - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + name: Set up Python with: - python-version: "3.7" + python-version: "3.11" - name: Install pypa/build run: >- @@ -41,4 +41,4 @@ jobs: if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master with: - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + password: ${{ secrets.PYPI_API_TOKEN }}