Skip to content

Conversation

@Chenglong-MS
Copy link
Collaborator

This pull request introduces several improvements to the development experience and codebase consistency for the Data Formulator project. The main changes include adopting the uv tool for Python environment management, updating documentation and devcontainer setup accordingly, and modernizing type hints throughout the Python codebase to use the new PEP 604 syntax (X | None instead of Optional[X]). Additionally, support for Python 3.11 is formalized across the project.

Development Environment & Tooling:

  • Switched the devcontainer image to Python 3.11, added the uv tool as a feature, and updated the postCreateCommand to use uv for dependency management and running the app. Ports 5000 and 5173 are now forwarded by default. (.devcontainer/devcontainer.json, .devcontainer/devcontainer.jsonL4-R21)
  • Added a .python-version file specifying Python 3.11 for environment consistency.
  • Updated local_server.sh and local_server.bat scripts to prefer uv for running the backend if available, falling back to python otherwise. [1] [2]

Documentation Updates:

  • Revised DEVELOPMENT.md to recommend using uv for environment setup and app running, clarified backend/frontend development workflows, and updated instructions for both uv and pip usage. [1] [2] [3] [4]

Codebase Modernization & Consistency:

  • Modernized type hints across multiple modules to use X | None and native collection types (e.g., list[dict[str, Any]]), removing legacy Optional, List, and Dict imports. This affects data loaders, utility modules, and function signatures throughout the codebase. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]
  • Removed the unused OpenAIClientAdapter class from client_utils.py and cleaned up unused imports. [1] [2]
  • Cleaned up unused imports in various files for clarity and maintainability. [1] [2] [3] [4]

These changes collectively streamline local development, improve documentation clarity, and modernize the codebase for better maintainability and type safety.

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.

2 participants