Skip to content

Conversation

@joaquinvanschoren
Copy link
Contributor

What does this PR implement/fix? Explain your changes.

I ran into issues when the openml server config is not exactly 'https://www.openml.org/api/v1/xml', e.g. I had 'https://www.openml.org/api/v1'.
I only noticed when getting a bad dataset url.

This edit makes the API more robust against how exactly the server URL is set in the config.

How should this PR be tested?

set config to:
server=https://www.openml.org/api/v1

And run

d = openml.datasets.get_dataset(1)
d.openml_url

The URL should be correct.

I ran into issues when the openml server config is not exactly 'https://www.openml.org/api/v1/xml', e.g. I had 'https://www.openml.org/api/v1'.
I only noticed when getting a bad dataset url.

This edit makes the API more robust against how exactly the server URL is set in the config.
@joaquinvanschoren
Copy link
Contributor Author

This will also allow adding a version 2 of the API without breaking the URLs.

Copy link
Collaborator

@mfeurer mfeurer left a comment

Choose a reason for hiding this comment

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

I cannot reproduce the original problem, but this change is definitely an improvement.

@mfeurer mfeurer merged commit 861600b into develop Jul 1, 2020
@mfeurer mfeurer deleted the joaquinvanschoren-patch-1 branch July 1, 2020 14:49
mfeurer pushed a commit that referenced this pull request Jul 2, 2020
* Add Flake8 configuration

Uses the configuration from ci_scripts

* Add mypy configuration file

Based on the ci_scripts parameters.

* Pre-commit mypy flake8, add flake8 excludes

Any venv folder does not need flake8.
The example directory got flake8 warnings so I assumed it should be
excluded.

* Add Black to pre-commit

Add ignore E203 as Black will observe PEPs specification for white space
around a colon it is next to an expression.

* Set max line length to 100

* Blacken code

There are a few places where big indentation is introduced that may
warrant refactoring so it looks better.
I did not refactor anything yet, but did exlude three (?) lists (of ids)
to not be formatted.

* Add unit tests to flake8 and mypy pre-commit

* Use pre-commit for flake8, mypy and black checks

This ensures it runs with the same versions and settings as developers.

* Update docs, add 'test' dependencies

Add two other developer dependencies not strictly required for unit
tests, but required for development.
I think the overlap between people who want to execute unit tests and
perform commits is (close to) 100% anyway.

* Uninstall pytest-cov on appveyor ci

It seems to cause an error on import due to a missing sqlite3 dll.
As we don't check coverage anyway, hopefully just uninstalling is
sufficient.

* Add -y to uninstall

* Sphinx issue fix (#923)

* Sphinx issue fix

* Removing comment

* More robust handling of openml_url (#921)

I ran into issues when the openml server config is not exactly 'https://www.openml.org/api/v1/xml', e.g. I had 'https://www.openml.org/api/v1'.
I only noticed when getting a bad dataset url.

This edit makes the API more robust against how exactly the server URL is set in the config.

* format for black artifacts

* Add Flake8 configuration

Uses the configuration from ci_scripts

* Add mypy configuration file

Based on the ci_scripts parameters.

* Pre-commit mypy flake8, add flake8 excludes

Any venv folder does not need flake8.
The example directory got flake8 warnings so I assumed it should be
excluded.

* Add Black to pre-commit

Add ignore E203 as Black will observe PEPs specification for white space
around a colon it is next to an expression.

* Set max line length to 100

* Blacken code

There are a few places where big indentation is introduced that may
warrant refactoring so it looks better.
I did not refactor anything yet, but did exlude three (?) lists (of ids)
to not be formatted.

* Add unit tests to flake8 and mypy pre-commit

* Use pre-commit for flake8, mypy and black checks

This ensures it runs with the same versions and settings as developers.

* Update docs, add 'test' dependencies

Add two other developer dependencies not strictly required for unit
tests, but required for development.
I think the overlap between people who want to execute unit tests and
perform commits is (close to) 100% anyway.

* Uninstall pytest-cov on appveyor ci

It seems to cause an error on import due to a missing sqlite3 dll.
As we don't check coverage anyway, hopefully just uninstalling is
sufficient.

* Add -y to uninstall

* format for black artifacts

Co-authored-by: Neeratyoy Mallik <[email protected]>
Co-authored-by: Joaquin Vanschoren <[email protected]>
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.

3 participants