i2mint / wads

Populating, packaging and pip-publishing projects.
Apache License 2.0
0 stars 1 forks source link

Handling Non-Python Dependencies in a Centralized Way #5

Open thorwhalen opened 1 year ago

thorwhalen commented 1 year ago

We need to find a way to handle non-Python dependencies for our Python package in a centralized way so that the instructions of how to install them appear in one place only and can be parsed and reused wherever needed. This would be helpful for automating the installation process and avoiding duplication of instructions.

One possible solution is to create a separate file, such as non_python_dependencies.txt, that lists the non-Python dependencies along with their installation instructions. This file can be placed in the root directory of the project and parsed by different tools as needed. For example, the installation instructions in this file can be used in the following places:

In the "installation" section of the README.md: We can include a link to this file in the README.md, so that users can find instructions on how to install the non-Python dependencies alongside the Python dependencies.

In the "Install dependencies" section of the ci.yml CI configuration file: We can use the instructions in this file to install the non-Python dependencies in the CI environment before running the tests.

In the setup.py file so that the installation can happen automatically: We can include code in the setup.py file that reads the non_python_dependencies.txt file and installs the required dependencies automatically during the installation process.

Pros:

Cons:

(Just to try to be balances -- but to be fair, they should considered, but seem minor.)

Note: An alternative to having a separate non_python_dependencies.txt file would be to include the specification in an existing file (setup.cfg, ci.yml or even README.md) and parse it out from there.

thorwhalen commented 1 year ago

Pushed proposal functions here.

See TODOs.

Integration would then mean: