{"id":50324981,"url":"https://github.com/pathcosmos/dy_gh_watch_and_upload","last_synced_at":"2026-05-29T05:04:28.098Z","repository":{"id":311692083,"uuid":"1044267865","full_name":"pathcosmos/dy_gh_watch_and_upload","owner":"pathcosmos","description":"File monitoring and auto-upload system with GitHub integration","archived":false,"fork":false,"pushed_at":"2025-08-26T00:51:16.000Z","size":133,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-26T02:44:16.199Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pathcosmos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-25T12:35:09.000Z","updated_at":"2025-08-26T00:51:20.000Z","dependencies_parsed_at":"2025-08-26T02:44:23.684Z","dependency_job_id":"31ae6aef-1be3-44d7-96a5-db673c8f5bce","html_url":"https://github.com/pathcosmos/dy_gh_watch_and_upload","commit_stats":null,"previous_names":["pathcosmos/dy_gh_watch_and_upload"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pathcosmos/dy_gh_watch_and_upload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pathcosmos%2Fdy_gh_watch_and_upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pathcosmos%2Fdy_gh_watch_and_upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pathcosmos%2Fdy_gh_watch_and_upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pathcosmos%2Fdy_gh_watch_and_upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pathcosmos","download_url":"https://codeload.github.com/pathcosmos/dy_gh_watch_and_upload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pathcosmos%2Fdy_gh_watch_and_upload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33637486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-29T05:04:14.179Z","updated_at":"2026-05-29T05:04:28.088Z","avatar_url":"https://github.com/pathcosmos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File Monitoring and Auto-Upload System\n\nA Python-based system for monitoring file changes and automatically uploading them.\n\n## Features\n\n- File system monitoring with watchdog\n- Database integration with SQLAlchemy\n- Task scheduling with APScheduler\n- HTTP API communication with requests\n- Configuration management with YAML and environment variables\n- PostgreSQL and SQLite support\n\n## Requirements\n\n- Python 3.11 or higher\n- uv (Python package manager)\n- Git\n\n## Quick Start\n\n### 1. Clone the Repository\n\n```bash\n# Clone the repository\ngit clone \u003crepository-url\u003e\ncd dy-gh-watch-and-upload\n\n# Or if you already have the repository, pull latest changes\ngit pull origin main\n```\n\n### 2. Install uv (if not already installed)\n\n#### On macOS and Linux:\n```bash\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\n#### On Windows:\n```bash\npowershell -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n```\n\n#### Using pip (alternative):\n```bash\npip install uv\n```\n\n#### Verify installation:\n```bash\nuv --version\n```\n\n### 3. Initialize Python Environment with uv\n\n```bash\n# Navigate to project directory\ncd dy-gh-watch-and-upload\n\n# Initialize uv project (if not already initialized)\nuv init --python 3.11\n\n# Install all dependencies\nuv sync\n\n# Install development dependencies (optional)\nuv sync --extra dev\n```\n\n### 4. Activate Virtual Environment\n\n```bash\n# Activate the virtual environment\nsource .venv/bin/activate\n\n# On Windows:\n# .venv\\Scripts\\activate\n\n# Verify activation (you should see (.venv) in your prompt)\nwhich python\n# Should show: /path/to/project/.venv/bin/python\n```\n\n### 5. Verify Installation\n\n```bash\n# Test if all dependencies are working\npython -c \"import watchdog, sqlalchemy, requests, apscheduler; print('✅ All dependencies imported successfully!')\"\n\n# Run tests to ensure everything is working\npytest\n```\n\n## Detailed Setup Instructions\n\n### Prerequisites Check\n\nBefore starting, ensure you have the required tools:\n\n```bash\n# Check Python version (should be 3.11+)\npython --version\n\n# Check if git is available\ngit --version\n\n# Check if uv is available\nuv --version\n```\n\n### Complete Setup Workflow\n\n```bash\n# 1. Clone repository\ngit clone \u003crepository-url\u003e\ncd dy-gh-watch-and-upload\n\n# 2. Initialize uv project\nuv init --python 3.11\n\n# 3. Install dependencies\nuv sync\n\n# 4. Activate environment\nsource .venv/bin/activate\n\n# 5. Verify setup\npython -c \"import sys; print(f'Python: {sys.version}')\"\npython -c \"import watchdog; print(f'Watchdog: {watchdog.__version__}')\"\n```\n\n### Environment Configuration\n\n```bash\n# Copy environment template (if available)\ncp .env.example .env\n\n# Edit environment variables\nnano .env\n# or\ncode .env\n```\n\n### Development Setup\n\nFor developers who want to contribute:\n\n```bash\n# Install with development dependencies\nuv sync --extra dev\n\n# Install pre-commit hooks (if configured)\npre-commit install\n\n# Run linting and formatting\nuv run black src/ tests/\nuv run flake8 src/ tests/\n```\n\n## Troubleshooting\n\n### Common Issues and Solutions\n\n#### 1. Python Version Mismatch\n```bash\n# If you get Python version errors\nuv python install 3.11\nuv sync\n```\n\n#### 2. Permission Issues\n```bash\n# If you get permission errors on Linux/macOS\nsudo chown -R $USER:$USER .venv/\n```\n\n#### 3. Dependency Resolution Failures\n```bash\n# Clear uv cache and retry\nuv cache clean\nuv sync\n```\n\n#### 4. Virtual Environment Issues\n```bash\n# Remove and recreate virtual environment\nrm -rf .venv/\nuv sync\n```\n\n#### 5. Git Submodules (if applicable)\n```bash\n# If the project uses git submodules\ngit submodule update --init --recursive\n```\n\n### Platform-Specific Notes\n\n#### Windows\n- Use PowerShell or Command Prompt\n- Virtual environment activation: `.venv\\Scripts\\activate`\n- Path separators: Use backslashes `\\`\n\n#### macOS\n- Virtual environment activation: `source .venv/bin/activate`\n- If you get SSL errors, you might need to install certificates:\n  ```bash\n  /Applications/Python\\ 3.11/Install\\ Certificates.command\n  ```\n\n#### Linux\n- Virtual environment activation: `source .venv/bin/activate`\n- You might need to install system dependencies:\n  ```bash\n  sudo apt-get install python3-dev build-essential\n  ```\n\n## Project Structure\n\n```\n├── src/                    # Source code\n│   ├── api/               # API endpoints\n│   ├── db/                # Database models and connections\n│   ├── monitor/           # File monitoring logic\n│   ├── services/          # Business logic services\n│   ├── uploader/          # File upload functionality\n│   └── utils/             # Utility functions\n├── config/                 # Configuration files\n├── data/                   # Data storage\n├── logs/                   # Log files\n├── tests/                  # Test files\n├── pyproject.toml          # Project configuration (uv)\n├── uv.lock                 # Dependency lock file\n├── .venv/                  # Virtual environment (uv)\n└── README.md               # This file\n```\n\n## Dependencies\n\n### Core Dependencies\n- `watchdog\u003e=3.0.0` - File system monitoring\n- `SQLAlchemy\u003e=2.0.0` - Database ORM\n- `requests\u003e=2.31.0` - HTTP client\n- `APScheduler\u003e=3.10.0` - Task scheduling\n- `python-dotenv\u003e=1.0.0` - Environment variables\n- `PyYAML\u003e=6.0.0` - YAML parsing\n- `psycopg2-binary\u003e=2.9.0` - PostgreSQL adapter\n- `python-dateutil\u003e=2.8.0` - Date utilities\n- `Pillow\u003e=10.0.0` - Image processing\n\n### Development Dependencies\n- `pytest\u003e=7.4.0` - Testing framework\n- `pytest-mock\u003e=3.11.0` - Mocking for tests\n- `pytest-cov\u003e=4.1.0` - Test coverage\n\n## uv Commands Reference\n\n### Basic Commands\n- `uv sync` - Install all dependencies\n- `uv sync --extra dev` - Install with development dependencies\n- `uv add \u003cpackage\u003e` - Add a new dependency\n- `uv remove \u003cpackage\u003e` - Remove a dependency\n- `uv lock` - Generate/update lock file\n- `uv run \u003ccommand\u003e` - Run command in virtual environment\n\n### Advanced Commands\n- `uv python install 3.11` - Install specific Python version\n- `uv cache clean` - Clean uv cache\n- `uv tree` - Show dependency tree\n- `uv pip compile` - Compile requirements from pyproject.toml\n\n## Usage\n\n### Running the Application\n\n```bash\n# Activate virtual environment\nsource .venv/bin/activate\n\n# Run the main application\npython src/main.py\n\n# Or using uv run\nuv run python src/main.py\n```\n\n### Running Tests\n\n```bash\n# Run all tests\nuv run pytest\n\n# Run with coverage\nuv run pytest --cov=src\n\n# Run specific test file\nuv run pytest tests/test_monitor.py\n```\n\n### Development Workflow\n\n```bash\n# 1. Activate environment\nsource .venv/bin/activate\n\n# 2. Make changes to code\n\n# 3. Run tests\npytest\n\n# 4. Add new dependencies (if needed)\nuv add \u003cpackage-name\u003e\n\n# 5. Update lock file\nuv lock\n\n# 6. Commit changes\ngit add .\ngit commit -m \"Description of changes\"\n```\n\n## Migration from pip/requirements.txt\n\nThis project has been migrated from pip/requirements.txt to uv/pyproject.toml for better dependency management and faster installations.\n\n- **Old workflow**: `pip install -r requirements.txt`\n- **New workflow**: `uv sync`\n\n### Benefits of uv over pip:\n- **Speed**: 10-100x faster dependency resolution\n- **Reliability**: Deterministic builds with lock files\n- **Modern**: Uses pyproject.toml standard\n- **Integration**: Built-in virtual environment management\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature-name`\n3. Set up development environment: `uv sync --extra dev`\n4. Make your changes\n5. Run tests: `pytest`\n6. Commit your changes: `git commit -m \"Add feature\"`\n7. Push to the branch: `git push origin feature-name`\n8. Submit a pull request\n\n## License\n\n[Add your license here]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpathcosmos%2Fdy_gh_watch_and_upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpathcosmos%2Fdy_gh_watch_and_upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpathcosmos%2Fdy_gh_watch_and_upload/lists"}