Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ jobs:
'packages/myfy-core/pyproject.toml',
'packages/myfy-web/pyproject.toml',
'packages/myfy-cli/pyproject.toml',
'packages/myfy-commands/pyproject.toml',
'packages/myfy-data/pyproject.toml',
'packages/myfy-tasks/pyproject.toml',
'packages/myfy-user/pyproject.toml',
'packages/myfy-frontend/pyproject.toml',
'packages/myfy/pyproject.toml'
Expand All @@ -158,7 +160,9 @@ jobs:
'packages/myfy-core/myfy/core/version.py',
'packages/myfy-web/myfy/web/version.py',
'packages/myfy-cli/myfy_cli/version.py',
'packages/myfy-commands/myfy/commands/version.py',
'packages/myfy-data/myfy/data/version.py',
'packages/myfy-tasks/myfy/tasks/version.py',
'packages/myfy-user/myfy/user/version.py',
'packages/myfy-frontend/myfy/frontend/version.py',
'packages/myfy/myfy/version.py'
Expand All @@ -175,7 +179,9 @@ jobs:
dep_files = [
'packages/myfy-web/pyproject.toml',
'packages/myfy-cli/pyproject.toml',
'packages/myfy-commands/pyproject.toml',
'packages/myfy-data/pyproject.toml',
'packages/myfy-tasks/pyproject.toml',
'packages/myfy-user/pyproject.toml',
'packages/myfy-frontend/pyproject.toml',
'packages/myfy/pyproject.toml'
Expand All @@ -194,7 +200,9 @@ jobs:
content = re.sub(r'myfy-core[~=]=?[0-9a-z.]+', f'myfy-core{constraint}', content)
content = re.sub(r'myfy-web[~=]=?[0-9a-z.]+', f'myfy-web{constraint}', content)
content = re.sub(r'myfy-cli[~=]=?[0-9a-z.]+', f'myfy-cli{constraint}', content)
content = re.sub(r'myfy-commands[~=]=?[0-9a-z.]+', f'myfy-commands{constraint}', content)
content = re.sub(r'myfy-data[~=]=?[0-9a-z.]+', f'myfy-data{constraint}', content)
content = re.sub(r'myfy-tasks[~=]=?[0-9a-z.]+', f'myfy-tasks{constraint}', content)
with open(file, 'w') as f:
f.write(content)

Expand Down Expand Up @@ -224,9 +232,15 @@ jobs:
echo "Building myfy-cli..."
uv build --package myfy-cli --out-dir packages/myfy-cli/dist

echo "Building myfy-commands..."
uv build --package myfy-commands --out-dir packages/myfy-commands/dist

echo "Building myfy-data..."
uv build --package myfy-data --out-dir packages/myfy-data/dist

echo "Building myfy-tasks..."
uv build --package myfy-tasks --out-dir packages/myfy-tasks/dist

echo "Building myfy-user..."
uv build --package myfy-user --out-dir packages/myfy-user/dist

Expand All @@ -249,9 +263,15 @@ jobs:
echo -e "\nmyfy-cli:"
ls -lh packages/myfy-cli/dist/

echo -e "\nmyfy-commands:"
ls -lh packages/myfy-commands/dist/

echo -e "\nmyfy-data:"
ls -lh packages/myfy-data/dist/

echo -e "\nmyfy-tasks:"
ls -lh packages/myfy-tasks/dist/

echo -e "\nmyfy-user:"
ls -lh packages/myfy-user/dist/

Expand Down Expand Up @@ -284,7 +304,9 @@ jobs:
echo "- myfy-core $VERSION" >> release_notes.md
echo "- myfy-web $VERSION" >> release_notes.md
echo "- myfy-cli $VERSION" >> release_notes.md
echo "- myfy-commands $VERSION" >> release_notes.md
echo "- myfy-data $VERSION" >> release_notes.md
echo "- myfy-tasks $VERSION" >> release_notes.md
echo "- myfy-user $VERSION" >> release_notes.md
echo "- myfy-frontend $VERSION" >> release_notes.md
echo "- myfy $VERSION" >> release_notes.md
Expand All @@ -302,7 +324,9 @@ jobs:
packages/myfy-core/dist/*
packages/myfy-web/dist/*
packages/myfy-cli/dist/*
packages/myfy-commands/dist/*
packages/myfy-data/dist/*
packages/myfy-tasks/dist/*
packages/myfy-user/dist/*
packages/myfy-frontend/dist/*
packages/myfy/dist/*
Expand All @@ -325,12 +349,24 @@ jobs:
packages-dir: packages/myfy-cli/dist/
verbose: true

- name: Publish myfy-commands to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: packages/myfy-commands/dist/
verbose: true

- name: Publish myfy-data to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: packages/myfy-data/dist/
verbose: true

- name: Publish myfy-tasks to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: packages/myfy-tasks/dist/
verbose: true

- name: Publish myfy-user to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down Expand Up @@ -385,6 +421,24 @@ jobs:
data_version = None
print('myfy-data: not installed (optional)')

# myfy.commands is optional - import if available
try:
import myfy.commands
commands_version = myfy.commands.__version__
print(f'myfy-commands version: {commands_version}')
except ImportError:
commands_version = None
print('myfy-commands: not installed (optional)')

# myfy.tasks is optional - import if available
try:
import myfy.tasks
tasks_version = myfy.tasks.__version__
print(f'myfy-tasks version: {tasks_version}')
except ImportError:
tasks_version = None
print('myfy-tasks: not installed (optional)')

# myfy.user is optional - import if available
try:
import myfy.user
Expand All @@ -402,8 +456,12 @@ jobs:

# Verify all versions match (excluding optional packages that aren't installed)
versions = [myfy.__version__, myfy.core.__version__, myfy.web.__version__, myfy_cli.__version__, myfy.frontend.__version__]
if commands_version:
versions.append(commands_version)
if data_version:
versions.append(data_version)
if tasks_version:
versions.append(tasks_version)
if user_version:
versions.append(user_version)
assert len(set(versions)) == 1, f'Version mismatch: {versions}'
Expand Down
3 changes: 3 additions & 0 deletions packages/myfy-commands/myfy/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ async def import_data(
from .module import CliModule, cli_module
from .registry import CommandRegistry
from .router import CliRouter, cli
from .version import __version__

__all__ = [
# Main API
Expand All @@ -103,4 +104,6 @@ async def import_data(
"CommandExecutionError",
# Module instance for entry points
"cli_module",
# Version
"__version__",
]
3 changes: 3 additions & 0 deletions packages/myfy-commands/myfy/commands/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Version information for myfy-commands package."""

__version__ = "0.1.0"
3 changes: 1 addition & 2 deletions packages/myfy-tasks/myfy/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ async def process_batch(items: list[str], ctx: TaskContext) -> int:
from .registry import TaskRegistry
from .result import TaskResult
from .task import Task
from .version import __version__
from .worker import TaskWorker

__version__ = "0.1.0"

__all__ = [
"ITaskProvider",
"Task",
Expand Down
3 changes: 3 additions & 0 deletions packages/myfy-tasks/myfy/tasks/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Version information for myfy-tasks package."""

__version__ = "0.1.0"
Loading