Skip to content

Commit

Permalink
Merge pull request #26 from ashishjayamohan/proper-imports
Browse files Browse the repository at this point in the history
Use proper import statements (read inside)
  • Loading branch information
ashishjayamohan committed Sep 23, 2020
2 parents b875586 + e4c64b9 commit 6b52fcb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion scripts/graphing_functions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import matplotlib.pyplot as plt

import basic_functions as bf
import scripts.basic_functions as bf

def graph_frequency_histogram(arr, bar_color='green', title='Graph of Frequencies'):
"""
Expand Down
20 changes: 12 additions & 8 deletions scripts/tests.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
import basic_functions as bf
import graphing_functions as gf
import file_processing_functions as fpf
import vectorization_functions as vf
import matrix_functions as mf
import math_functions as math


def check(real, predicted, function_name):
if str(real) == str(predicted):
print(" ✓ " + function_name + " PASSED")
Expand All @@ -14,6 +6,18 @@ def check(real, predicted, function_name):
print("Recalibrate System")
print("-----------------------------------------")

from os import environ

import scripts.basic_functions as bf
if not hasattr(environ, 'githubaction'):
import scripts.graphing_functions as gf
skip_graphic = False
else:
gf = type('gf_shim', (), {'__getattr__': lambda *_, **__: lambda *_, **__: None })()
skip_graphic = False
import scripts.vectorization_functions as vf
import scripts.matrix_functions as mf
import scripts.math_functions as math

def test_add():
# ADD - Vector functions version
Expand Down
2 changes: 1 addition & 1 deletion scripts/vectorization_functions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import basic_functions as bf
import scripts.basic_functions as bf

def cumulative_sum(arr):
"""
Expand Down

0 comments on commit 6b52fcb

Please sign in to comment.