pytorch-lightning icon indicating copy to clipboard operation
pytorch-lightning copied to clipboard

[App] Moved app.py to root dir for `lightning init app <app_name>` template

Open adam-lightning opened this issue 2 years ago • 1 comments

What does this PR do?

Currently when You init a new app using lightning init app <app_name> the app.py is in the module directory which impacts running app with --cloud flag (as the requirements.txt is in different dir. Here, we move app.py up to achieve the following templated structure:

tree my-app-test
my-app-test
├── LICENSE
├── README.md
├── app.py                     # <--- now here - previously was created inside my_app_test directory 
├── my_app_test
│   ├── __init__.py
│   └── components
│       ├── component_a
│       │   ├── __init__.py
│       │   └── component_a.py
│       └── component_b
│           ├── __init__.py
│           └── component_a.py
├── requirements.txt
├── setup.py
└── tests
    ├── README.md
    ├── __init__.py
    ├── requirements.txt
    └── test_my_app_test_app.py

Fixes issues with running with --cloud flag. And standardises the folder structure.

Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

  • [x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • [x] Did you read the contributor guideline, Pull Request section?
  • [x] Did you make sure your PR does only one thing, instead of bundling different changes together?
  • [x] Did you make sure to update the documentation with your changes? (if necessary)
  • [ ] Did you write any new necessary tests? (not for typos and docs)
  • [x] Did you verify new and existing tests pass locally with your changes?
  • [ ] Did you list all the breaking changes introduced by this pull request?
  • [ ] Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR. Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

  • [x] Is this pull request ready for review? (if not, please submit in draft mode)
  • [ ] Check that all items from Before submitting are resolved
  • [x] Make sure the title is self-explanatory and the description concisely explains the PR
  • [x] Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

cc @borda

adam-lightning avatar Jul 26 '22 13:07 adam-lightning

Adding an entry in the changelog would be nice if you can :)

awaelchli avatar Aug 03 '22 20:08 awaelchli