mirror of
https://github.com/Brandon-Rozek/website.git
synced 2025-10-10 06:51:13 +00:00
Medium syndication information
This commit is contained in:
parent
e5a96d735a
commit
c5ff5538a6
276 changed files with 371 additions and 80 deletions
|
@ -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.
|
Loading…
Add table
Add a link
Reference in a new issue