Giving this repository some more structure would make using this software much easier for other users.
I would recommend packaging up the software. The standard structure for Python packages is as follows:
my_repo/
├── src/
│ └── my_package/
│ ├── __init__.py
│ ├── first_module.py
│ ├── second_module.py
│ └── subpackage/
│ └── first_subpackage_module.py
├── tests/
│ ├── test_first_module.py
│ ├── test_second_module.py
│ └── subpackage/
│ └── test_first_subpackage_module.py
├── .gitignore
├── LICENSE
├── pyproject.toml
└── README.md
It's sometimes called a "src/package" structure.
The idea is to put all of your modules (python files, not notebooks) into the src/my_package directory. That is now the home for your package. Then your tests go in the tests directory. That keeps everything separate and organised.
You can have other directories for other stuff. Documentation might go in docs, notebooks in nbs, etc.
The last important piece (it's all important really) is the pyproject.toml file, which describes the configuration of the package. As a minimum, you need:
[project]
name = "my_package"
version = "0.0.1"
dependencies = [
"these",
"are",
"my",
"requirements",
]
No need for a requirements.txt file!
With these changes, anyone can clone the repository and install it in the usual way: cd my_repo; python -m pip install ..
Giving this repository some more structure would make using this software much easier for other users.
I would recommend packaging up the software. The standard structure for Python packages is as follows:
It's sometimes called a "src/package" structure.
The idea is to put all of your modules (python files, not notebooks) into the
src/my_packagedirectory. That is now the home for your package. Then your tests go in thetestsdirectory. That keeps everything separate and organised.You can have other directories for other stuff. Documentation might go in
docs, notebooks innbs, etc.The last important piece (it's all important really) is the
pyproject.tomlfile, which describes the configuration of the package. As a minimum, you need:No need for a requirements.txt file!
With these changes, anyone can clone the repository and install it in the usual way:
cd my_repo; python -m pip install ..