Skip to content

Comments

cleanup#32

Merged
usnavy13 merged 9 commits intomainfrom
dev
Jan 13, 2026
Merged

cleanup#32
usnavy13 merged 9 commits intomainfrom
dev

Conversation

@usnavy13
Copy link
Owner

Summary

  • Simplify configuration and authentication middleware
  • Implement file type restrictions for uploads (allowlist/blocklist)
  • Remove deprecated settings (MAX_CPU_QUOTA) and streamline request handling
  • Update project configuration and dependencies
  • Fix Dockerfile and command execution logic
  • Fix mypy errors for SecurityConfig kwargs

Changes (7 commits)

  1. refactor: Simplify configuration and authentication middleware
  2. feat: Implement file type restrictions for uploads
  3. refactor: Remove deprecated settings and streamline request handling
  4. chore: Remove deprecated MAX_CPU_QUOTA and update configuration docs
  5. chore: Update project configuration and dependencies
  6. fix: Update Dockerfile and command execution logic
  7. fix: Remove unused SecurityConfig kwargs for file extensions

Test plan

  • Black formatting check passes
  • Flake8 linting passes (style warnings only, no errors)
  • Mypy type checking passes (no new errors introduced)
  • All 63 unit tests pass

usnavy13 and others added 9 commits January 12, 2026 20:20
- Refactored `Settings` class to delegate Redis URL and API key retrieval to dedicated services.
- Removed deprecated authentication middleware and security headers middleware for cleaner codebase.
- Introduced utility functions for container operations to reduce code duplication in container management.
- Updated container execution logic to enhance readability and maintainability.
- Added validation to restrict file uploads based on allowed file types, raising a 415 error for disallowed types.
- Expanded the list of allowed file extensions in the `Settings` class to include various document, image, and script formats.
- Introduced unit tests to verify the functionality of file type validation and ensure blocked extensions are correctly handled.
- Removed deprecated `max_cpu_quota` and session container reuse settings from the `Settings` class for cleaner configuration.
- Consolidated API key extraction and client IP retrieval into shared utility functions for improved code reuse and maintainability.
- Eliminated unused event classes and methods to reduce code clutter and enhance readability.
- Updated output processing to utilize the new filename sanitization method, ensuring consistent handling of filenames across the application.
…entation

- Removed the deprecated `MAX_CPU_QUOTA` setting from the `.env.example` file.
- Updated the `CONFIGURATION.md` documentation to reflect the change, replacing `MAX_CPU_QUOTA` with `MAX_CPUS` and adjusting its default value.
- Added `pyproject.toml` for pytest configuration with asyncio settings.
- Updated dependencies in `requirements.txt` to newer versions for `uvicorn`, `pydantic-settings`, `httpx`, `redis`, `minio`, `pytest-asyncio`, `structlog`, `Unidecode`, and `locust`.
- Updated GitHub Actions workflow to use the latest version of `setup-python`.
- Updated Dockerfiles for C/C++, Go, and R to use newer base images.
- Changed the Dockerfile ENTRYPOINT to use a temporary directory for GOCACHE instead of a mounted data directory.
- Modified the command in runner.py to limit the search depth when finding files, improving performance and accuracy in file listing.
File extension validation was moved to Settings class but the
security property was still passing these fields to SecurityConfig.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The redis library's ping() method has an ambiguous return type
(Awaitable[bool] | bool) that mypy can't resolve. Added type
ignore comments to suppress these false positives.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Cleanup: Simplify configuration, add file type restrictions, update dependencies
@usnavy13 usnavy13 merged commit d3de570 into main Jan 13, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant