Skip to content

Commit

Permalink
Merge pull request #26 from naobservatory/simon-remove-mypy
Browse files Browse the repository at this point in the history
Simon remove mypy
  • Loading branch information
simonleandergrimm authored Dec 4, 2023
2 parents 3edc080 + c8be21b commit cf8732f
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 32 deletions.
9 changes: 0 additions & 9 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ if ! ./test.py; then
echo "FAIL: tests"
exit 1
fi

# if this fails with "mypy: command not found" you need to install mypy
# python3 -m pip install mypy
echo Running mypy to check types...
if ! mypy --pretty .; then
echo "FAIL: types"
exit 1
fi

# if this fails with "black: command not found" you need to install black
# python3 -m pip install black
echo Running black to check formatting...
Expand Down
7 changes: 1 addition & 6 deletions figures/composite_fig_5.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env python3

from pathlib import Path
import sys

from pathlib import Path

sys.path.append("..")

Expand Down Expand Up @@ -149,10 +148,8 @@ def plot_three_virus(
viruses: dict[str, tuple[float, float]],
predictor_type: str,
fig_title: str,

axes: list[plt.Axes],
) -> list[plt.Axes]:

final_axes = []
for i, ((pathogen, xlim), ax) in enumerate(zip(viruses.items(), axes)):
plot_violin(
Expand Down Expand Up @@ -259,9 +256,7 @@ def composite_figure(
input_data: pd.DataFrame,
) -> plt.Figure:
fig = plt.figure(

figsize=(7, 10),

)

gs = fig.add_gridspec(2, 3, height_ratios=[7, 7], hspace=0.2)
Expand Down
2 changes: 1 addition & 1 deletion figures/composite_fig_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from dataclasses import dataclass

import matplotlib.pyplot as plt # type: ignore
import numpy as np
from matplotlib.lines import Line2D # type: ignore
from scipy.stats import gmean
import numpy as np

PERCENTILES = [5, 25, 50, 75, 95]

Expand Down
3 changes: 2 additions & 1 deletion preprint_stats/cost_required_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import csv
from dataclasses import dataclass
from scipy.stats import gmean

import numpy as np
from scipy.stats import gmean

PERCENTILES = [5, 25, 50, 75, 95]

Expand Down
13 changes: 6 additions & 7 deletions preprint_stats/family_percentage_stat.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import os
import gzip
import json
import os
import subprocess

import matplotlib.pyplot as plt # type: ignore
from matplotlib.gridspec import GridSpec
import matplotlib.ticker as ticker

import pandas as pd
from scipy.stats import gmean
import numpy as np
from PIL import Image
import pandas as pd
import seaborn as sns

from matplotlib.gridspec import GridSpec
from PIL import Image
from scipy.stats import gmean

dashboard = os.path.expanduser("~/code/mgs-pipeline/dashboard/")

Expand Down
4 changes: 2 additions & 2 deletions preprint_stats/preprint_stats.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
import json
import os
import subprocess

import numpy as np
from scipy.stats import gmean


dashboard = os.path.expanduser("~/code/mgs-pipeline/dashboard/")

with open(os.path.join(dashboard, "human_virus_sample_counts.json")) as inf:
Expand Down
2 changes: 1 addition & 1 deletion preprint_stats/reads_required_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import csv
from dataclasses import dataclass
from scipy.stats import gmean

import numpy as np
from scipy.stats import gmean

PERCENTILES = [5, 25, 50, 75, 95]

Expand Down
5 changes: 3 additions & 2 deletions preprint_stats/rothman_inter_site_comparison.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import csv
from collections import defaultdict
from math import log

import pandas as pd
from scipy.stats import gmean
from math import log
from collections import defaultdict

PERCENTILES = ["5%", "25%", "50%", "75%", "95%"]

Expand Down
5 changes: 3 additions & 2 deletions preprint_stats/spurbeck_inter_site_comparison.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import csv
from collections import defaultdict
from math import log

import pandas as pd
from scipy.stats import gmean
from math import log
from collections import defaultdict

PERCENTILES = ["5%", "25%", "50%", "75%", "95%"]

Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-r requirements.txt
mypy
black
isort
pandas-stubs

0 comments on commit cf8732f

Please sign in to comment.