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

remove src from template in favor of <proj_name>/<proj_name> #229

Closed
wants to merge 3 commits into from
Closed

remove src from template in favor of <proj_name>/<proj_name> #229

wants to merge 3 commits into from

Conversation

WaylonWalker
Copy link
Contributor

Description

As mentioned in #208 it is desired to move from a src directory to a <proj_name>/<proj_name> directory. I did a quick test to see if I could get it to work with just a few changes and it appears that most of the project is working. I would definitely take in any further changes/suggestions/tests. Note I did not test all cli commands, and some such as kedro build-docs and kedro docker may need some updates.

Development notes

  1. I moved the contents of the src directory to the {{ cookiecutter.repo_name }} directory.
  2. I added includes to the setup.py.
    - packages=find_packages(exclude=["tests"]),
    + packages=find_packages(include=["{{ cookiecutter.python_package }}", "{{ cookiecutter.python_package }}.*"], exclude=["tests"]),

tested my changes manually

cookiecutter /path/to/template

I called the project default_kedro, then ran some various commands to ensure the project was working as expected.

default_kedro # runs the pipeline
kedro run # runs the pipeline
kedro ipython # loads in catalog and context
%run_viz # starts kedro viz

TODO

[ ] kedro build-docs
[ ] kedro docker

Checklist

  • Read the contributing guidelines
  • 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 and added my name to the list of supporting contributions in the RELEASE.md file
  • Added tests to cover my changes

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

  • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.

  • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.

  • I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

I am submitting this as myself Waylon Walker in my own free time.

default_config.yml was not getting picked up in my tests.  I changed the cookiecutter.json for testing
and inadvertantly commited it.
@yetudada
Copy link
Contributor

yetudada commented Mar 3, 2020

Hey @WaylonWalker! Thanks so much for spending time on this PR, we really appreciate it.
I think if we circle back to this one then we'd like to give users the flexibility to choose if they want src or proj_name. We have discovered that this is quite a well-discussed issue in the Python world. So for now I'll park this PR but thank you so much for raising this.

@yetudada yetudada closed this Mar 3, 2020
@WaylonWalker
Copy link
Contributor Author

That sounds like a fantastic idea, thanks for investigating.

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.

2 participants