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 provided status before updating trial #399

Merged
merged 1 commit into from
Jun 12, 2020

Conversation

bouthilx
Copy link
Member

Description

With the user interface it is possible that users try to set trials with
invalid status. We should verify the validity of the status before
potentially corrupting the database.

Changes

Add validity checks in storage.set_trial_status to make sure status is valid.

Checklist

Tests

  • I added corresponding tests for bug fixes and new features. If possible, the tests fail without the changes
  • All new and existing tests are passing ($ tox -e py38; replace 38 by your Python version if necessary)

Documentation

  • I have updated the relevant documentation related to my changes

Quality

  • I have read the CONTRIBUTING doc
  • My commits messages follow this format
  • My code follows the style guidelines ($ tox -e lint)

Why:

With the user interface it is possible that users try to set trials with
invalid status. We should verify the validity of the status before
potentially corrupting the database.
@codecov-commenter
Copy link

codecov-commenter commented Jun 12, 2020

Codecov Report

Merging #399 into develop will increase coverage by 0.01%.
The diff coverage is 57.14%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #399      +/-   ##
===========================================
+ Coverage    46.61%   46.62%   +0.01%     
===========================================
  Files           67       67              
  Lines        12754    12768      +14     
  Branches       317      317              
===========================================
+ Hits          5945     5953       +8     
- Misses        6784     6790       +6     
  Partials        25       25              
Impacted Files Coverage Δ
tests/unittests/storage/test_storage.py 17.52% <14.28%> (-0.07%) ⬇️
tests/unittests/client/test_experiment_client.py 58.86% <100.00%> (+0.56%) ⬆️

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 58c4f31...83d7a03. Read the comment docs.

@Thomsch
Copy link
Contributor

Thomsch commented Jun 12, 2020

We should think about progressively renaming stati in statuses (https://www.merriam-webster.com/dictionary/status)

@Thomsch Thomsch merged commit 2b956ec into Epistimio:develop Jun 12, 2020
This was referenced Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants