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

Validate set_config #494

Merged
merged 6 commits into from
Apr 20, 2022
Merged

Validate set_config #494

merged 6 commits into from
Apr 20, 2022

Conversation

fealho
Copy link
Member

@fealho fealho commented Apr 15, 2022

Resolve #478.


sdtypes = config['sdtypes']
transformers = config['transformers']
if sdtypes.keys() != transformers.keys():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if they need to be in the same order. Can we just check that they contain the same elements?

rdt/hyper_transformer.py Outdated Show resolved Hide resolved
rdt/hyper_transformer.py Outdated Show resolved Hide resolved
tests/unit/test_hyper_transformer.py Outdated Show resolved Hide resolved
@fealho fealho requested a review from amontanez24 April 16, 2022 00:39
@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2022

Codecov Report

Merging #494 (c9ce1d0) into v1.0.0.dev (a53c1c9) will not change coverage.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##           v1.0.0.dev      #494   +/-   ##
============================================
  Coverage      100.00%   100.00%           
============================================
  Files              14        14           
  Lines            1239      1253   +14     
============================================
+ Hits             1239      1253   +14     
Impacted Files Coverage Δ
rdt/hyper_transformer.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a53c1c9...c9ce1d0. Read the comment docs.

@fealho fealho changed the title Fix bugs Validate set_config Apr 16, 2022
@fealho fealho marked this pull request as ready for review April 19, 2022 14:23
@fealho fealho requested a review from a team as a code owner April 19, 2022 14:23
Copy link
Contributor

@amontanez24 amontanez24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small comment but otherwise looks good to me!

The method should crash if ``sdytpes`` and ``transformers`` have different of columns.

Input:
- A config with only ``transformers``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't true for this case right?

rdt/hyper_transformer.py Outdated Show resolved Hide resolved
@fealho fealho force-pushed the issue-478-set-config branch from 38bd588 to 209466c Compare April 20, 2022 22:02
Copy link
Contributor

@amontanez24 amontanez24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ready!

@fealho fealho force-pushed the issue-478-set-config branch from d91c28c to c9ce1d0 Compare April 20, 2022 22:40
@fealho fealho merged commit 5aa2619 into v1.0.0.dev Apr 20, 2022
@fealho fealho deleted the issue-478-set-config branch April 20, 2022 23:24
amontanez24 pushed a commit that referenced this pull request Apr 21, 2022
* Fix bugs

* Address feedback

* Includes all errors

* Call validate_transformers in validate_config

* Add validate_sdtypes method

* Rebase
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.

4 participants