Description
Right now, everyone is adding their functions directly into is_one_one.py. This is starting to cause merge conflicts when multiple Pull Requests are open at the same time.
To fix this, we want to shift to a plugin-style modular system where future contributors can just drop their own independent Python files into a dedicated folder without touching our core main file.
Tasks:
- Create a new directory in the root called
methods/.
- Inside the
methods/ directory, create an empty __init__.py file so Python treats it as a package.
- Move one or two existing validation functions out of
is_one_one.py and place them into a new file inside the directory named methods/sample_method.py to show others how it works.
- Update
is_one_one.py to dynamically import and execute all Python files/functions stored inside the methods/ directory automatically.
Target Project Structure:
is-one-one/
├── methods/ <-- [NEW]
│ ├── __init__.py <-- [NEW]
│ └── sample_method.py <-- [NEW]
├── is_one_one.py <-- [MODIFIED to dynamically load files from methods/]
└── (other files...)
Description
Right now, everyone is adding their functions directly into
is_one_one.py. This is starting to cause merge conflicts when multiple Pull Requests are open at the same time.To fix this, we want to shift to a plugin-style modular system where future contributors can just drop their own independent Python files into a dedicated folder without touching our core main file.
Tasks:
methods/.methods/directory, create an empty__init__.pyfile so Python treats it as a package.is_one_one.pyand place them into a new file inside the directory namedmethods/sample_method.pyto show others how it works.is_one_one.pyto dynamically import and execute all Python files/functions stored inside themethods/directory automatically.Target Project Structure: