From f5e6c204703fa2c753e2593a8887470152530c64 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Tue, 1 Jul 2025 15:49:14 +0900 Subject: [PATCH] Rename folders to be PEP compatible --- ReadMe.md | 37 +++++++++++++++++++ pyproject.toml | 4 +- .../__init__.py | 0 .../file_crc.py | 0 .../file_handling.py | 0 .../__init__.py | 0 .../data_search.py | 0 .../dump_data.py | 0 .../fingerprint.py} | 0 .../manage_dict.py | 0 .../__init__.py | 0 .../string_helpers.py | 0 12 files changed, 39 insertions(+), 2 deletions(-) rename src/CoreLibs/{fileHandling => file_handling}/__init__.py (100%) rename src/CoreLibs/{fileHandling => file_handling}/file_crc.py (100%) rename src/CoreLibs/{fileHandling => file_handling}/file_handling.py (100%) rename src/CoreLibs/{listDictHandling => list_dict_handling}/__init__.py (100%) rename src/CoreLibs/{listDictHandling => list_dict_handling}/data_search.py (100%) rename src/CoreLibs/{listDictHandling => list_dict_handling}/dump_data.py (100%) rename src/CoreLibs/{listDictHandling/fingerprinting.py => list_dict_handling/fingerprint.py} (100%) rename src/CoreLibs/{listDictHandling => list_dict_handling}/manage_dict.py (100%) rename src/CoreLibs/{stringHandling => string_handling}/__init__.py (100%) rename src/CoreLibs/{stringHandling => string_handling}/string_helpers.py (100%) diff --git a/ReadMe.md b/ReadMe.md index be75417..671be02 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -9,6 +9,38 @@ This is a pip package that can be installed into any project and covers the foll - dump outputs for data - progress printing +## How to publish + +Have the following setup in `project.toml` + +```toml +[[tool.uv.index]] +name = "egra-gitea" +url = "https://git.egplusww.jp/api/packages/PyPI/pypi/simple/" +publish-url = "https://git.egplusww.jp/api/packages/PyPI/pypi" +explicit = true +``` + +```sh +uv publish --index egra-gitea --token --native-tls +``` + +## Test package + +We must set the full index URL here because we run with "--no-project2 + +```sh +uv run --with corelibs-python --index egra-gitea=https://git.egplusww.jp/api/packages/PyPI/pypi/simple/ --no-project --native-tls -- python -c "import CoreLibs" +``` + +## How to install in another project + +This will also add the index entry + +```sh +uv add corelibs-python --index egra-gitea=https://git.egplusww.jp/api/packages/PyPI/pypi/simple/ --native-tls +``` + ## Python venv setup In the folder where the script will be located @@ -17,3 +49,8 @@ In the folder where the script will be located uv venv --python 3.13 ``` +Install all neded dependencies + +```sh +uv sync +``` diff --git a/pyproject.toml b/pyproject.toml index 9b83a34..3d1699e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ # MARK: Project info [project] name = "corelibs-python" -version = "0.1.0" +version = "0.2.0" description = "Collection of utils for Python scripts" readme = "ReadMe.md" requires-python = ">=3.13" @@ -15,7 +15,7 @@ dependencies = [ # MARK: build target [[tool.uv.index]] name = "egra-gitea" -url = "https://git.egplusww.jp/org/PyPI/dashboard" +url = "https://git.egplusww.jp/api/packages/PyPI/pypi/simple/" publish-url = "https://git.egplusww.jp/api/packages/PyPI/pypi" explicit = true diff --git a/src/CoreLibs/fileHandling/__init__.py b/src/CoreLibs/file_handling/__init__.py similarity index 100% rename from src/CoreLibs/fileHandling/__init__.py rename to src/CoreLibs/file_handling/__init__.py diff --git a/src/CoreLibs/fileHandling/file_crc.py b/src/CoreLibs/file_handling/file_crc.py similarity index 100% rename from src/CoreLibs/fileHandling/file_crc.py rename to src/CoreLibs/file_handling/file_crc.py diff --git a/src/CoreLibs/fileHandling/file_handling.py b/src/CoreLibs/file_handling/file_handling.py similarity index 100% rename from src/CoreLibs/fileHandling/file_handling.py rename to src/CoreLibs/file_handling/file_handling.py diff --git a/src/CoreLibs/listDictHandling/__init__.py b/src/CoreLibs/list_dict_handling/__init__.py similarity index 100% rename from src/CoreLibs/listDictHandling/__init__.py rename to src/CoreLibs/list_dict_handling/__init__.py diff --git a/src/CoreLibs/listDictHandling/data_search.py b/src/CoreLibs/list_dict_handling/data_search.py similarity index 100% rename from src/CoreLibs/listDictHandling/data_search.py rename to src/CoreLibs/list_dict_handling/data_search.py diff --git a/src/CoreLibs/listDictHandling/dump_data.py b/src/CoreLibs/list_dict_handling/dump_data.py similarity index 100% rename from src/CoreLibs/listDictHandling/dump_data.py rename to src/CoreLibs/list_dict_handling/dump_data.py diff --git a/src/CoreLibs/listDictHandling/fingerprinting.py b/src/CoreLibs/list_dict_handling/fingerprint.py similarity index 100% rename from src/CoreLibs/listDictHandling/fingerprinting.py rename to src/CoreLibs/list_dict_handling/fingerprint.py diff --git a/src/CoreLibs/listDictHandling/manage_dict.py b/src/CoreLibs/list_dict_handling/manage_dict.py similarity index 100% rename from src/CoreLibs/listDictHandling/manage_dict.py rename to src/CoreLibs/list_dict_handling/manage_dict.py diff --git a/src/CoreLibs/stringHandling/__init__.py b/src/CoreLibs/string_handling/__init__.py similarity index 100% rename from src/CoreLibs/stringHandling/__init__.py rename to src/CoreLibs/string_handling/__init__.py diff --git a/src/CoreLibs/stringHandling/string_helpers.py b/src/CoreLibs/string_handling/string_helpers.py similarity index 100% rename from src/CoreLibs/stringHandling/string_helpers.py rename to src/CoreLibs/string_handling/string_helpers.py