From c3a0935add6ef1929b58c293082f14cd22953a2a Mon Sep 17 00:00:00 2001 From: "Corey Neskey (Hive)" <167793684+coreyneskey@users.noreply.github.com> Date: Thu, 21 May 2026 17:33:24 -0400 Subject: [PATCH 1/5] chore: Derive-Risk org metadata after repository transfer Update package and Sphinx author, homepage URL, and aligned 0.1-alpha.14 version strings. Remove legacy Travis CI config. --- .travis.yml | 2 -- docs/conf.py | 10 +++++----- pyfair/_version.py | 2 +- setup.py | 6 +++--- 4 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3da4953..0000000 --- a/.travis.yml +++ /dev/null @@ -1,2 +0,0 @@ -language: python -script: python ./tests/test_runner.py diff --git a/docs/conf.py b/docs/conf.py index f18466a..a5903fa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,13 +19,13 @@ # -- Project information ----------------------------------------------------- project = 'pyfair' -copyright = '2023, Hive Systems, LLC' -author = 'Hive Systems' +copyright = '2023-2026, Derive Risk' +author = 'Derive Risk' # The short X.Y version -version = '0.1.12' +version = '0.1.14' # The full version, including alpha/beta/rc tags -release = '0.1-alpha.12' +release = '0.1-alpha.14' # -- General configuration --------------------------------------------------- @@ -137,7 +137,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'pyfair.tex', 'pyfair Documentation', - 'Hive Systems', 'manual'), + 'Derive Risk', 'manual'), ] diff --git a/pyfair/_version.py b/pyfair/_version.py index 2a3adcf..62d6dde 100644 --- a/pyfair/_version.py +++ b/pyfair/_version.py @@ -1 +1 @@ -__version__ = "0.1-alpha.12" +__version__ = "0.1-alpha.14" diff --git a/setup.py b/setup.py index 2778755..2a52061 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="pyfair", - version="0.1-alpha.13", + version="0.1-alpha.14", description="Open FAIR Monte Carlo creator", long_description=""" Factor Analysis of Information Risk (Open FAIR) model in Python. @@ -18,7 +18,7 @@ "Open FAIR" is a trademark of the Open Group. """, - author="Hive Systems", + author="Derive Risk", author_email="pyfair@hivesystems.com", packages=[ "pyfair", @@ -27,7 +27,7 @@ "pyfair.utility", ], license="MIT", - url="https://github.com/Hive-Systems/pyfair", + url="https://github.com/Derive-Risk/pyfair", keywords=["FAIR", "risk", "monte carlo", "cyber risk", "risk analysis"], classifiers=[ "Development Status :: 3 - Alpha", From 6dec3d5ca95fa19d2b1bc9693e884ed2cb26ab09 Mon Sep 17 00:00:00 2001 From: "Corey Neskey (Hive)" <167793684+coreyneskey@users.noreply.github.com> Date: Thu, 21 May 2026 17:39:41 -0400 Subject: [PATCH 2/5] fix: use DataFrame.map for pandas 2.1+ (applymap removed) CI installs unpinned pandas; 3.11+ matrix jobs hit AttributeError on applymap. Require pandas>=2.1 where map replaced applymap. --- pyfair/report/base_report.py | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyfair/report/base_report.py b/pyfair/report/base_report.py index 2692412..f023659 100644 --- a/pyfair/report/base_report.py +++ b/pyfair/report/base_report.py @@ -262,7 +262,7 @@ def _get_overview_table(self, model_or_models): risk_results = risk_results.agg(["mean", "std", "min", "max"]) risk_results.index = ["Mean", "Stdev", "Minimum", "Maximum"] # Format risk results into dataframe - overview_df = risk_results.applymap( + overview_df = risk_results.map( lambda x: self._format_strings["Risk"].format(x) ) overview_df.loc["Simulations"] = [ @@ -321,7 +321,7 @@ def _get_model_parameter_table(self, model): # On a column basis axis=1, ) - param_df = param_df.applymap(lambda x: "" if "nan" in x else x) + param_df = param_df.map(lambda x: "" if "nan" in x else x) # Do not truncate our base64 images. pd.set_option("display.max_colwidth", None) # Create our distribution icons as strings in table diff --git a/requirements.txt b/requirements.txt index 2660abc..c778903 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -pandas>=0.24.1 +pandas>=2.1.0 numpy>=1.16.1 scipy>=1.2.1 matplotlib>=3.0.2 From 788da157ee86a945cae22d7b1cec9004029e2c09 Mon Sep 17 00:00:00 2001 From: "Corey Neskey (Hive)" <167793684+coreyneskey@users.noreply.github.com> Date: Thu, 21 May 2026 17:41:58 -0400 Subject: [PATCH 3/5] fix: compat helper for DataFrame map vs applymap across pandas versions pandas 2.1+ removed applymap; Python 3.8 CI cannot install pandas>=2.1. Use applymap when present, else map. --- pyfair/report/base_report.py | 16 +++++++++++++--- requirements.txt | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pyfair/report/base_report.py b/pyfair/report/base_report.py index f023659..a582f78 100644 --- a/pyfair/report/base_report.py +++ b/pyfair/report/base_report.py @@ -22,6 +22,14 @@ from ..utility.beta_pert import FairBetaPert +def _dataframe_elementwise(df, func): + """Element-wise transform; pandas 2.1+ uses map, older uses applymap.""" + applymap = getattr(df, "applymap", None) + if applymap is not None: + return applymap(func) + return df.map(func) + + class FairBaseReport(object): """A base class for creating FairModel and FairMetaModel reports @@ -262,8 +270,8 @@ def _get_overview_table(self, model_or_models): risk_results = risk_results.agg(["mean", "std", "min", "max"]) risk_results.index = ["Mean", "Stdev", "Minimum", "Maximum"] # Format risk results into dataframe - overview_df = risk_results.map( - lambda x: self._format_strings["Risk"].format(x) + overview_df = _dataframe_elementwise( + risk_results, lambda x: self._format_strings["Risk"].format(x) ) overview_df.loc["Simulations"] = [ "{0:,.0f}".format(len(model.export_results())) @@ -321,7 +329,9 @@ def _get_model_parameter_table(self, model): # On a column basis axis=1, ) - param_df = param_df.map(lambda x: "" if "nan" in x else x) + param_df = _dataframe_elementwise( + param_df, lambda x: "" if "nan" in x else x + ) # Do not truncate our base64 images. pd.set_option("display.max_colwidth", None) # Create our distribution icons as strings in table diff --git a/requirements.txt b/requirements.txt index c778903..2660abc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -pandas>=2.1.0 +pandas>=0.24.1 numpy>=1.16.1 scipy>=1.2.1 matplotlib>=3.0.2 From ae98b43f2b99256db72f9e2a9fa0b6fd836ff3c8 Mon Sep 17 00:00:00 2001 From: "Corey Neskey (Hive)" <167793684+coreyneskey@users.noreply.github.com> Date: Thu, 21 May 2026 17:54:07 -0400 Subject: [PATCH 4/5] fix: copyright Quant LLC; author branding Derive --- docs/conf.py | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index a5903fa..e99d3c4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,8 +19,8 @@ # -- Project information ----------------------------------------------------- project = 'pyfair' -copyright = '2023-2026, Derive Risk' -author = 'Derive Risk' +copyright = '2023-2026, Quant LLC' +author = 'Derive' # The short X.Y version version = '0.1.14' @@ -137,7 +137,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'pyfair.tex', 'pyfair Documentation', - 'Derive Risk', 'manual'), + 'Derive', 'manual'), ] diff --git a/setup.py b/setup.py index 2a52061..c530f3e 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ "Open FAIR" is a trademark of the Open Group. """, - author="Derive Risk", + author="Derive", author_email="pyfair@hivesystems.com", packages=[ "pyfair", From 2f09d7a940a2c6f59526821eac394e114076fe46 Mon Sep 17 00:00:00 2001 From: "Corey Neskey (Hive)" <167793684+coreyneskey@users.noreply.github.com> Date: Thu, 21 May 2026 17:55:52 -0400 Subject: [PATCH 5/5] chore: author_email pyfair@deriverisk.com --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c530f3e..f03bf39 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ """, author="Derive", - author_email="pyfair@hivesystems.com", + author_email="pyfair@deriverisk.com", packages=[ "pyfair", "pyfair.model",