-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add black checker to ci * Use black and isort * Shorten line length
- Loading branch information
Showing
39 changed files
with
986 additions
and
590 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: 'v4.3.21' | ||
hooks: | ||
- id: isort | ||
additional_dependencies: ['isort[pyproject]'] | ||
- repo: https://github.com/ambv/black | ||
rev: stable | ||
hooks: | ||
- id: black |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"""Module for handling data transformation and example data.""" | ||
from .disease_loader import load_diseases | ||
from .salmonella_data import * | ||
from .disease_loader import load_diseases |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
import os | ||
import pickle | ||
|
||
from .filter_combination import FilterCombination # pylint: disable=unused-import | ||
|
||
# Needs to be imported because of the pickled object requires it. | ||
|
||
|
||
def load_diseases(path): | ||
disease_pickles = [file for file in os.listdir(path) if os.path.splitext(file)[-1] == '.pickle'] | ||
disease_pickles = [ | ||
file for file in os.listdir(path) if os.path.splitext(file)[-1] == ".pickle" | ||
] | ||
disease_pickles = sorted(disease_pickles) | ||
for disease_pickle in disease_pickles: | ||
yield pickle.load(open(os.path.join(path, disease_pickle), 'rb')) | ||
yield pickle.load(open(os.path.join(path, disease_pickle), "rb")) |
Oops, something went wrong.