half-orm-dev 0.17.0a12__tar.gz → 0.17.0a13__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.
- {half_orm_dev-0.17.0a12/half_orm_dev.egg-info → half_orm_dev-0.17.0a13}/PKG-INFO +1 -1
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/check.py +19 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/repo.py +62 -0
- half_orm_dev-0.17.0a13/half_orm_dev/version.txt +1 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13/half_orm_dev.egg-info}/PKG-INFO +1 -1
- half_orm_dev-0.17.0a12/half_orm_dev/version.txt +0 -1
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/AUTHORS +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/LICENSE +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/README.md +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/__init__.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/__init__.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/__init__.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/apply.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/clone.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/init.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/new.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/patch.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/release.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/restore.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/sync.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/todo.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/undo.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/update.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/commands/upgrade.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli/main.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/cli_extension.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/database.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/decorators.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/hgit.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/hop.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/manifest.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/modules.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/patch.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/patch_manager.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/patch_validator.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/patches/0/1/0/00_half_orm_meta.database.sql +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/patches/0/1/0/01_alter_half_orm_meta.hop_release.sql +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/patches/0/1/0/02_half_orm_meta.view.hop_penultimate_release.sql +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/patches/log +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/patches/sql/half_orm_meta.sql +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/release_manager.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/.gitignore +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/MANIFEST.in +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/Pipfile +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/README +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/conftest_template +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/git-hooks/pre-commit +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/git-hooks/prepare-commit-msg +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/init_module_template +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/module_template_1 +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/module_template_2 +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/module_template_3 +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/pyproject.toml +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/relation_test +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/sql_adapter +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/warning +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/utils.py +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev.egg-info/SOURCES.txt +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev.egg-info/dependency_links.txt +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev.egg-info/requires.txt +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev.egg-info/top_level.txt +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/pyproject.toml +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/setup.cfg +0 -0
- {half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/setup.py +0 -0
|
@@ -74,6 +74,25 @@ def check(prune_branches: bool, dry_run: bool, verbose: bool) -> None:
|
|
|
74
74
|
|
|
75
75
|
def _display_check_results(result: dict, dry_run: bool, prune_branches: bool, verbose: bool):
|
|
76
76
|
"""Display check results to user."""
|
|
77
|
+
# Version check
|
|
78
|
+
version_info = result.get('version')
|
|
79
|
+
if version_info:
|
|
80
|
+
current = version_info.get('current_version')
|
|
81
|
+
latest = version_info.get('latest_version')
|
|
82
|
+
update_available = version_info.get('update_available', False)
|
|
83
|
+
error = version_info.get('error')
|
|
84
|
+
|
|
85
|
+
if error:
|
|
86
|
+
if verbose:
|
|
87
|
+
click.echo(f"ℹ {utils.Color.blue(f'Version check: {error}')}")
|
|
88
|
+
elif update_available and latest:
|
|
89
|
+
click.echo(f"⚠ {utils.Color.bold(f'half_orm_dev: {current}')} {utils.Color.bold(f'(update available: {latest})')}")
|
|
90
|
+
click.echo(f" Run: {utils.Color.bold('pip install --upgrade half_orm_dev')}")
|
|
91
|
+
click.echo()
|
|
92
|
+
elif current:
|
|
93
|
+
click.echo(f"✓ {utils.Color.green(f'half_orm_dev: {current} (latest)')}")
|
|
94
|
+
click.echo()
|
|
95
|
+
|
|
77
96
|
# Hooks
|
|
78
97
|
hooks = result.get('hooks', {})
|
|
79
98
|
if hooks.get('installed'):
|
|
@@ -676,6 +676,62 @@ class Repo:
|
|
|
676
676
|
'action': overall_action
|
|
677
677
|
}
|
|
678
678
|
|
|
679
|
+
def _check_version_update(self) -> dict:
|
|
680
|
+
"""
|
|
681
|
+
Check if a new version of half_orm_dev is available on PyPI.
|
|
682
|
+
|
|
683
|
+
Returns:
|
|
684
|
+
dict with keys:
|
|
685
|
+
- current_version: Current installed version
|
|
686
|
+
- latest_version: Latest version on PyPI (or None if check failed)
|
|
687
|
+
- update_available: bool - True if update available
|
|
688
|
+
- error: Error message if check failed
|
|
689
|
+
|
|
690
|
+
Examples:
|
|
691
|
+
version_info = repo._check_version_update()
|
|
692
|
+
if version_info['update_available']:
|
|
693
|
+
print(f"Update available: {version_info['latest_version']}")
|
|
694
|
+
"""
|
|
695
|
+
import urllib.request
|
|
696
|
+
import json
|
|
697
|
+
from pathlib import Path
|
|
698
|
+
|
|
699
|
+
result = {
|
|
700
|
+
'current_version': None,
|
|
701
|
+
'latest_version': None,
|
|
702
|
+
'update_available': False,
|
|
703
|
+
'error': None
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
# Get current version from version.txt
|
|
707
|
+
try:
|
|
708
|
+
version_file = Path(__file__).parent / 'version.txt'
|
|
709
|
+
if version_file.exists():
|
|
710
|
+
result['current_version'] = version_file.read_text().strip()
|
|
711
|
+
except Exception as e:
|
|
712
|
+
result['error'] = f"Could not read current version: {e}"
|
|
713
|
+
return result
|
|
714
|
+
|
|
715
|
+
# Check PyPI for latest version
|
|
716
|
+
try:
|
|
717
|
+
url = "https://pypi.org/pypi/half_orm_dev/json"
|
|
718
|
+
with urllib.request.urlopen(url, timeout=5) as response:
|
|
719
|
+
data = json.loads(response.read().decode())
|
|
720
|
+
result['latest_version'] = data['info']['version']
|
|
721
|
+
|
|
722
|
+
# Compare versions
|
|
723
|
+
if result['current_version'] and result['latest_version']:
|
|
724
|
+
# Normalize version for comparison (remove hyphens)
|
|
725
|
+
current_normalized = result['current_version'].replace('-', '')
|
|
726
|
+
latest_normalized = result['latest_version'].replace('-', '')
|
|
727
|
+
if current_normalized != latest_normalized:
|
|
728
|
+
result['update_available'] = True
|
|
729
|
+
|
|
730
|
+
except Exception as e:
|
|
731
|
+
result['error'] = f"Could not check PyPI: {e}"
|
|
732
|
+
|
|
733
|
+
return result
|
|
734
|
+
|
|
679
735
|
def check_and_update(
|
|
680
736
|
self,
|
|
681
737
|
prune_branches: bool = False,
|
|
@@ -850,6 +906,12 @@ class Repo:
|
|
|
850
906
|
else:
|
|
851
907
|
result['branches'] = {}
|
|
852
908
|
|
|
909
|
+
# 3. Check version (only for explicit checks, not silent)
|
|
910
|
+
if not silent:
|
|
911
|
+
result['version'] = self._check_version_update()
|
|
912
|
+
else:
|
|
913
|
+
result['version'] = None
|
|
914
|
+
|
|
853
915
|
# Update cache
|
|
854
916
|
if not dry_run and silent:
|
|
855
917
|
try:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.17.0-a13
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.17.0-a12
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/patches/sql/half_orm_meta.sql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/git-hooks/pre-commit
RENAMED
|
File without changes
|
|
File without changes
|
{half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev/templates/init_module_template
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{half_orm_dev-0.17.0a12 → half_orm_dev-0.17.0a13}/half_orm_dev.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|