Skip to content

Update repo to python 312#88

Merged
amrit110 merged 2 commits intomainfrom
update
Mar 15, 2026
Merged

Update repo to python 312#88
amrit110 merged 2 commits intomainfrom
update

Conversation

@amrit110
Copy link
Copy Markdown
Member

This pull request makes several important updates focused on modernizing the codebase, improving compatibility, and streamlining the documentation build and deployment process. The most significant changes include upgrading the project to Python 3.12, adopting newer Python type hint syntax, refactoring the documentation CI workflows, and making minor code and typing improvements across the codebase.

CI/CD and Documentation Workflow Updates:

  • Consolidated and refactored documentation build and deployment workflows into a single .github/workflows/docs.yml file, replacing the previous separate docs_build.yml and docs_deploy.yml workflows. The new workflow uses standard GitHub-hosted runners, builds documentation with mkdocs, and deploys to GitHub Pages, simplifying the CI process and removing coverage upload steps from the docs workflow. [1] [2] [3]
  • Updated the integration tests workflow to use ubuntu-latest runners instead of self-hosted runners, improving portability and maintainability.

Python Version and Typing Modernization:

  • Upgraded the project to Python 3.12 by updating .python-version, enabling the use of newer language features and type hint syntax.
  • Refactored type hints throughout the codebase to use Python 3.10+ syntax (e.g., list[str] instead of List[str], | None instead of Optional), and removed now-unnecessary imports from typing. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Code Quality and Minor Improvements:

  • Improved error messages and type safety, such as providing clearer error messages for invalid file formats in QueryInterface.save.
  • Added # type: ignore comments in several places in cycquery/omop.py to suppress mypy typing errors for complex assignments. [1] [2] [3] [4] [5]
  • Fixed SQLAlchemy table selection to avoid nested selects by unpacking columns explicitly in cycquery/mimiciv.py. [1] [2] [3]
  • Updated pre-commit configuration: added --unsafe to check-yaml, removed unused nbqa-black hook. [1] [2]

Database Reflection and Connection Handling:

  • Changed metadata reflection in _setup_table_methods to use a context-managed connection, improving reliability and compatibility with SQLAlchemy 2.x.

@amrit110 amrit110 self-assigned this Mar 15, 2026
@amrit110 amrit110 added the enhancement New feature or request label Mar 15, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@amrit110 amrit110 enabled auto-merge (squash) March 15, 2026 01:51
@amrit110 amrit110 disabled auto-merge March 15, 2026 01:52
@amrit110 amrit110 merged commit 9685098 into main Mar 15, 2026
8 checks passed
@amrit110 amrit110 deleted the update branch March 15, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant