Skip to content

Commit 0aa434e

Browse files
authored
Merge pull request #24 from dryan/briefcase-console-app
⚠️ v4.4.3: Add breaking change warning to update notifications
2 parents c8495b7 + 4b0401b commit 0aa434e

File tree

4 files changed

+342
-3
lines changed

4 files changed

+342
-3
lines changed

AGENTS.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# AGENTS.md - Development Preferences for d3ploy Briefcase Conversion
2+
3+
This file captures preferences and guidelines for AI agents working on the d3ploy project, specifically for converting it to a Briefcase console application.
4+
5+
## Project Context
6+
7+
- **Current State**: Python CLI tool that syncs files to AWS S3 with multiple environment support
8+
- **Goal**: Convert to standalone Briefcase console app for distribution without dependency management
9+
- **Repository**: <https://github.com/dryan/d3ploy>
10+
11+
## Questions for Project Owner
12+
13+
Please answer the following questions to help guide the development process:
14+
15+
### 1. **Target Platforms & Distribution**
16+
17+
-**Platforms**: All three (macOS, Windows, Linux)
18+
-**Distribution**: GitHub releases + PyPI distribution
19+
-**Architecture requirements**: Intel, ARM, universal binaries?
20+
21+
### 2. **User Experience & Interface**
22+
23+
-**Breaking changes allowed**: Yes, if they make sense
24+
-**New features**: Will be added in future releases after this conversion
25+
-**Interface improvements**: Open to modernizing the CLI experience
26+
27+
### 3. **Configuration & Data**
28+
29+
-**Config files**: Support both `d3ploy.json` and `.d3ploy.json` in project directory
30+
-**App data**: Move cache, logs, temp files to standard app data locations
31+
-**Configuration priority**: CLI flags > environment variables > config file > defaults
32+
33+
### 4. **Dependencies & Bundling**
34+
35+
-**Minimize dependencies**: Replace colorama with first-party code
36+
-**Use Textual**: Use <https://textual.textualize.io/> instead of colorama + tqdm
37+
-**boto3**: Keep for now, replace with custom AWS library in future
38+
-**Final bundle preference**: Textual for modern TUI experience
39+
40+
### 5. **Development & Testing**
41+
42+
-**Unified approach**: Pip package distributes Briefcase binary (like ruff/uv)
43+
-**Single codebase**: One version, different packaging approach
44+
-**Distribution**: PyPI wheels with binaries + GitHub releases
45+
46+
### 6. **Maintenance & Updates**
47+
48+
-**Update source**: Continue using PyPI as version source of truth
49+
-**Update notifications**: Follow Textual interface patterns
50+
-**Breaking changes**: Release patch version warning about upcoming changes
51+
-**Config migration**: Auto-detect and migrate old config versions
52+
-**Config versioning**: Add version property to new config structure
53+
54+
### 7. **Code Organization**
55+
56+
-**Refactoring allowed**: Yes, prioritize maintainability and testability
57+
-**Modular structure**: Break apart large d3ploy.py into focused modules
58+
-**Separation of concerns**: UI, AWS ops, config, file operations in separate modules
59+
-**Briefcase compatibility**: Structure code to work well with Briefcase and Textual
60+
61+
---
62+
63+
## Development Guidelines
64+
65+
Based on the responses above, here are the guidelines for this conversion:
66+
67+
### Architecture & Code Organization
68+
69+
- **Modular design**: Refactor the monolithic `d3ploy.py` into focused modules:
70+
- `config/` - Configuration loading, validation, and migration
71+
- `aws/` - S3 and CloudFront operations (keeping boto3 for now)
72+
- `ui/` - Textual-based interface components
73+
- `sync/` - File synchronization logic
74+
- `core/` - Main application logic and coordination
75+
- **Testability**: Design for easy unit testing of individual components
76+
- **Briefcase structure**: Follow Briefcase app conventions for entry points and packaging
77+
78+
### User Interface & Experience
79+
80+
- **Textual integration**: Replace colorama + tqdm with Textual for modern TUI experience
81+
- **Breaking changes**: Document and implement sensible improvements to CLI
82+
- **Error handling**: Improve error messages and user feedback with Textual's capabilities
83+
- **Progress indication**: Use Textual's rich progress components
84+
85+
### Configuration & Data Management
86+
87+
- **Config files**: Support both `d3ploy.json` and `.d3ploy.json` in project directory
88+
- **Config versioning**: Add `version` property to config structure for migration
89+
- **Auto-migration**: Detect and automatically upgrade old config formats
90+
- **Priority order**: CLI flags > environment variables > config file > defaults
91+
- **App data**: Move cache, logs, temp files to platform-standard app data directories
92+
93+
### Dependencies & Bundling
94+
95+
- **Textual**: Primary UI framework replacing colorama and tqdm
96+
- **boto3**: Keep for now, plan future replacement with custom AWS library
97+
- **Minimize deps**: Replace other dependencies where practical
98+
- **Bundle size**: Optimize for reasonable size while maintaining functionality
99+
100+
### Distribution & Updates
101+
102+
- **Unified approach**: Single codebase, PyPI distributes Briefcase binaries
103+
- **Platform support**: macOS, Windows, Linux binaries
104+
- **GitHub releases**: Direct binary downloads as alternative to PyPI
105+
- **Update checking**: Continue using PyPI as source of truth
106+
- **Breaking change warning**: Release patch version before major changes
107+
108+
### Release Process
109+
110+
- **Semantic versioning**: Continue current approach
111+
- **Git workflow**: Create PR → merge to main → push git tag → GitHub Actions triggers release
112+
- **PyPI automation**: GitHub Actions handles PyPI publishing on tag push
113+
- **Gitmoji**: Always use gitmoji for commit messages
114+
- **Warning release**: Issue patch with breaking change notification
115+
- **Config migration**: Ensure smooth transition for existing users
116+
- **Testing**: Platform-specific testing for binary distributions
117+
- **CI/CD**: Build binaries for all platforms in automated pipeline

ROADMAP.md

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
# D3ploy Briefcase Conversion Roadmap
2+
3+
This roadmap outlines the complete conversion of d3ploy from a traditional Python package to a Briefcase console application with Textual interface.
4+
5+
## Phase 1: Breaking Change Warning Release
6+
7+
### 1.1 Current Version Patch Release
8+
9+
- [x] Update update notification text to warn about upcoming major changes
10+
- [x] Test warning message displays correctly
11+
- [ ] Release patch version (4.4.3) to PyPI
12+
- [ ] Monitor user feedback and questions
13+
- [ ] Document migration timeline and what's changing
14+
15+
### 1.2 User Communication
16+
17+
- [ ] Update GitHub README with migration notice
18+
- [ ] Create GitHub issue/discussion about upcoming changes
19+
- [ ] Provide clear timeline for new version
20+
- [ ] Document what will break and how to prepare
21+
22+
## Phase 2: Project Setup & Foundation
23+
24+
### 2.1 Briefcase Configuration
25+
26+
- [x] Create initial `briefcase.toml` configuration
27+
- [ ] Install Briefcase and verify setup
28+
- [ ] Test basic Briefcase build process
29+
- [ ] Configure platform-specific settings
30+
31+
### 2.2 Dependencies & Environment
32+
33+
- [ ] Add Textual to dependencies
34+
- [ ] Update `pyproject.toml` with new dependency structure
35+
- [ ] Remove colorama and tqdm from requirements
36+
- [ ] Test dependency resolution
37+
38+
### 2.3 Project Structure Planning
39+
40+
- [ ] Design new modular package structure
41+
- [ ] Plan module responsibilities and interfaces
42+
- [ ] Create placeholder modules and **init**.py files
43+
44+
## Phase 2: Code Refactoring & Modularization
45+
46+
### 2.1 Configuration System
47+
48+
- [ ] Create `d3ploy/config/` module
49+
- [ ] Implement config versioning system
50+
- [ ] Add support for both `d3ploy.json` and `.d3ploy.json`
51+
- [ ] Implement environment variable support
52+
- [ ] Create config migration logic for old formats
53+
- [ ] Add priority system: CLI flags > env vars > config file > defaults
54+
55+
### 2.2 AWS Operations Module
56+
57+
- [ ] Create `d3ploy/aws/` module
58+
- [ ] Extract S3 operations from main file
59+
- [ ] Extract CloudFront operations from main file
60+
- [ ] Maintain boto3 compatibility
61+
- [ ] Add proper error handling and retries
62+
63+
### 2.3 File Synchronization Module
64+
65+
- [ ] Create `d3ploy/sync/` module
66+
- [ ] Extract file discovery logic
67+
- [ ] Extract upload/download logic
68+
- [ ] Extract deletion logic
69+
- [ ] Implement pathspec-based filtering
70+
- [ ] Add gitignore support
71+
72+
### 2.4 Core Application Logic
73+
74+
- [ ] Create `d3ploy/core/` module
75+
- [ ] Extract main application coordination logic
76+
- [ ] Implement proper signal handling
77+
- [ ] Add graceful shutdown mechanisms
78+
79+
## Phase 3: Textual Interface Implementation
80+
81+
### 3.1 Basic UI Components
82+
83+
- [ ] Create `d3ploy/ui/` module
84+
- [ ] Design Textual application structure
85+
- [ ] Implement progress bars to replace tqdm
86+
- [ ] Create status display components
87+
- [ ] Add colored output to replace colorama
88+
89+
### 3.2 Interactive Features
90+
91+
- [ ] Implement confirmation dialogs
92+
- [ ] Add real-time progress updates
93+
- [ ] Create error display components
94+
- [ ] Add update notification UI
95+
96+
### 3.3 CLI Integration
97+
98+
- [ ] Maintain command-line argument compatibility
99+
- [ ] Integrate Textual with argparse
100+
- [ ] Implement quiet mode for automated usage
101+
- [ ] Add proper exit codes and error handling
102+
103+
## Phase 4: Data Management & Standards
104+
105+
### 4.1 App Data Directories
106+
107+
- [ ] Implement platform-specific app data paths
108+
- [ ] Move cache files to standard locations
109+
- [ ] Move log files to standard locations
110+
- [ ] Move temporary files to standard locations
111+
- [ ] Maintain backward compatibility for existing users
112+
113+
### 4.2 Update System Enhancement
114+
115+
- [ ] Modify update checker for new architecture
116+
- [ ] Implement Textual-based update notifications
117+
- [ ] Add breaking change warning system
118+
- [ ] Test PyPI version checking
119+
120+
## Phase 5: Testing & Quality Assurance
121+
122+
### 5.1 Unit Testing
123+
124+
- [ ] Create tests for config module
125+
- [ ] Create tests for AWS operations module
126+
- [ ] Create tests for sync module
127+
- [ ] Create tests for core logic
128+
- [ ] Create tests for UI components (where applicable)
129+
- [ ] Ensure 100% test coverage maintenance
130+
131+
### 5.2 Integration Testing
132+
133+
- [ ] Test Briefcase build process
134+
- [ ] Test cross-platform compatibility
135+
- [ ] Test config migration scenarios
136+
- [ ] Test environment variable handling
137+
- [ ] Test real AWS operations (with mocking)
138+
139+
### 5.3 Performance Testing
140+
141+
- [ ] Benchmark new vs old performance
142+
- [ ] Test memory usage of bundled app
143+
- [ ] Test startup time
144+
- [ ] Test large file synchronization
145+
146+
## Phase 6: Briefcase Build & Distribution
147+
148+
### 6.1 Build Configuration
149+
150+
- [ ] Finalize Briefcase configuration for all platforms
151+
- [ ] Configure app icons and metadata
152+
- [ ] Set up code signing (if needed)
153+
- [ ] Test builds on all target platforms
154+
155+
### 6.2 Distribution Setup
156+
157+
- [ ] Configure GitHub Actions for automated builds
158+
- [ ] Set up PyPI wheel distribution with binaries
159+
- [ ] Configure GitHub releases for direct downloads
160+
- [ ] Test installation from both sources
161+
162+
### 6.3 Documentation Updates
163+
164+
- [ ] Update README.md for new installation methods
165+
- [ ] Update configuration documentation
166+
- [ ] Add migration guide from old version
167+
- [ ] Document new features and breaking changes
168+
169+
## Phase 7: Release Preparation
170+
171+
### 7.1 Breaking Change Warning Release
172+
173+
- [ ] Create patch release (e.g., 4.4.3) with breaking change warning
174+
- [ ] Update existing users about upcoming changes
175+
- [ ] Provide timeline for new version release
176+
- [ ] Ensure clear migration path documentation
177+
178+
### 7.2 Final Release
179+
180+
- [ ] Complete all testing and validation
181+
- [ ] Prepare release notes with full changelog
182+
- [ ] Tag new major version release
183+
- [ ] Deploy to PyPI and GitHub releases
184+
- [ ] Monitor for issues and provide support
185+
186+
## Phase 8: Post-Release
187+
188+
### 8.1 User Support
189+
190+
- [ ] Monitor for bug reports
191+
- [ ] Help users with migration issues
192+
- [ ] Address any platform-specific problems
193+
- [ ] Collect feedback for future improvements
194+
195+
### 8.2 Future Planning
196+
197+
- [ ] Plan custom AWS library to replace boto3
198+
- [ ] Evaluate additional Textual features to implement
199+
- [ ] Consider new features for next release
200+
- [ ] Document lessons learned
201+
202+
---
203+
204+
## Current Status: Phase 1.1 - Breaking Change Warning Release
205+
206+
**Next Steps:**
207+
208+
1. Update update notification text with breaking change warning
209+
2. Test the warning message
210+
3. Release patch version 4.4.3 to PyPI
211+
212+
**Blockers:** None currently identified
213+
214+
**Notes:**
215+
216+
- Keep AGENTS.md updated with any preference changes
217+
- Each phase should be tested before moving to the next
218+
- Breaking change warning gives users time to prepare

d3ploy/d3ploy.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from colorama import init as colorama_init
2525
from tqdm import tqdm
2626

27-
VERSION = "4.4.2"
27+
VERSION = "4.4.3"
2828

2929
VALID_ACLS = [
3030
"private",
@@ -183,7 +183,11 @@ def check_for_updates(
183183
f"There has been an update for d3ploy. Version "
184184
f"{pypi_version} is now available.\n"
185185
f"Please see https://github.com/dryan/d3ploy or run "
186-
f"`pip install --upgrade d3ploy`."
186+
f"`pip install --upgrade d3ploy`.\n\n"
187+
f"⚠️ IMPORTANT: A major update with breaking changes is coming soon! ⚠️\n"
188+
f"The next major version will include significant improvements but may\n"
189+
f"require config file updates. Please check the GitHub repository for\n"
190+
f"migration guidance before upgrading to version 5.0+."
187191
),
188192
color=colorama.Fore.YELLOW,
189193
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "d3ploy"
3-
version = "4.4.2"
3+
version = "4.4.3"
44
description = "Easily deploy to S3 with multiple environment support."
55
authors = [
66
{name = "dryan", email = "dryan@users.noreply.github.com"},

0 commit comments

Comments
 (0)