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

feat: add query.OUTPUTS to collect outputs status #127

Merged
merged 3 commits into from
Nov 9, 2023

Conversation

xtimmy86x
Copy link
Contributor

Related Issues

Proposed Changes:

Add query.OUTPUTS to collect the status of the outputs in control panel

Testing:

Extra Notes (optional):

Checklist

  • Related issues and proposed changes are filled
  • Tests are defining the correct and expected behavior
  • Code is well-documented via docstrings

@palazzem palazzem self-assigned this Nov 9, 2023
@palazzem palazzem added this to the 0.9.0 milestone Nov 9, 2023
Copy link
Owner

@palazzem palazzem left a comment

Choose a reason for hiding this comment

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

The change is good, but we need to add tests for it. Actually, we don't have tests that are verifying that the method actually returns outputs as it should. You need to add tests and fixtures like these:

In general, for any change, you should:

  1. Update current tests so that they don't fail. In doing this, you must be sure you are not changing the behavior as if you are adding something, the rest of the software should work as before.
  2. Always add new tests. You must not reuse current tests to check new behavior as they were designed to test another behavior. In your case you added what happens if the outputs key is missing (that is good), but it's not enough to be sure it works as expected.
  3. Add a fixture where you actually put a static response to avoid real tests (responses.py)
  4. Update the conftest.py where you actually add the response you generated in (3) to the call you expect in client fixture.

After these changes, I think it should be all set! In the meantime, thank you very much for the help!

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6810659178

  • 10 of 10 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 6627095528: 0.0%
Covered Lines: 358
Relevant Lines: 358

💛 - Coveralls

Copy link
Owner

@palazzem palazzem left a comment

Choose a reason for hiding this comment

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

Great addition! Looks great with the added tests!

@palazzem palazzem merged commit 1d3c4e8 into palazzem:main Nov 9, 2023
3 checks passed
@xtimmy86x xtimmy86x deleted the xtimmy86x/outputs-states branch November 9, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants