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

Make source_dir discoverable for non-src project #3458

Merged
merged 8 commits into from
Jan 8, 2024

Conversation

noklam
Copy link
Contributor

@noklam noklam commented Dec 21, 2023

Description

Fix #2962, surface the default settings in pyproject.toml to make is easier to discover.

The original default is hidden here:

source_dir = Path(metadata_dict.get("source_dir", "src")).expanduser()

Development notes

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

@noklam noklam marked this pull request as ready for review January 3, 2024 16:17
@noklam noklam requested review from SajidAlamQB and AhdraMeraliQB and removed request for astrojuanlu and yetudada January 3, 2024 16:17
@AhdraMeraliQB
Copy link
Contributor

Will this affect ProjectMetadata? Just thinking of the knock-on effects #3426 had when adding example-pipeline to pyproject.toml

@noklam
Copy link
Contributor Author

noklam commented Jan 4, 2024

@AhdraMeraliQB Good question! I don't think this will have an impact. Unlike the new starters/tool situation, source_dir is an old config and the default was always there:

source_dir = Path(metadata_dict.get("source_dir", "src")).expanduser()

The change is merely surface the config in a project

Copy link
Contributor

@AhdraMeraliQB AhdraMeraliQB left a comment

Choose a reason for hiding this comment

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

Looks good! Just one minor comment:

@@ -31,6 +31,8 @@ Every Kedro project comes with a default pre-populated `pyproject.toml` file in
package_name = "package_name"
project_name = "project_name"
kedro_init_version = "kedro_version"
tools = ""
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are including tools here we should probably include example_pipeline as well

@noklam noklam enabled auto-merge (squash) January 8, 2024 15:45
@noklam noklam merged commit 9831e12 into main Jan 8, 2024
36 checks passed
@noklam noklam deleted the noklam/make-source-dir-discoverable-2962 branch January 8, 2024 16:10
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.

Make source_dir discoverable and document how to use this for non-standard project structure
3 participants