-
Notifications
You must be signed in to change notification settings - Fork 910
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 settings.py optional #3163
Make settings.py optional #3163
Conversation
@miguel-ortiz-marin Thanks for working on this, I know you haven't opened it up for review yet but make sure your commits are all signed off! Follow the instructions here - https://github.com/kedro-org/kedro/pull/3163/checks?check_run_id=17608910410 |
Signed-off-by: Miguel Ortiz <miguel_ortiz_marin@mckinsey.com>
Signed-off-by: Miguel Ortiz <miguel_ortiz_marin@mckinsey.com>
5726e7b
to
b048ee8
Compare
Hi @ankatiyar nice catch! I had written git commit -S instead of -s haha. I now pushed new commits that are passing(link to ci) the unit tests but the CI is failing nonetheless after updating the branch from main I'm going to mark it ready for review! I'll stay tuned for the comments Thank you! 👻 |
Did a quick manual test and things seem to be working fine and all the tests are passing 🙌🏾 but the code coverage is not complete. Could you look into this @miguel-ortiz-marin? https://github.com/kedro-org/kedro/actions/runs/6486331734/job/17633747121?pr=3163 |
Signed-off-by: Miguel Ortiz <miguel_ortiz_marin@mckinsey.com>
…-marin/kedro into feature/optional_setting_py
@ankatiyar Awesome! I was missing one line in a unit test. It looks now like the test pass in linux but build is failing in windows 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution @miguel-ortiz-marin ! I left one minor comment and also wanted to ask if you can add this change to the release notes. It should go under the next non-breaking release 0.18.14
.
You can ignore the breaking tests on CircleCI. As long as all the tests on Github Actions run everything is fine 😄
kedro/framework/project/__init__.py
Outdated
importlib.import_module(f"{PACKAGE_NAME}.settings") | ||
else: | ||
logger = logging.getLogger(__name__) | ||
logger.warning("No settings.py found, defaults will be used.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion to get nicer logs highlighting:
logger.warning("No settings.py found, defaults will be used.") | |
logger.warning("No 'settings.py' found, defaults will be used.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up! ⭐
Signed-off-by: Miguel Ortiz <miguel_ortiz_marin@mckinsey.com>
Looks like all's set now @astrojuanlu ! Thank you! 🚀 |
Congrats @miguel-ortiz-marin ! 🎉 |
Thankss! This was my first open source contribution !! To many more 🏎️ ! |
* Make settings.py optional Signed-off-by: Miguel Ortiz <miguel_ortiz_marin@mckinsey.com> * Fix unit tests Signed-off-by: Miguel Ortiz <miguel_ortiz_marin@mckinsey.com> * Fix coverage Signed-off-by: Miguel Ortiz <miguel_ortiz_marin@mckinsey.com> * Update RELEASE.md and logging Signed-off-by: Miguel Ortiz <miguel_ortiz_marin@mckinsey.com> --------- Signed-off-by: Miguel Ortiz <miguel_ortiz_marin@mckinsey.com> Co-authored-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com> Signed-off-by: Adam Kells <adamjkells93@gmail.com>
Description
settings.py
optional #3050Development notes
test_settings.py
andframework/project/__init__.py
importlib.util.find_spec
before trying to validate it .test_settings
and included a new test and mockmock_package_name_without_settings_file
andtest_validate_settings_without_settings_file
.pip install -e .
and then ran akedro new --starter=spaceflights
. Then I validated thatkedro run
worked with, and without asettings.py
file.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
RELEASE.md
file