Skip to content

Instantly share code, notes, and snippets.

@rdemorais
Last active April 21, 2025 14:55
Show Gist options
  • Save rdemorais/783010fa1cc6b35bd715ed0fe36458ea to your computer and use it in GitHub Desktop.
Save rdemorais/783010fa1cc6b35bd715ed0fe36458ea to your computer and use it in GitHub Desktop.
# Architecture
- this is a python module with the followin structure
module_name
-- __init__.py
-- __main__.py
-- arg_parser.py
requirements.txt
- you should always update the arg_parser.py accordingly when creating new parameters to the application.
- You will be asked to create such parameters, so wait the command to do such a thing.
- preffer to use functional programming.
- The entrypoint will be accessed like `python -m module_name --mode [feature]`. Consider updating the __main__.py to create new entrypoints.
- Only create new entrypoints when you are asked to.
- Use for in line for brevety.
- When asked to create a new feature, update the requirements.txt with the proper dependency.
- Consider use the logging module to log the code progress. In the __main__.py, use the following structure:
import logging
logging.basicConfig()
logging.root.setLevel(logging.NOTSET)
ignore_modules_logs = []
- When using import, always start from the full module name like `import my_module.module.name`
- use always 2 spaces to identation
- all folders created under module_name should contain a __init__.py file.
- when importing and using classes from the repository, always import it and use the class as python best practices instructs.
- you should never change the .env, only add or remove when asked.
- when you add a new dependency, make sure to install it using pip install -r requirements.txt
- when you asked to commit, check what is new since the last commit and prepare a proper commit message
- when the user say something related to Pull Requests, do not attempt to create a new branch, use the current branch instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment