8000 chore: move pyproject.toml to root by kramaranya · Pull Request #61 · kubeflow/sdk · GitHub
[go: up one dir, main page]

Skip to content

Conversation

kramaranya
Copy link
Contributor

I've moved pyproject.toml to root and updated license path to align with https://peps.python.org/pep-0639/#add-string-value-to-license-key

/assign @andreyvelich @astefanutti @Electronic-Waste @tenzen-y

@coveralls
Copy link
coveralls commented Aug 6, 2025

Pull Request Test Coverage Report for Build 16802473871

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 64.719%

Totals Coverage Status
Change from base Build 16782756657: 0.0%
Covered Lines: 288
Relevant Lines: 445

💛 - Coveralls

pyproject.toml Outdated
[tool.hatch.build.targets]
packages = ["kubeflow"]
[tool.hatch.build.targets.wheel]
sources = ["python"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

packages = ["kubeflow"] worked when pyproject.toml was in the python/ directory because it could find kubeflow/ directly, but after moving pyproject.toml to the root, it would look for kubeflow/ at the root level which doesn't exist.

It works well with sources = ["python"] and python/kubeflow/ gets installed as kubeflow/ in site-packages with correct imports like from kubeflow.trainer import ... instead of from python.kubeflow.trainer import ... that would happen with packages = ["python/kubeflow"].

Alternatively, we could move the source code from python/kubeflow/ to just kubeflow/ at the root and keep using packages = ["kubeflow"].

Copy link
Member

Choose a reason for hiding this comment

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

Let's remove the python directory since it is not required, and keep packages=["kubeflow"]

@kramaranya kramaranya force-pushed the move-pyproject branch 2 times, most recently from 50ee6aa to 7cbfa46 Compare August 7, 2025 06:55
Signed-off-by: kramaranya <kramaranya15@gmail.com>
Signed-off-by: kramaranya <kramaranya15@gmail.com>
Signed-off-by: kramaranya <kramaranya15@gmail.com>
Signed-off-by: kramaranya <kramaranya15@gmail.com>
This reverts commit 06a5bc4.

Signed-off-by: kramaranya <kramaranya15@gmail.com>
Signed-off-by: kramaranya <kramaranya15@gmail.com>
line-length = 100

[tool.ruff.lint]
select = ["E", "F", "W"]
Copy link
Member

Choose a reason for hiding this comment

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

Shall we also move version file to: kubeflow/__init__.py ?

sdk/pyproject.toml

Lines 49 to 50 in 1c115c6

[tool.hatch.version]
path = "kubeflow/trainer/__init__.py"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, that makes sense!

Signed-off-by: kramaranya <kramaranya15@gmail.com>
@kramaranya
Copy link
Contributor Author

I'll also update Trainer and Website repos to use pip install git+https://github.com/kubeflow/sdk.git@main once we merge this PR

@andreyvelich
Copy link
Member

I'll also update Trainer and Website repos to use pip install git+https://github.com/kubeflow/sdk.git@main once we merge this PR

I think, we should also update the Trainer E2Es: https://github.com/kubeflow/trainer/blob/master/.github/workflows/test-e2e.yaml#L44

Copy link
Member
@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Thank you @kramaranya!
/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label Aug 7, 2025
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit b6de5a7 into kubeflow:main Aug 7, 2025
9 checks passed
@google-oss-prow google-oss-prow bot added this to the v0.1 milestone Aug 7, 2025
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.

6 participants
0