Skip to content

Commit 897b97a

Browse files
authored
pypi prep (#73)
1 parent d5d9e2c commit 897b97a

File tree

4 files changed

+37
-5
lines changed

4 files changed

+37
-5
lines changed

RELEASE_NOTES.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Release Notes
22
=============
33

4+
Version 0.1-alpha.13
5+
--------------------
6+
7+
* Updated package metadata and dependencies
8+
* Improved package classifiers
9+
* Changed requires to install_requires for better dependency management
10+
* Added Python version requirement (>=3.6)
11+
412
Version 0.1-alpha.12
513
--------------------
614

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[metadata]
2-
description-file = README.md
2+
description-file = README.rst

setup.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="pyfair",
5-
version="0.1-alpha.12",
5+
version="0.1-alpha.13",
66
description="Open FAIR Monte Carlo creator",
77
long_description="""
88
Factor Analysis of Information Risk (Open FAIR) model in Python.
@@ -19,7 +19,7 @@
1919
2020
""",
2121
author="Hive Systems",
22-
author_email="pyfair@hivesystems.io",
22+
author_email="pyfair@hivesystems.com",
2323
packages=[
2424
"pyfair",
2525
"pyfair.model",
@@ -28,12 +28,15 @@
2828
],
2929
license="MIT",
3030
url="https://github.com/Hive-Systems/pyfair",
31-
keywords=["FAIR", "risk"],
31+
keywords=["FAIR", "risk", "monte carlo", "cyber risk", "risk analysis"],
3232
classifiers=[
3333
"Development Status :: 3 - Alpha",
3434
"License :: OSI Approved :: MIT License",
35+
"Programming Language :: Python :: 3",
36+
"Topic :: Security",
37+
"Topic :: Scientific/Engineering :: Mathematics",
3538
],
36-
requires=[
39+
install_requires=[
3740
"pandas",
3841
"numpy",
3942
"scipy",
@@ -42,4 +45,5 @@
4245
],
4346
package_dir={"pyfair": "./pyfair"},
4447
package_data={"pyfair": ["./static/*"]},
48+
python_requires=">=3.6",
4549
)

test_fair.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from pyfair import FairModel
2+
3+
# Create a simple FAIR model
4+
model = FairModel(name="Basic Model", n_simulations=10000)
5+
6+
# Set parameters
7+
model.input_data("Loss Event Frequency", mean=0.3, stdev=0.1)
8+
model.input_data("Loss Magnitude", constant=5000000)
9+
10+
# Calculate and display results
11+
model.calculate_all()
12+
13+
# Get results and print summary statistics
14+
results = model.export_results()
15+
print("\nModel Results Summary:")
16+
print("-" * 20)
17+
print(f"Risk Statistics:")
18+
print(f"Mean: ${results['Risk'].mean():,.2f}")
19+
print(f"Median: ${results['Risk'].median():,.2f}")
20+
print(f"95th Percentile: ${results['Risk'].quantile(0.95):,.2f}")

0 commit comments

Comments
 (0)