-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev-fix/Improvements for Local Development Setup and Unit Test Structure #1168
Merged
mhmotamedi
merged 13 commits into
capitalone:dev
from
mhmotamedi:fix/fix_unit_test_locally
Jan 30, 2025
Merged
dev-fix/Improvements for Local Development Setup and Unit Test Structure #1168
mhmotamedi
merged 13 commits into
capitalone:dev
from
mhmotamedi:fix/fix_unit_test_locally
Jan 30, 2025
Conversation
This file contains 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
* fix codeowners * fix codeowners * dash * lower case
update forked dataprofiler with its recent release
* refactor: Upgrade the models to use keras 3.0 (capitalone#1138) * Replace snappy with cramjam (capitalone#1091) * add downloads tile (capitalone#1085) * Replace snappy with cramjam * Delete test_no_snappy --------- Co-authored-by: Taylor Turner <[email protected]> * pre-commit fix (capitalone#1122) * Bug fix for float precision calculation using categorical data with trailing zeros. (capitalone#1125) * Revert "Bug fix for float precision calculation using categorical data with t…" (capitalone#1133) This reverts commit d3159bd. * refactor: move layers outside of class * refactor: update model to keras 3.0 * fix: manifest * fix: bugs in compile and train * fix: bug in load_from_library * fix: bugs in CharCNN * refactor: loading tf model labeler * fix: bug in data_labeler identification * fix: update model to use proper softmax layer names * fix: formatting * fix: remove unused line * refactor: drop support for 3.8 * fix: comments * fix: comment --------- Co-authored-by: Gábor Lipták <[email protected]> Co-authored-by: Taylor Turner <[email protected]> Co-authored-by: James Schadt <[email protected]> * Fix Tox (capitalone#1143) * tox new * update * update * update * update * update * update * update * update tox.ini * update * update * remove docs * empty retrigger * update (capitalone#1146) * bump version * update 3.11 * remove dist/ --------- Co-authored-by: JGSweets <[email protected]> Co-authored-by: Gábor Lipták <[email protected]> Co-authored-by: James Schadt <[email protected]>
* refactor: Upgrade the models to use keras 3.0 (capitalone#1138) * Replace snappy with cramjam (capitalone#1091) * add downloads tile (capitalone#1085) * Replace snappy with cramjam * Delete test_no_snappy --------- * pre-commit fix (capitalone#1122) * Bug fix for float precision calculation using categorical data with trailing zeros. (capitalone#1125) * Revert "Bug fix for float precision calculation using categorical data with t…" (capitalone#1133) This reverts commit d3159bd. * refactor: move layers outside of class * refactor: update model to keras 3.0 * fix: manifest * fix: bugs in compile and train * fix: bug in load_from_library * fix: bugs in CharCNN * refactor: loading tf model labeler * fix: bug in data_labeler identification * fix: update model to use proper softmax layer names * fix: formatting * fix: remove unused line * refactor: drop support for 3.8 * fix: comments * fix: comment --------- * Fix Tox (capitalone#1143) * tox new * update * update * update * update * update * update * update * update tox.ini * update * update * remove docs * empty retrigger * update (capitalone#1146) * Add Python 3.11 to GHA (capitalone#1090) * add downloads tile (capitalone#1085) * Add Python 3.11 to GHA * Replace snappy with cramjam (capitalone#1091) * add downloads tile (capitalone#1085) * Replace snappy with cramjam * Delete test_no_snappy --------- * Update dask modules * Install dask dataframe * Update dask modules in precommit * Correct copy/paste error * Try again to clear Unicode * Rolled back pre-commit dask version * Add py311 to tox * Bump dask to 2024.4.1 * Bump python-snappy 0.7.1 * Rewrite labeler test * Correct isort * Satisfy black * And flake8 * Synced with requirements --------- * [Vuln Fix]: Resolve mend vulnerabilities related to requests. (capitalone#1162) * resolved check-manifest issue * updating keras version pin to <=3.4.0 * adding comment in requirements.txt to trigger mend check --------- --------- Co-authored-by: JGSweets <[email protected]> Co-authored-by: Gábor Lipták <[email protected]> Co-authored-by: Taylor Turner <[email protected]> Co-authored-by: James Schadt <[email protected]> Co-authored-by: Michael Davis <[email protected]>
…, check-manifest, autoflake
mhmotamedi
force-pushed
the
fix/fix_unit_test_locally
branch
from
January 28, 2025 05:38
838e26d
to
05e4559
Compare
armaan-dhillon
approved these changes
Jan 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just left one comment to understand the typing changes
stephenpardy
approved these changes
Jan 29, 2025
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.
PR Description:
Improvements for Local Development Setup and Unit Test Structure
This PR focuses on resolving issues with local environment setup and unit test execution in the dataprofiler library. The changes ensure a more reliable setup process, eliminate dependency conflicts, and enhance the performance and maintainability of unit tests. It also involves fixing Pre-commit Hook Errors.
Changes Introduced
1. Refactored Makefile
Dependency Installation Order: Moved
requirements-ml.txt
earlier in the installation sequence to prevent conflicts with TensorFlow and shared dependencies like NumPy.Fresh Dependency Downloads: Added
--no-cache-dir
topip install
commands to ensure fresh downloads, avoiding issues caused by stale or corrupted cached files.Virtual Environment Isolation: Updated the test command to explicitly use
venv/bin/python
, ensuring tests use the correct Python interpreter and dependencies from the virtual environment.Python Version Check: Introduced a
check-python
target to ensure the specified Python version is3.9, 3.10, or 3.11
. If the Python version does not match, the Makefile exits with a clear error message, improving reliability across environments.Help Section: Added a help target to display all available Makefile commands with descriptions. This makes the development workflow more transparent and easier to understand for new and existing contributors.
2. Refactored Unit Tests
setUpClass
andtearDownClass
, ensuring proper initialization and cleanup of shared resources within each test suite. (dataprofiler/tests/profilers/test_profile_builder.py
anddataprofiler/tests/test_data_profiler.py
)--forked
flag, which can be slow for local runs.3. Fix Pre-commit Hook Errors and Finalize Configurations:
dataprofiler/reports/graphs.py
module to resolve mypy errors raised after upgrade:refactored
dataprofiler/labelers/regex_model.py
module to resolvemypy
errors raised after upgrade:refactored
dataprofiler/profilers/profiler_options.py
module to resolvemypy
errors raised after upgrade:Ran pre-commit hooks (mypy, flake8, check-manifest, etc.) to validate changes across the project files.
Force-pushed updates after resolving errors to ensure all checks pass.
Note: This PR has not fixed the override mypy errors yet. This can be fixed with another PR.
4. Updated version.py
version.py
file to reflect the new changes introduced in this PR.