diff --git a/biobb_dna/backbone/bipopulations.py b/biobb_dna/backbone/bipopulations.py index 54814df7..9372f6ad 100755 --- a/biobb_dna/backbone/bipopulations.py +++ b/biobb_dna/backbone/bipopulations.py @@ -2,6 +2,7 @@ """Module containing the BIPopulations class and the command line interface.""" import argparse +from typing import Optional import matplotlib.pyplot as plt import pandas as pd @@ -183,7 +184,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -233,7 +234,7 @@ def bipopulations( input_epsilC_path: str, input_epsilW_path: str, input_zetaC_path: str, input_zetaW_path: str, output_csv_path: str, output_jpg_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`BIPopulations ` class and execute the: meth: `launch() ` method. """ diff --git a/biobb_dna/backbone/canonicalag.py b/biobb_dna/backbone/canonicalag.py index 8e7a8e01..bd84e494 100755 --- a/biobb_dna/backbone/canonicalag.py +++ b/biobb_dna/backbone/canonicalag.py @@ -2,6 +2,7 @@ """Module containing the CanonicalAG class and the command line interface.""" import argparse +from typing import Optional import matplotlib.pyplot as plt import pandas as pd @@ -185,7 +186,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -241,7 +242,7 @@ def canonicalag( input_alphaC_path: str, input_alphaW_path: str, input_gammaC_path: str, input_gammaW_path: str, output_csv_path: str, output_jpg_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`CanonicalAG ` class and execute the: meth: `launch() ` method. """ diff --git a/biobb_dna/backbone/puckering.py b/biobb_dna/backbone/puckering.py index ac4973e3..3fa24251 100755 --- a/biobb_dna/backbone/puckering.py +++ b/biobb_dna/backbone/puckering.py @@ -2,6 +2,7 @@ """Module containing the Puckering class and the command line interface.""" import argparse +from typing import Optional import matplotlib.pyplot as plt import pandas as pd @@ -183,7 +184,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -235,7 +236,7 @@ def fix_angles(self, dataset): def puckering( input_phaseC_path: str, input_phaseW_path: str, output_csv_path: str, output_jpg_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Puckering ` class and execute the: meth: `launch() ` method. """ diff --git a/biobb_dna/curvesplus/biobb_canal.py b/biobb_dna/curvesplus/biobb_canal.py index 58e1ecb3..e139252a 100755 --- a/biobb_dna/curvesplus/biobb_canal.py +++ b/biobb_dna/curvesplus/biobb_canal.py @@ -4,6 +4,7 @@ import os import zipfile import argparse +from typing import Optional from pathlib import Path from biobb_common.generic.biobb_object import BiobbObject @@ -185,7 +186,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -197,8 +198,8 @@ def launch(self) -> int: def biobb_canal( input_cda_file: str, output_zip_path: str, - input_lis_file: str = None, - properties: dict = None, + input_lis_file: Optional[str] = None, + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Canal ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/curvesplus/biobb_canion.py b/biobb_dna/curvesplus/biobb_canion.py index 917e5e43..90dd256a 100755 --- a/biobb_dna/curvesplus/biobb_canion.py +++ b/biobb_dna/curvesplus/biobb_canion.py @@ -4,6 +4,7 @@ import os import zipfile import argparse +from typing import Optional from pathlib import Path from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings @@ -196,7 +197,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -207,7 +208,7 @@ def launch(self) -> int: def biobb_canion( input_cdi_path: str, input_afr_path: str, input_avg_struc_path: str, - output_zip_path: str = None, properties: dict = None, **kwargs) -> int: + output_zip_path: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Canion ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/curvesplus/biobb_curves.py b/biobb_dna/curvesplus/biobb_curves.py index 780b619a..d48e609c 100755 --- a/biobb_dna/curvesplus/biobb_curves.py +++ b/biobb_dna/curvesplus/biobb_curves.py @@ -4,6 +4,7 @@ import os import zipfile import argparse +from typing import Optional import shutil from pathlib import Path from biobb_common.generic.biobb_object import BiobbObject @@ -243,7 +244,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -254,8 +255,8 @@ def launch(self) -> int: def biobb_curves( input_struc_path: str, output_lis_path: str, output_cda_path: str, - input_top_path: str = None, output_zip_path: str = None, - properties: dict = None, **kwargs) -> int: + input_top_path: Optional[str] = None, output_zip_path: Optional[str] = None, + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Curves ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/curvesplus/canal_unzip.py b/biobb_dna/curvesplus/canal_unzip.py index 102bcc36..4747370f 100755 --- a/biobb_dna/curvesplus/canal_unzip.py +++ b/biobb_dna/curvesplus/canal_unzip.py @@ -5,6 +5,7 @@ import zipfile import shutil import argparse +from typing import Optional from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings @@ -171,7 +172,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -183,8 +184,8 @@ def launch(self) -> int: def canal_unzip( input_zip_file: str, output_path: str, - output_list_path: str = None, - properties: dict = None, + output_list_path: Optional[str] = None, + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`CanalUnzip ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/dna/dna_averages.py b/biobb_dna/dna/dna_averages.py index 0ad1d0ce..6d01409d 100755 --- a/biobb_dna/dna/dna_averages.py +++ b/biobb_dna/dna/dna_averages.py @@ -2,6 +2,7 @@ """Module containing the HelParAverages class and the command line interface.""" import argparse +from typing import Optional from pathlib import Path import matplotlib.pyplot as plt @@ -205,7 +206,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -216,7 +217,7 @@ def launch(self) -> int: def dna_averages( input_ser_path: str, output_csv_path: str, output_jpg_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`HelParAverages ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/dna/dna_bimodality.py b/biobb_dna/dna/dna_bimodality.py index 4b76d2f8..78ba26b6 100755 --- a/biobb_dna/dna/dna_bimodality.py +++ b/biobb_dna/dna/dna_bimodality.py @@ -4,6 +4,7 @@ import os import zipfile import argparse +from typing import Optional from pathlib import Path import pandas as pd @@ -231,7 +232,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -293,7 +294,7 @@ def helguero_theorem(self, mean1, mean2, var1, var2): def dna_bimodality( input_csv_file, output_csv_path, output_jpg_path, - input_zip_file: str = None, properties: dict = None, **kwargs) -> int: + input_zip_file: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`HelParBimodality ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/dna/dna_timeseries.py b/biobb_dna/dna/dna_timeseries.py index bc3fdaea..19df4199 100755 --- a/biobb_dna/dna/dna_timeseries.py +++ b/biobb_dna/dna/dna_timeseries.py @@ -2,6 +2,7 @@ """Module containing the HelParTimeSeries class and the command line interface.""" import argparse +from typing import Optional import zipfile import re from pathlib import Path @@ -263,7 +264,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -274,7 +275,7 @@ def launch(self) -> int: def dna_timeseries( input_ser_path: str, output_zip_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`HelParTimeSeries ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/dna/dna_timeseries_unzip.py b/biobb_dna/dna/dna_timeseries_unzip.py index aaa370c4..fa5f0bc6 100755 --- a/biobb_dna/dna/dna_timeseries_unzip.py +++ b/biobb_dna/dna/dna_timeseries_unzip.py @@ -5,6 +5,7 @@ import zipfile import shutil import argparse +from typing import Optional from biobb_dna.utils import constants from biobb_common.generic.biobb_object import BiobbObject @@ -173,7 +174,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -186,8 +187,8 @@ def dna_timeseries_unzip( input_zip_file: str, output_path_csv: str, output_path_jpg: str, - output_list_path: str = None, - properties: dict = None, + output_list_path: Optional[str] = None, + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`DnaTimeseriesUnzip ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/interbp_correlations/interbpcorr.py b/biobb_dna/interbp_correlations/interbpcorr.py index bf72bfb4..4fd17cee 100755 --- a/biobb_dna/interbp_correlations/interbpcorr.py +++ b/biobb_dna/interbp_correlations/interbpcorr.py @@ -2,6 +2,7 @@ """Module containing the InterBasePairCorrelation class and the command line interface.""" import argparse +from typing import Optional from itertools import product import numpy as np @@ -233,7 +234,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir"), + self.stage_io_dict.get("unique_dir", ""), ]) self.remove_tmp_files() @@ -270,7 +271,7 @@ def interbpcorr( input_filename_rise: str, input_filename_tilt: str, input_filename_roll: str, input_filename_twist: str, output_csv_path: str, output_jpg_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`HelParCorrelation ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/interbp_correlations/interhpcorr.py b/biobb_dna/interbp_correlations/interhpcorr.py index 51e74353..1e75371c 100755 --- a/biobb_dna/interbp_correlations/interhpcorr.py +++ b/biobb_dna/interbp_correlations/interhpcorr.py @@ -2,6 +2,7 @@ """Module containing the InterHelParCorrelation class and the command line interface.""" import argparse +from typing import Optional import pandas as pd import numpy as np @@ -232,7 +233,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir"), + self.stage_io_dict.get("unique_dir", ""), ]) self.remove_tmp_files() @@ -280,7 +281,7 @@ def interhpcorr( input_filename_rise: str, input_filename_tilt: str, input_filename_roll: str, input_filename_twist: str, output_csv_path: str, output_jpg_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`InterHelParCorrelation ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/interbp_correlations/interseqcorr.py b/biobb_dna/interbp_correlations/interseqcorr.py index f0206bba..ecd501c5 100755 --- a/biobb_dna/interbp_correlations/interseqcorr.py +++ b/biobb_dna/interbp_correlations/interseqcorr.py @@ -2,6 +2,7 @@ """Module containing the InterSequenceCorrelation class and the command line interface.""" import argparse +from typing import Optional from pathlib import Path import numpy as np @@ -177,7 +178,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -199,7 +200,7 @@ def circular(x1, x2): def interseqcorr( input_ser_path: str, output_csv_path: str, output_jpg_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`HelParCorrelation ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/intrabp_correlations/intrabpcorr.py b/biobb_dna/intrabp_correlations/intrabpcorr.py index 7cf3cbc7..6f6bfff8 100755 --- a/biobb_dna/intrabp_correlations/intrabpcorr.py +++ b/biobb_dna/intrabp_correlations/intrabpcorr.py @@ -2,6 +2,7 @@ """Module containing the IntraBasePairCorrelation class and the command line interface.""" import argparse +from typing import Optional from itertools import product import numpy as np @@ -233,7 +234,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -270,7 +271,7 @@ def intrabpcorr( input_filename_stagger: str, input_filename_buckle: str, input_filename_propel: str, input_filename_opening: str, output_csv_path: str, output_jpg_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`HelParCorrelation ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/intrabp_correlations/intrahpcorr.py b/biobb_dna/intrabp_correlations/intrahpcorr.py index 1f9265b8..31ff4412 100755 --- a/biobb_dna/intrabp_correlations/intrahpcorr.py +++ b/biobb_dna/intrabp_correlations/intrahpcorr.py @@ -2,6 +2,7 @@ """Module containing the IntraHelParCorrelation class and the command line interface.""" import argparse +from typing import Optional import pandas as pd import numpy as np @@ -234,7 +235,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -282,7 +283,7 @@ def intrahpcorr( input_filename_stagger: str, input_filename_buckle: str, input_filename_propel: str, input_filename_opening: str, output_csv_path: str, output_jpg_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`IntraHelParCorrelation ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/intrabp_correlations/intraseqcorr.py b/biobb_dna/intrabp_correlations/intraseqcorr.py index 36c54635..76f5c6d8 100755 --- a/biobb_dna/intrabp_correlations/intraseqcorr.py +++ b/biobb_dna/intrabp_correlations/intraseqcorr.py @@ -2,6 +2,7 @@ """Module containing the IntraSequenceCorrelation class and the command line interface.""" import argparse +from typing import Optional from pathlib import Path import numpy as np @@ -173,7 +174,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -195,7 +196,7 @@ def circular(x1, x2): def intraseqcorr( input_ser_path: str, output_csv_path: str, output_jpg_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`HelParCorrelation ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/stiffness/average_stiffness.py b/biobb_dna/stiffness/average_stiffness.py index 21e6badf..3ccdf81a 100755 --- a/biobb_dna/stiffness/average_stiffness.py +++ b/biobb_dna/stiffness/average_stiffness.py @@ -2,6 +2,7 @@ """Module containing the AverageStiffness class and the command line interface.""" import argparse +from typing import Optional from pathlib import Path import matplotlib.pyplot as plt @@ -186,7 +187,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -197,7 +198,7 @@ def launch(self) -> int: def average_stiffness( input_ser_path: str, output_csv_path: str, output_jpg_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`AverageStiffness ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_dna/stiffness/basepair_stiffness.py b/biobb_dna/stiffness/basepair_stiffness.py index f5f74ace..bc5d03fe 100755 --- a/biobb_dna/stiffness/basepair_stiffness.py +++ b/biobb_dna/stiffness/basepair_stiffness.py @@ -2,6 +2,7 @@ """Module containing the HelParStiffness class and the command line interface.""" import argparse +from typing import Optional from pathlib import Path import pandas as pd @@ -180,7 +181,7 @@ def launch(self) -> int: # Remove temporary file(s) self.tmp_files.extend([ - self.stage_io_dict.get("unique_dir") + self.stage_io_dict.get("unique_dir", "") ]) self.remove_tmp_files() @@ -193,7 +194,7 @@ def basepair_stiffness( input_filename_shift: str, input_filename_slide: str, input_filename_rise: str, input_filename_tilt: str, input_filename_roll: str, input_filename_twist: str, - output_csv_path: str, output_jpg_path: str, properties: dict = None, **kwargs) -> int: + output_csv_path: str, output_jpg_path: str, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`BPStiffness ` class and execute the :meth:`launch() ` method.""" diff --git a/setup.py b/setup.py index c3bca3ce..02f29a9d 100644 --- a/setup.py +++ b/setup.py @@ -18,6 +18,7 @@ "Bioexcel": "https://bioexcel.eu/" }, packages=setuptools.find_packages(exclude=['adapters', 'docs', 'test']), + package_data={'biobb_dna': ['py.typed']}, install_requires=[ 'biobb_common==4.2.0', 'pandas>=1.3.0', @@ -46,13 +47,14 @@ "basepair_stiffness = biobb_dna.stiffness.basepair_stiffness:main" ] }, - classifiers=( - "Development Status :: 3 - Alpha", + classifiers=[ + "Development Status :: 5 - Production/Stable", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", - ), + "Operating System :: Unix" + ], )