-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
ciberkids edited this page Mar 20, 2026
·
4 revisions
git clone https://github.com/ciberkids/cloud-drive-sync.git
cd cloud-drive-sync
./dev.sh # Sets up both daemon and UI, starts in demo modeOr manually:
# Daemon
cd daemon
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# UI
cd ui
npm install- Linter: ruff (target: Python 3.12, line length: 100)
- Formatting: ruff format (black-compatible)
- Run:
cd daemon && .venv/bin/ruff check src/ tests/
-
Type checking:
tsc --noEmitin strict mode - Run:
cd ui && npx tsc --noEmit
-
Formatting:
cargo fmt -
Linting:
cargo clippy - Run:
cd ui/src-tauri && cargo fmt && cargo clippy
make lint # Runs ruff + tsccd daemon
source .venv/bin/activate
pytest -v # Run all tests
pytest --cov=gdrive_sync # With coverage
pytest tests/test_planner.py # Run a specific fileTests use pytest-asyncio with asyncio_mode = "auto" (async test functions are detected automatically).
| Test File | Covers |
|---|---|
test_bug_activity_filters.py |
Activity log filtering by pair and event_type normalization |
test_bug_remote_browser.py |
Remote folder browser query filtering |
test_bug_stale_data.py |
Stale pair cleanup on engine startup |
test_bug_status_counts.py |
Accurate files_synced count from DB |
test_bug_sync_trigger.py |
force_sync/pause_sync/resume_sync with pair_id parameter |
test_feature_ignore_hidden.py |
Hidden file filtering in scanner, watcher, and planner |
make lint # Lint Python + TypeScript
make test # Run pytestUse descriptive branch names with a prefix:
-
feat/add-selective-sync— new feature -
fix/conflict-resolution-race— bug fix -
refactor/split-sync-engine— code refactoring -
docs/update-api-reference— documentation -
test/add-executor-tests— test additions
Write clear, imperative commit messages:
Add selective sync filtering by file extension
Support include/exclude glob patterns in sync pair config.
Patterns are evaluated by the planner before generating actions.
Before submitting a PR:
-
make lintpasses (ruff + tsc) -
make testpasses (pytest) - New features include tests
- Documentation is updated if the public API changes
-
Define the method name in
daemon/src/gdrive_sync/ipc/protocol.py -
Add the handler in
daemon/src/gdrive_sync/ipc/handlers.py -
Add the Tauri command in
ui/src-tauri/src/commands.rsand register inmain.rs -
Add the TypeScript client in
ui/src/lib/ipc.ts -
Add types in
ui/src/lib/types.tsif needed -
Write tests in
daemon/tests/for the handler - Document the method in the API Reference
-
Create the component in
ui/src/components/MyPage.tsx -
Add the route in
ui/src/App.tsx -
Add navigation in the
NavBarcomponent inui/src/App.tsx -
Add hooks in
ui/src/lib/hooks.tsif the page needs daemon data - Add styles in the appropriate CSS file
Cloud Drive Sync
Getting Started
Reference
Project