From 7e195d344896072c75a12f7ab5c355132b79dc24 Mon Sep 17 00:00:00 2001 From: Thomas Bury Date: Sat, 18 May 2024 21:23:49 -0400 Subject: [PATCH 1/4] update docs version --- docs/source/conf.py | 56 +++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index eaa5fe2..3ba7567 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,19 +15,17 @@ import os import sys -sys.path.insert(0, os.path.abspath('../../ewstools/')) +sys.path.insert(0, os.path.abspath("../../ewstools/")) # -- Project information ----------------------------------------------------- -project = 'ewstools' -copyright = '2022, Thomas M Bury' -author = 'Thomas M Bury' +project = "ewstools" +copyright = "2022, Thomas M Bury" +author = "Thomas M Bury" # Semantic version number -version = '2.0.1' - - +version = "2.1.1" # -- General configuration --------------------------------------------------- @@ -38,30 +36,27 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.napoleon' -] +extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # -source_suffix = ['.rst', '.md'] +source_suffix = [".rst", ".md"] # source_suffix = {'.rst': 'restructuredtext'} # The master toctree document. -master_doc = 'index' +master_doc = "index" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = 'en' +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -77,7 +72,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +html_theme = "sphinx_rtd_theme" # Theme options are theme-specific and customize the look and feel of a theme @@ -105,7 +100,7 @@ # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = 'ewstoolsdoc' +htmlhelp_basename = "ewstoolsdoc" # -- Options for LaTeX output ------------------------------------------------ @@ -114,15 +109,12 @@ # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. # # 'preamble': '', - # Latex figure (float) alignment # # 'figure_align': 'htbp', @@ -132,8 +124,7 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'ewstools.tex', 'ewstools Documentation', - 'Thomas M Bury', 'manual'), + (master_doc, "ewstools.tex", "ewstools Documentation", "Thomas M Bury", "manual"), ] @@ -141,10 +132,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'ewstools', 'ewstools Documentation', - [author], 1) -] +man_pages = [(master_doc, "ewstools", "ewstools Documentation", [author], 1)] # -- Options for Texinfo output ---------------------------------------------- @@ -153,9 +141,15 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'ewstools', 'ewstools Documentation', - author, 'ewstools', 'One line description of project.', - 'Miscellaneous'), + ( + master_doc, + "ewstools", + "ewstools Documentation", + author, + "ewstools", + "One line description of project.", + "Miscellaneous", + ), ] @@ -174,6 +168,4 @@ # epub_uid = '' # A list of files that should not be packed into the epub file. -epub_exclude_files = ['search.html'] - - +epub_exclude_files = ["search.html"] From caf24468c1b3d2adac64c642c0f4e46209b4eaa7 Mon Sep 17 00:00:00 2001 From: Thomas Bury Date: Sat, 18 May 2024 21:27:31 -0400 Subject: [PATCH 2/4] add entropyhub to requirements --- requirements_dev.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index 8e23971..0c577b7 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -14,4 +14,5 @@ lmfit==1.0.3 statsmodels==0.13.2 scipy==1.8.1 tensorflow==2.9.3 -deprecation==2.1.0 \ No newline at end of file +deprecation==2.1.0 +EntropyHub==2.0 \ No newline at end of file From eafd47e76f4a226e3c3155bc3eca2a9d750ba451 Mon Sep 17 00:00:00 2001 From: Thomas Bury Date: Sat, 18 May 2024 21:28:19 -0400 Subject: [PATCH 3/4] add entropy hub to setup requirements --- setup.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/setup.py b/setup.py index 63e3e9e..8e00d30 100644 --- a/setup.py +++ b/setup.py @@ -3,15 +3,17 @@ with open("README.md", "r") as fh: long_description = fh.read() -requirements = ['pandas>=0.23.0', - 'numpy>=1.14.0', - 'plotly>=2.3.0', - 'lmfit>=0.9.0', - 'arch>=4.4', - 'statsmodels>=0.9.0', - 'scipy>=1.0.1', - 'deprecation>=2.0', - ] +requirements = [ + "pandas>=0.23.0", + "numpy>=1.14.0", + "plotly>=2.3.0", + "lmfit>=0.9.0", + "arch>=4.4", + "statsmodels>=0.9.0", + "scipy>=1.0.1", + "deprecation>=2.0", + "entropyhub>=2.0", +] setuptools.setup( name="ewstools", @@ -30,4 +32,4 @@ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], -) \ No newline at end of file +) From e122b786e77920a6ed9c7ea67266b66a27992e30 Mon Sep 17 00:00:00 2001 From: Thomas Bury Date: Sat, 18 May 2024 22:14:37 -0400 Subject: [PATCH 4/4] drop rows with all nana --- ewstools/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ewstools/core.py b/ewstools/core.py index 739f2f6..dc64924 100644 --- a/ewstools/core.py +++ b/ewstools/core.py @@ -559,10 +559,10 @@ def compute_ktau(self, tmin="earliest", tmax="latest"): # Get tmin and tmax values if using extrema if tmin == "earliest": - tmin = self.ews.dropna().index[0] + tmin = self.ews.dropna(how="all").index[0] if tmax == "latest": - tmax = self.ews.dropna().index[-1] + tmax = self.ews.dropna(how="all").index[-1] # Get cropped data df_ews = self.ews[(self.ews.index >= tmin) & (self.ews.index <= tmax)].copy()