Skip to content
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

fix: Naming scheme cleanup that includes: renaming ludwig.marshmallow module to ludwig.validation to avoid implicit import errors, and moving ludwig.utils.schema into this new module. #1936

Merged
merged 11 commits into from
Apr 16, 2022

Conversation

ksbrar
Copy link
Collaborator

@ksbrar ksbrar commented Apr 15, 2022

To avoid implicit import aliasing errors and generally clean up usage of 'schema', this PR makes two changes:

  • Moves ludwig.utils.schema into ludwig.marshmallow.
  • Renames ludwig.marshmallow module to ludwig.validation and ludwig.marshmallow.marshmallow_schema_utils to ludwig.validation.schema_utils. The structure of this folder is now the following:
ludwig.validation               <-- Meant to contain all schemas, utilities, helpers related to describing and validating Ludwig configs.
├── generated/                  <-- Contains script-generated files, currently only touched by `extract_schema.py`
├── test_classes.py             <-- Test classes specifically for testing marshmallow fields and schemas.
├── marshmallow_utils.py        <-- An extensive set of marshmallow fields and schemas that are used elsewhere in Ludwig.
├── schema.py                   <-- Contains the fully assembled Ludwig schema and validate function that is used for JSON validation. Users should generally only need to look at this.
└── __init__.py

…schema_utils.py to utils.py (under folder), update all refs.
…schema_utils.py to utils.py (under folder), update all refs.
@ksbrar ksbrar requested a review from w4nderlust April 15, 2022 21:05
@ksbrar ksbrar self-assigned this Apr 15, 2022
@ksbrar ksbrar changed the title fix: Rename ludwig.marshmallow module to avoid impolicit import errors fix: Rename ludwig.marshmallow module to avoid implicit import errors Apr 15, 2022
@github-actions
Copy link

github-actions bot commented Apr 15, 2022

Unit Test Results

       6 files  ±0         6 suites  ±0   1h 27m 43s ⏱️ + 3m 15s
2 744 tests ±0  2 713 ✔️ ±0  31 💤 ±0  0 ±0 
8 232 runs  ±0  8 136 ✔️ ±0  96 💤 ±0  0 ±0 

Results for commit 431b9e3. ± Comparison against base commit b10ea50.

♻️ This comment has been updated with latest results.

@ksbrar ksbrar changed the title fix: Rename ludwig.marshmallow module to avoid implicit import errors fix: Rename ludwig.marshmallow module to ludwig.validation to avoid implicit import errors Apr 15, 2022
@ksbrar ksbrar changed the title fix: Rename ludwig.marshmallow module to ludwig.validation to avoid implicit import errors fix: Rename ludwig.marshmallow module to ludwig.validation to avoid implicit import errors, and move ludwig.utils.schema into it. Apr 15, 2022
@ksbrar ksbrar added bug Something isn't working productivity and code quality Engineer productivity, maintainability, consistency, readability labels Apr 15, 2022
@ksbrar ksbrar changed the title fix: Rename ludwig.marshmallow module to ludwig.validation to avoid implicit import errors, and move ludwig.utils.schema into it. fix: naming scheme cleanup that includes: renaming ludwig.marshmallow module to ludwig.validation to avoid implicit import errors, and moving ludwig.utils.schema into this new module. Apr 15, 2022
@ksbrar ksbrar changed the title fix: naming scheme cleanup that includes: renaming ludwig.marshmallow module to ludwig.validation to avoid implicit import errors, and moving ludwig.utils.schema into this new module. fix: Naming scheme cleanup that includes: renaming ludwig.marshmallow module to ludwig.validation to avoid implicit import errors, and moving ludwig.utils.schema into this new module. Apr 15, 2022
@ksbrar ksbrar merged commit a95f611 into ludwig-ai:master Apr 16, 2022
@ksbrar ksbrar deleted the rename_marshmallow_imports branch April 16, 2022 00:32
tgaddair added a commit that referenced this pull request Apr 16, 2022
…rshmallow` module to `ludwig.validation` to avoid implicit import errors, and moving `ludwig.utils.schema` into this new module. (#1936)"

This reverts commit a95f611.
@ksbrar ksbrar restored the rename_marshmallow_imports branch April 16, 2022 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working productivity and code quality Engineer productivity, maintainability, consistency, readability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant