Skip to content

[ENH] V1 → V2 API Migration - core structure - #1576

Merged
PGijsbers merged 225 commits into
openml:mainfrom
geetu040:migration
Mar 23, 2026
Merged

PGijsbers merged 225 commits into
openml:mainfrom
geetu040:migration

Conversation

@geetu040

Copy link
Copy Markdown
Contributor

Towards #1575

This PR sets up the core folder and file structure along with base scaffolding for the API v1 → v2 migration.

It includes:

  • Skeleton for the HTTP client, backend, and API context
  • Abstract resource interfaces and versioned stubs (*V1, *V2)
  • Minimal wiring to allow future version switching and fallback support

No functional endpoints are migrated yet. This PR establishes a stable foundation for subsequent migration and refactor work.

@geetu040 geetu040 mentioned this pull request Dec 30, 2025
16 of 18 tasks
@codecov-commenter

codecov-commenter commented Dec 31, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 51.58850% with 320 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.41%. Comparing base (8a5532f) to head (f926092).

Files with missing lines Patch % Lines
openml/_api/clients/http.py 23.11% 163 Missing ⚠️
openml/_api/resources/base/versions.py 31.16% 53 Missing ⚠️
openml/_api/resources/base/fallback.py 26.31% 28 Missing ⚠️
openml/_api/setup/builder.py 44.44% 25 Missing ⚠️
openml/_api/setup/backend.py 66.66% 19 Missing ⚠️
openml/_api/resources/base/base.py 57.14% 15 Missing ⚠️
openml/_config.py 80.64% 12 Missing ⚠️
openml/cli.py 0.00% 4 Missing ⚠️
openml/_api/clients/minio.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1576      +/-   ##
==========================================
- Coverage   52.73%   52.41%   -0.33%     
==========================================
  Files          37       61      +24     
  Lines        4399     5037     +638     
==========================================
+ Hits         2320     2640     +320     
- Misses       2079     2397     +318     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@geetu040

geetu040 commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor Author

FYI: @JATAYU000 @satvshr @omkar-334 @rohansen856 @EmanAbdelhaleem

Please sync with this PR. The CI tests should now be passing in all the stacked PRs (except some sporadic failures), since now they are using the local docker services created in the CI which provides endpoints for v2-api as well.

You can run these tests locally as well, with the following steps:

Run docker services locally:

git clone --depth 1 https://github.com/openml/services.git
cd ./services        
chmod -R a+rw ./data
chmod -R a+rw ./logs
docker compose --profile rest-api --profile minio --profile evaluation-engine up -d

Run pytest using the local services (add the env var):

OPENML_USE_LOCAL_SERVICES="true" pytest tests/

Comment thread openml/_config.py Resolved
Comment thread openml/_config.py Resolved
@geetu040
geetu040 requested a review from PGijsbers March 17, 2026 14:29

@PGijsbers PGijsbers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🎉

@fkiraly fkiraly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am happy whenever @PGijsbers is happy.

@PGijsbers
PGijsbers merged commit 8185ccc into openml:main Mar 23, 2026
49 of 50 checks passed
PGijsbers added a commit that referenced this pull request Mar 24, 2026
Fixes #1623 
Depends on #1576
Related to #1575

#### Details 
This PR implements `Evaluations` resource, and refactor its existing
functions

---------

Co-authored-by: Satvik Mishra <112589278+satvshr@users.noreply.github.com>
Co-authored-by: geetu040 <raoarmaghanshakir040@gmail.com>
Co-authored-by: Franz Király <fkiraly@gcos.ai>
Co-authored-by: Simon Blanke <simon.blanke@yahoo.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Matthias Feurer <lists@matthiasfeurer.de>
Co-authored-by: Pieter Gijsbers <p.gijsbers@tue.nl>
PGijsbers added a commit that referenced this pull request Mar 25, 2026
Fixes #1593
Depends on #1576
Related to #1575

#### Details 
This PR implements `EvaluationMeasures` resource, and refactor its
existing functions

---------

Co-authored-by: Satvik Mishra <112589278+satvshr@users.noreply.github.com>
Co-authored-by: geetu040 <raoarmaghanshakir040@gmail.com>
Co-authored-by: Franz Király <fkiraly@gcos.ai>
Co-authored-by: Simon Blanke <simon.blanke@yahoo.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Matthias Feurer <lists@matthiasfeurer.de>
Co-authored-by: Pieter Gijsbers <p.gijsbers@tue.nl>
PGijsbers added a commit that referenced this pull request Mar 25, 2026
Fixes #1625 
Depends on #1576
Related to #1575

Details
This PR implements `Setups` resource, and refactor its existing
functions

---------

Co-authored-by: Franz Király <fkiraly@gcos.ai>
Co-authored-by: Satvik Mishra <112589278+satvshr@users.noreply.github.com>
Co-authored-by: geetu040 <raoarmaghanshakir040@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Simon Blanke <simon.blanke@yahoo.com>
Co-authored-by: Matthias Feurer <lists@matthiasfeurer.de>
Co-authored-by: Pieter Gijsbers <p.gijsbers@tue.nl>
PGijsbers added a commit that referenced this pull request Mar 26, 2026
Fixes #1622
Depends on #1576 
Related to: #1575 

#### Details
This PR implements `EstimationProcedures` resource, and refactor its
existing functions

---------

Co-authored-by: Satvik Mishra <112589278+satvshr@users.noreply.github.com>
Co-authored-by: geetu040 <raoarmaghanshakir040@gmail.com>
Co-authored-by: Franz Király <fkiraly@gcos.ai>
Co-authored-by: Simon Blanke <simon.blanke@yahoo.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Matthias Feurer <lists@matthiasfeurer.de>
Co-authored-by: Pieter Gijsbers <p.gijsbers@tue.nl>
PGijsbers added a commit that referenced this pull request May 11, 2026
#### Metadata
* Reference Issue: #1594 (towards #1575)
* New Tests Added: No
* Documentation Updated: No

#### Details 
Stackend PR, Depends on #1576 

This PR adds `Studies v2` migration.

A question:
Due to the pre commit hook i could not put 6 arguments in a function, so
i had to workaround that with this instead:
openml\_api\resources\studies.py (line 10-15)
```py
        limit = kwargs.get("limit")
        offset = kwargs.get("offset")
        status = kwargs.get("status")
        main_entity_type = kwargs.get("main_entity_type")
        uploader = kwargs.get("uploader")
        benchmark_suite = kwargs.get("benchmark_suite")
```

I would like to confirm if this approach is correct or not. Raising a
draft PR for now.

---------

Signed-off-by: rohansen856 <rohansen856@gmail.com>
Co-authored-by: Satvik Mishra <112589278+satvshr@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: geetu040 <raoarmaghanshakir040@gmail.com>
Co-authored-by: Franz Király <fkiraly@gcos.ai>
Co-authored-by: Simon Blanke <simon.blanke@yahoo.com>
Co-authored-by: Matthias Feurer <lists@matthiasfeurer.de>
Co-authored-by: Pieter Gijsbers <p.gijsbers@tue.nl>
PGijsbers added a commit that referenced this pull request Nov 4, 2026
<!--
Thanks for contributing a pull request to the OpenML python connector!
Please ensure you have taken a look at
the contribution guidelines:
https://github.com/openml/openml-python/blob/main/CONTRIBUTING.md#Contributing-Pull-Requests

Please make sure that:

* the title of the pull request is descriptive
* this pull requests is against the `develop` branch
* for any new functionality, consider adding a relevant example
* add unit tests for new functionalities
* collect files uploaded to test server using _mark_entity_for_removal()
* add the BSD 3-Clause license to any new file created
-->

#### Metadata
* Fixes #1592
* Depends on:  #1576

* Change Log Entry:This PR implements Datasets resource, and refactor
its existing functions

---------

Co-authored-by: geetu040 <raoarmaghanshakir040@gmail.com>
Co-authored-by: Satvik Mishra <112589278+satvshr@users.noreply.github.com>
Co-authored-by: Matthias Feurer <lists@matthiasfeurer.de>
Co-authored-by: Pieter Gijsbers <p.gijsbers@tue.nl>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Franz Király <fkiraly@gcos.ai>
PGijsbers added a commit that referenced this pull request Nov 9, 2026
#### Metadata
* Reference Issue: stacks on #1576, fixes #1621
* New Tests Added: No
* Documentation Updated: No

---------

Co-authored-by: geetu040 <raoarmaghanshakir040@gmail.com>
Co-authored-by: PGijsbers <p.gijsbers@tue.nl>
Co-authored-by: Matthias Feurer <lists@matthiasfeurer.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Franz Király <fkiraly@gcos.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants