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

Refactor project templates #119

Open
Lancetnik opened this issue Jul 31, 2023 · 2 comments
Open

Refactor project templates #119

Lancetnik opened this issue Jul 31, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Lancetnik
Copy link
Owner

We have a some Issue, relative to imports: #98, #118

Obviously, the project template has a structure not protected from an user imports mistakes. Thus, we need to refactor it to make a directory structure much clear and predictable.

The structure I prefer is:

example/
├── .env
├── .gitignore
├── docker-compose.yaml
├── Dockerfile
├── README.md
├── requirements.txt
├── src/
├───── serve.py
└───── app/
      ├── apps/
      │   ├── __init__.py
      │   └── handlers.py
      ├── config/
      │   ├── __init__.py
      │   └── settings.py
      └── __init__.py

But we can discuss it and make a better one.

@Lancetnik Lancetnik added the enhancement New feature or request label Jul 31, 2023
@maxalbert
Copy link
Contributor

I like the suggestion to tweak the template! Thanks for considering it. :)

Would it make sense to do away with the app/ subfolder and simply have apps/ and config/ as direct children of src/? For example:

example/
├── .env
├── .gitignore
├── Dockerfile
├── README.md
├── docker-compose.yaml
├── requirements.txt
└── src
    ├── apps
    │   ├── __init__.py
    │   └── handlers.py
    ├── config
    │   ├── __init__.py
    │   └── settings.py
    └── serve.py

Or is there something about the intended use case of Propan which would make the presence of the extra app/ folder useful and/or necessary?

@Lancetnik
Copy link
Owner Author

@maxalbert this is how the current template looks like and some users are trying to create additional .py files in the serve.py level and import them relative way. So, I think, we need to separate the serve.py (application entry point) from the main sources directory to point that this script should be the one on it's level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants