python-base-toolkit 0.0.8__tar.gz → 0.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. {python_base_toolkit-0.0.8/python_base_toolkit.egg-info → python_base_toolkit-0.0.9}/PKG-INFO +1 -1
  2. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/pyproject.toml +6 -2
  3. python_base_toolkit-0.0.9/python_base_toolkit/ci/task_files/default.yml +14 -0
  4. python_base_toolkit-0.0.9/python_base_toolkit/ci/task_files/dependencies.yml +31 -0
  5. python_base_toolkit-0.0.9/python_base_toolkit/ci/task_files/deploy.yml +28 -0
  6. python_base_toolkit-0.0.9/python_base_toolkit/ci/task_files/docker.yml +64 -0
  7. python_base_toolkit-0.0.9/python_base_toolkit/ci/task_files/install.yml +59 -0
  8. python_base_toolkit-0.0.9/python_base_toolkit/ci/task_files/lint.yml +12 -0
  9. python_base_toolkit-0.0.9/python_base_toolkit/ci/task_files/main.yml +28 -0
  10. python_base_toolkit-0.0.9/python_base_toolkit/ci/task_files/vars.yml +38 -0
  11. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9/python_base_toolkit.egg-info}/PKG-INFO +1 -1
  12. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit.egg-info/SOURCES.txt +9 -0
  13. python_base_toolkit-0.0.9/python_base_toolkit.egg-info/not-zip-safe +1 -0
  14. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/LICENSE +0 -0
  15. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/MANIFEST.in +0 -0
  16. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/README.md +0 -0
  17. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/Taskfile.yml +0 -0
  18. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/__init__.py +0 -0
  19. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/base_structures/__init__.py +0 -0
  20. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/base_structures/base_enum.py +0 -0
  21. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/consts/__init__.py +0 -0
  22. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/consts/operating_system.py +0 -0
  23. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/consts/units/__init__.py +0 -0
  24. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/consts/units/binary_units.py +0 -0
  25. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/consts/units/time_units.py +0 -0
  26. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/decorators/__init__.py +0 -0
  27. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/decorators/telemetry.py +0 -0
  28. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/decorators/timer.py +0 -0
  29. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/instances/__init__.py +0 -0
  30. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/instances/instance_manager.py +0 -0
  31. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/scripts/__init__.py +0 -0
  32. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/scripts/remove_build_files.py +0 -0
  33. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/__init__.py +0 -0
  34. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/data_serialization.py +0 -0
  35. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/date_time.py +0 -0
  36. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/execute.py +0 -0
  37. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/file_utils.py +0 -0
  38. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/generate_id.py +0 -0
  39. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/logo.py +0 -0
  40. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/network.py +0 -0
  41. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/path_utils.py +0 -0
  42. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/pretty_print.py +0 -0
  43. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/pycache.py +0 -0
  44. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/random_utils.py +0 -0
  45. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/shorten_url.py +0 -0
  46. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit/utils/venv_details.py +0 -0
  47. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit.egg-info/dependency_links.txt +0 -0
  48. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit.egg-info/requires.txt +0 -0
  49. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/python_base_toolkit.egg-info/top_level.txt +0 -0
  50. {python_base_toolkit-0.0.8 → python_base_toolkit-0.0.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-base-toolkit
3
- Version: 0.0.8
3
+ Version: 0.0.9
4
4
  Summary: A Python package for managing pytest plugins.
5
5
  Author: Avi Zaguri
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-base-toolkit"
7
- version = "0.0.8"
7
+ version = "0.0.9"
8
8
  description = "A Python package for managing pytest plugins."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -42,10 +42,14 @@ Homepage = "https://github.com/aviz92/python-base-toolkit"
42
42
  Repository = "https://github.com/aviz92/python-base-toolkit"
43
43
  Issues = "https://github.com/aviz92/python-base-toolkit/issues"
44
44
 
45
+ [tool.setuptools]
46
+ include-package-data = true
47
+ zip-safe = false
48
+
45
49
  [tool.setuptools.packages.find]
46
50
  where = ["."]
47
51
  include = ["python_base_toolkit*"]
48
52
  namespaces = false
49
53
 
50
54
  [tool.setuptools.package-data]
51
- ci = ["python_base_toolkit/ci/**/*"]
55
+ python_base_toolkit = ["ci/**/*"]
@@ -0,0 +1,14 @@
1
+ version: "3"
2
+
3
+ tasks:
4
+ default:
5
+ cmds:
6
+ - echo "VENV_SITE_PACKAGES is set to - {{.VENV_SITE_PACKAGES}}"
7
+ - echo "Available tasks:"
8
+ - task --list
9
+
10
+ check_env:
11
+ desc: "Print environment variables"
12
+ cmds:
13
+ - echo "Environment Variables:"
14
+ - env | sort
@@ -0,0 +1,31 @@
1
+ version: "3"
2
+
3
+ tasks:
4
+ pip_update:
5
+ desc: "Update all Python dependencies"
6
+ cmds:
7
+ - echo "Updating Python dependencies..."
8
+ - pip install --upgrade -r requirements.txt
9
+ - echo "Dependencies updated."
10
+
11
+ update_uv:
12
+ desc: "Install or update UV binary"
13
+ cmds:
14
+ - |
15
+ if command -v uv > /dev/null 2>&1; then
16
+ echo "UV is already installed at $(command -v uv), updating..."
17
+ uv update || echo "Automatic update failed. Please update manually."
18
+ else
19
+ echo "UV not found. Pleasing install UV."
20
+ fi
21
+
22
+ poetry_update:
23
+ desc: "Update all Python dependencies using Poetry"
24
+ cmds:
25
+ - |
26
+ if command -v poetry > /dev/null 2>&1; then
27
+ echo "Updating dependencies via Poetry..."
28
+ poetry update
29
+ else
30
+ echo "Poetry is not installed. Please install poetry'"
31
+ fi
@@ -0,0 +1,28 @@
1
+ version: "3"
2
+
3
+ tasks:
4
+ clean:
5
+ desc: "Clean build artifacts"
6
+ cmds:
7
+ - echo "cleaning..."
8
+ - rm -rf dist/
9
+ - rm -rf build/
10
+ - rm -rf *.egg-info
11
+ - echo "cleaned."
12
+
13
+ build:
14
+ desc: "Build the package"
15
+ cmds:
16
+ - echo "building..."
17
+ - task clean
18
+ - twine build .
19
+ - echo "built."
20
+
21
+ deploy:
22
+ desc: "Deploy the package to PyPI"
23
+ cmds:
24
+ - echo "deploying..."
25
+ - task build
26
+ - twine upload dist/*
27
+ - echo "deployed."
28
+ - task clean
@@ -0,0 +1,64 @@
1
+ version: "3"
2
+
3
+ tasks:
4
+ docker_build:
5
+ desc: "Build Docker image for the project"
6
+ params:
7
+ IMAGE_NAME:
8
+ default: "myproject:latest"
9
+ cmds:
10
+ - echo "Building Docker image {{.IMAGE_NAME}}..."
11
+ - docker build -t {{.IMAGE_NAME}} .
12
+ - echo "Docker image built - {{.IMAGE_NAME}}"
13
+
14
+ docker_run:
15
+ desc: "Run Docker container"
16
+ params:
17
+ IMAGE_NAME:
18
+ default: "myproject:latest"
19
+ CONTAINER_NAME:
20
+ default: "myproject_container"
21
+ PORT:
22
+ default: "8000"
23
+ cmds:
24
+ - echo "Running Docker container {{.CONTAINER_NAME}}..."
25
+ - docker run -d --name {{.CONTAINER_NAME}} -p {{.PORT}}:{{.PORT}} {{.IMAGE_NAME}}
26
+ - echo "Container {{.CONTAINER_NAME}} is running on port {{.PORT}}"
27
+
28
+ docker_clean_all:
29
+ desc: "Remove old Docker containers and images"
30
+ cmds:
31
+ - echo "Stopping all running containers..."
32
+ - docker ps -q | xargs -r docker stop
33
+ - echo "Removing all containers..."
34
+ - docker ps -aq | xargs -r docker rm
35
+ - echo "Removing all images..."
36
+ - docker images -q | xargs -r docker rmi
37
+ - echo "Docker cleanup completed."
38
+
39
+ docker_clean_project:
40
+ desc: "Clean Docker resources for a specific project"
41
+ params:
42
+ PROJECT_NAME:
43
+ default: "myapp"
44
+ cmds:
45
+ - echo "Stopping and removing containers for project {{.PROJECT_NAME}}..."
46
+ - docker ps -aq --filter "name={{.PROJECT_NAME}}" | xargs -r docker stop
47
+ - docker ps -aq --filter "name={{.PROJECT_NAME}}" | xargs -r docker rm
48
+ - echo "Removing images for project {{.PROJECT_NAME}}..."
49
+ - docker images {{.PROJECT_NAME}}* -q | xargs -r docker rmi
50
+ - echo "Removing volumes for project {{.PROJECT_NAME}}..."
51
+ - docker volume ls -q --filter "name={{.PROJECT_NAME}}" | xargs -r docker volume rm
52
+ - echo "Project cleanup completed."
53
+
54
+ docker_clean_old:
55
+ desc: "Clean old/inactive Docker containers and images"
56
+ params:
57
+ AGE_HOURS:
58
+ default: "720"
59
+ cmds:
60
+ - echo "Cleaning containers inactive for more than {{.AGE_HOURS}} hours..."
61
+ - docker ps -aq --filter "status=exited" --filter "until={{.AGE_HOURS}}h" | xargs -r docker rm
62
+ - echo "Cleaning images older than {{.AGE_HOURS}} hours..."
63
+ - docker images -q --filter "until={{.AGE_HOURS}}h" | xargs -r docker rmi
64
+ - echo "Old resources cleanup completed."
@@ -0,0 +1,59 @@
1
+ version: "3"
2
+
3
+ tasks:
4
+ uv_bin: # for ci ; command -v uv is the basic command to find uv if exists in PATH
5
+ desc: "Find the path to UV"
6
+ silent: true # do not print the command output unless needed
7
+ cmds:
8
+ - |
9
+ if command -v uv > /dev/null 2>&1; then
10
+ command -v uv
11
+ elif [ -x "$HOME/.local/bin/uv" ]; then
12
+ echo "$HOME/.local/bin/uv"
13
+ elif [ -x "/usr/local/bin/uv" ]; then
14
+ echo "/usr/local/bin/uv"
15
+ else
16
+ echo ""
17
+ fi
18
+
19
+ check_uv:
20
+ desc: "Check if UV is installed"
21
+ cmds:
22
+ - |
23
+ UV_PATH=$(task -s main:install:uv_bin)
24
+ if [ -n "$UV_PATH" ]; then
25
+ echo "UV is installed at: $UV_PATH"
26
+ exit 0 # success
27
+ else
28
+ echo "UV is not installed."
29
+ exit 1 # failure
30
+ fi
31
+
32
+ install_uv:
33
+ desc: "Install UV"
34
+ cmds:
35
+ - echo "Installing UV..."
36
+ - |
37
+ if [ -n "$(task -s main:install:uv_bin)" ]; then
38
+ curl -sSfL https://astral.sh/uv/install.sh | sh
39
+ else
40
+ echo "UV is already installed at $(command -v uv)"
41
+ fi
42
+ - echo "🎉 UV installed."
43
+
44
+ reinstall_uv:
45
+ desc: "Force reinstall UV"
46
+ cmds:
47
+ - echo "🔁 Reinstalling UV..."
48
+ - curl -sSfL https://astral.sh/uv/install.sh | sh
49
+ - echo "🎉 UV reinstalled!"
50
+
51
+ install_dependencies:
52
+ desc: Install all dependencies.
53
+ deps:
54
+ - install-uv
55
+ cmds:
56
+ - task: clean
57
+ - pwd
58
+ - rm uv.lock || true
59
+ - "{{.UV_BIN}} sync"
@@ -0,0 +1,12 @@
1
+ version: "3"
2
+
3
+ tasks:
4
+ pre_commit:
5
+ desc: Pre-commit all files.
6
+ cmds:
7
+ - |
8
+ echo "Running pre-commit hooks on all files..."
9
+ set -a
10
+ source .env
11
+ set +a
12
+ "{{.UV_BIN}}" run pre-commit run --all-files
@@ -0,0 +1,28 @@
1
+ version: "3"
2
+
3
+ vars:
4
+ VENV_SITE_PACKAGES:
5
+ sh: "python -c 'import os, site; print(os.path.abspath(site.getsitepackages()[0]))'"
6
+
7
+
8
+ includes:
9
+ vars: vars.yml
10
+ default: default.yml
11
+ dependencies: dependencies.yml
12
+ deploy: deploy.yml
13
+ docker: docker.yml
14
+ install: install.yml
15
+ lint: lint.yml
16
+
17
+ tasks:
18
+ default:
19
+ cmds:
20
+ - echo "VENV_SITE_PACKAGES is set to - {{.VENV_SITE_PACKAGES}}"
21
+ - echo "Available tasks:"
22
+ - task --list
23
+
24
+ env:
25
+ desc: "Print environment variables"
26
+ cmds:
27
+ - echo "Environment Variables:"
28
+ - env | sort
@@ -0,0 +1,38 @@
1
+ version: "3"
2
+
3
+ vars:
4
+ OS:
5
+ sh: echo {{OS}}
6
+
7
+ UV_BIN: # Dynamically detect uv binary location
8
+ sh: |
9
+ if command -v uv >/dev/null 2>&1; then
10
+ command -v uv
11
+ elif [ -x "/root/.local/bin/uv" ]; then
12
+ echo "/root/.local/bin/uv"
13
+ elif [ -x "$HOME/.local/bin/uv" ]; then
14
+ echo "$HOME/.local/bin/uv"
15
+ else
16
+ echo "/root/.local/bin/uv"
17
+ fi
18
+
19
+ VENV_PYTHON_PATH:
20
+ sh: |
21
+ find "$VIRTUAL_ENV/lib" -maxdepth 1 -type d -name "python*" | head -n1
22
+ DOT_VENV_PYTHON_PATH:
23
+ sh: |
24
+ find "$VIRTUAL_ENV/lib" -maxdepth 1 -type d -name "python*" | head -n1 | sed 's|^.*/\.venv/|.venv/|'
25
+ VENV_SITE_PACKAGES:
26
+ sh: "python -c 'import os, site; print(os.path.abspath(site.getsitepackages()[0]))'"
27
+
28
+ GIT_BRANCH:
29
+ sh: git branch --show-current
30
+ GIT_COMMIT_HASH:
31
+ sh: git rev-parse --short HEAD
32
+
33
+ tasks:
34
+ print-vars:
35
+ desc: "Print all task variables - command: task print-vars --verbose"
36
+ cmds:
37
+ - |
38
+ echo {{.OS}}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-base-toolkit
3
- Version: 0.0.8
3
+ Version: 0.0.9
4
4
  Summary: A Python package for managing pytest plugins.
5
5
  Author: Avi Zaguri
6
6
  License: MIT
@@ -7,10 +7,19 @@ python_base_toolkit/__init__.py
7
7
  python_base_toolkit.egg-info/PKG-INFO
8
8
  python_base_toolkit.egg-info/SOURCES.txt
9
9
  python_base_toolkit.egg-info/dependency_links.txt
10
+ python_base_toolkit.egg-info/not-zip-safe
10
11
  python_base_toolkit.egg-info/requires.txt
11
12
  python_base_toolkit.egg-info/top_level.txt
12
13
  python_base_toolkit/base_structures/__init__.py
13
14
  python_base_toolkit/base_structures/base_enum.py
15
+ python_base_toolkit/ci/task_files/default.yml
16
+ python_base_toolkit/ci/task_files/dependencies.yml
17
+ python_base_toolkit/ci/task_files/deploy.yml
18
+ python_base_toolkit/ci/task_files/docker.yml
19
+ python_base_toolkit/ci/task_files/install.yml
20
+ python_base_toolkit/ci/task_files/lint.yml
21
+ python_base_toolkit/ci/task_files/main.yml
22
+ python_base_toolkit/ci/task_files/vars.yml
14
23
  python_base_toolkit/consts/__init__.py
15
24
  python_base_toolkit/consts/operating_system.py
16
25
  python_base_toolkit/consts/units/__init__.py