Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: import json, networkx | |
In [2]: import matplotlib.pyplot as plt | |
In [3]: with open("test-inventory.json") as f: | |
...: data = json.load(f) | |
...: | |
In [4]: G = networkx.DiGraph() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
from pathlib import Path | |
import re | |
import subprocess | |
changed_files = subprocess.check_output("git diff-tree --no-commit-id --name-status -r HEAD", shell=True) | |
changed_status = [line.split('\t') for line in changed_files.decode('utf-8').rstrip('\n').split('\n')] | |
changed_migrations = {fname for status, fname in changed_status | |
if '/migrations/' in fname and Path(fname).name[0].isdigit() and status != 'D'} |