Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

2 add unittests #5

Merged
merged 24 commits into from
Jan 17, 2023
Merged

2 add unittests #5

merged 24 commits into from
Jan 17, 2023

Conversation

josvandervelde
Copy link
Collaborator

My first OpenML PR!

  • Unittests added
  • Changed the main file to make mocking possible
  • Some formatting changes (such as README, not much has actually changed)
  • Convenience scripts added in a scripts dir (I always like this. Downside: should be updated alongside the README)
  • While testing I also tested the error handling, and made some functional changes there, so that a response is given with a 400/500-range response code. Previously, some errors were ignored (e.g. duplicate entries) or a 200-response with an error in the body was returned.
  • No other functional changes (except error handling)
  • 2 TODOs added, preferable removed before merging (to discuss)

@josvandervelde josvandervelde linked an issue Jan 13, 2023 that may be closed by this pull request
Copy link
Member

@PGijsbers PGijsbers left a comment

Choose a reason for hiding this comment

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

re: formatting

Because this is now a 2+ people repo (and because now there is time), it probably makes sense to set up some shared formatting configuration for the project. This avoids excessive diffs in the future. I'd suggest black and add a pre-commit hook, but I'm open to other alternatives :). See e.g., openml-python's pre-commit (though I think it would be better if we move the tool configuration itself to a pyproject.toml file).

scripts/run_apiserver.sh Outdated Show resolved Hide resolved
scripts/run_mysql_server.sh Outdated Show resolved Hide resolved
src/connectors/openml.py Outdated Show resolved Hide resolved
src/tests/test_get_dataset_openml.py Outdated Show resolved Hide resolved
src/tests/test_get_dataset_openml.py Outdated Show resolved Hide resolved
src/tests/test_get_publication.py Outdated Show resolved Hide resolved
src/tests/test_get_publication.py Show resolved Hide resolved
src/tests/test_get_publications.py Outdated Show resolved Hide resolved
src/tests/test_post_register_dataset.py Outdated Show resolved Hide resolved
src/tests/test_post_register_dataset.py Outdated Show resolved Hide resolved
Copy link
Member

@PGijsbers PGijsbers left a comment

Choose a reason for hiding this comment

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

🎉

@josvandervelde josvandervelde merged commit 0fe662d into main Jan 17, 2023
@josvandervelde josvandervelde deleted the 2-add-unittests branch January 17, 2023 16:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Unittests
2 participants