Medium syndication information

This commit is contained in:
Brandon Rozek 2023-01-05 14:04:45 -05:00
parent e5a96d735a
commit c5ff5538a6
No known key found for this signature in database
GPG key ID: 26E457DA82C9F480
276 changed files with 371 additions and 80 deletions

View file

@ -1,9 +1,12 @@
---
title: "Quick Python: Check Submodule Load"
date: 2022-12-01T21:12:03-05:00
date: 2022-12-01 21:12:03-05:00
draft: false
tags: ["Python"]
math: false
medium_enabled: true
medium_post_id: 80a6f9baadf4
tags:
- Python
title: 'Quick Python: Check Submodule Load'
---
Reading other people's code is a great way to learn. Recently, I was looking at the `numpy` repository and they had a hidden gem within their `setup.py`. In large scale repositories like `numpy`, we can have different dependencies that we rely upon via *git submodules*. The following function will check to see that these dependencies are loaded and in a "clean" state.
@ -73,4 +76,4 @@ Notice the `+` behind the second submodule. According to the man page for `git s
The existence of the `+` would make this check fail. However, no prefixes will make the check succeed.
By executing this function within the repositories `setup.py`, it verifies that the needed dependencies are checked out and clean before installing the python package. Checks like these make python packages feel a little more stable.
By executing this function within the repositories `setup.py`, it verifies that the needed dependencies are checked out and clean before installing the python package. Checks like these make python packages feel a little more stable.