Skip to content

Commit d98bfe0

Browse files
committed
add support for python modules/packages
1 parent b01cb75 commit d98bfe0

File tree

5 files changed

+25
-19
lines changed

5 files changed

+25
-19
lines changed

pyaction/action_template/{{action_slug}}/pyproject.toml.jinja

+3
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ readme = "README.md"
66
requires-python = ">={{ python_version }}"
77
dependencies = ["pyaction==0.8.1"]
88

9+
[tool.setuptools.packages.find]
10+
exclude = ["test*"]
11+
912
[project.optional-dependencies]
1013
cli = ["pyaction[cli]==0.8.1"]

test_action/glorious/__init__.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
def rainbowfier(string):
2+
colors = [
3+
"\033[91m",
4+
"\033[93m",
5+
"\033[92m",
6+
"\033[94m",
7+
"\033[95m",
8+
"\033[96m",
9+
] # ANSI escape codes for colors
10+
11+
rainbow_string = ""
12+
color_index = 0
13+
14+
for char in string:
15+
rainbow_string += colors[color_index] + char
16+
color_index = (color_index + 1) % len(colors)
17+
18+
return rainbow_string + "\033[0m" # Reset color after the string

test_action/glorious/pattern.py

-18
This file was deleted.

test_action/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from glorious.pattern import rainbowfier
1+
from glorious import rainbowfier
22

33
from pyaction import PyAction
44
from pyaction.workflow import annotations

test_action/pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ readme = "README.md"
66
requires-python = ">=3.12"
77
dependencies = ["pyaction @ git+https://github.com/lnxpy/pyaction#main"]
88

9+
# [tool.setuptools.packages.find]
10+
# exclude = ["test*"]
11+
912
[project.optional-dependencies]
1013
dev = ["pyaction[cli] @ git+https://github.com/lnxpy/pyaction#main"]

0 commit comments

Comments
 (0)