Package project and harden local setup#367
Open
Sidharthwin wants to merge 1 commit intofireform-core:mainfrom
Open
Package project and harden local setup#367Sidharthwin wants to merge 1 commit intofireform-core:mainfrom
Sidharthwin wants to merge 1 commit intofireform-core:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #366
Description
This PR improves the local development experience, resolves test execution issues, and introduces proper packaging for the project.
Previously, running the test suite in a clean environment failed due to module resolution errors (
ModuleNotFoundError: api) and required manualPYTHONPATHconfiguration. Additionally, the setup was under-documented, dependencies were tightly coupled, and optional components caused unnecessary failures.This PR addresses these issues by making the project installable, improving dependency management, and ensuring tests run reliably out of the box.
Fixes # (local setup / test execution issue)
Type of change
Changes Made
Packaging and Setup
pyproject.tomlto make the project installablepip install -e .)>=3.11)Dependency Management
Split dependencies into:
requirements-dev.txt(dev + testing)requirements-ai.txt(optional AI dependencies)Removed unnecessary heavy dependencies from core install
Test Reliability
pytest.ini(testpaths = tests)commonforms) in testsEnvironment Fixes
PYTHONPATHusage in Docker and environment configsCode Improvements
commonformsinto optional import with proper error handlingDocumentation
Updated README with:
Updated database setup documentation
How Has This Been Tested?
Test suite runs successfully using:
Verified tests run in a clean virtual environment
Verified tests pass without installing optional AI dependencies
Verified Docker setup works with updated configuration
Test Configuration:
Checklist:
Note on Development Process
While working on this PR, I leveraged AI-assisted tools to explore potential solutions and accelerate debugging. However, I carefully reviewed, tested, and validated all changes to ensure correctness and alignment with the project's architecture.
This process also helped me deepen my understanding of Python packaging, dependency management, and test design.
Additional Notes
This PR significantly improves developer onboarding and reduces friction for contributors by ensuring the project works out of the box without manual configuration.
Future improvements could include further modularization of optional features and CI integration for automated testing.