Skip to content

Commit

Permalink
bugfix for 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewReid854 committed Jan 18, 2022
1 parent c15e2e9 commit ee4cad8
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 14 deletions.
11 changes: 11 additions & 0 deletions docs/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
Changelog
---------

**Version: 0.8.1 --- Released: 18 Jan 2022**
''''''''''''''''''''''''''''''''''''''''''''

**Summary of changes**

This is bugfix release to deal with a minor bug.

**Bug Fixes**

- The histogram plot in Fit_Everything had a bug which caused plotting to fail, as identified by `this issue <https://github.com/MatthewReid854/reliability/issues/27>`_. This is now resolved.

**Version: 0.8.0 --- Released: 09 Jan 2022**
''''''''''''''''''''''''''''''''''''''''''''

Expand Down
2 changes: 2 additions & 0 deletions docs/How to donate to the project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The Python reliability library is free and open source, and it always will be. I

Developing and maintaining this library is all done in my spare time and is a very time consuming process. If you would like to donate as a way of showing your appreciation, you can send a one off donation using `Paypal <https://paypal.me/MatthewReid854?locale.x=en_AU>`_ or a monthly donation by becoming a `GitHub Sponsor <https://github.com/sponsors/MatthewReid854>`_.

If you're wondering why you should pay for something that is already free, GitHub has a `great explaination <https://github.com/sponsors>`_ on the importance of investing in the software that powers your world.

Thank you to the following `reliability` donors for their generous support of open source development :)

- elriaral (GitHub user)
Expand Down
32 changes: 20 additions & 12 deletions reliability/Fitters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1494,9 +1494,9 @@ def __histogram_plot(self):
if counter > 10:
ls = "--"
if item == "Weibull_2P":
self.__Weibull_2P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Weibull_2P_params.distribution.CDF(plot_CI=False, linestyle=ls)
elif item == "Weibull_3P":
self.__Weibull_3P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Weibull_3P_params.distribution.CDF(plot_CI=False, linestyle=ls)
elif item == "Weibull_Mixture":
self.__Weibull_Mixture_params.distribution.CDF(
linestyle=ls, xmax=xmax * 2
Expand All @@ -1506,25 +1506,33 @@ def __histogram_plot(self):
elif item == "Weibull_DS":
self.__Weibull_DS_params.distribution.CDF(linestyle=ls, xmax=xmax * 2)
elif item == "Gamma_2P":
self.__Gamma_2P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Gamma_2P_params.distribution.CDF(plot_CI=False, linestyle=ls)
elif item == "Gamma_3P":
self.__Gamma_3P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Gamma_3P_params.distribution.CDF(plot_CI=False, linestyle=ls)
elif item == "Exponential_1P":
self.__Exponential_1P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Exponential_1P_params.distribution.CDF(
plot_CI=False, linestyle=ls
)
elif item == "Exponential_2P":
self.__Exponential_2P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Exponential_2P_params.distribution.CDF(
plot_CI=False, linestyle=ls
)
elif item == "Lognormal_2P":
self.__Lognormal_2P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Lognormal_2P_params.distribution.CDF(plot_CI=False, linestyle=ls)
elif item == "Lognormal_3P":
self.__Lognormal_3P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Lognormal_3P_params.distribution.CDF(plot_CI=False, linestyle=ls)
elif item == "Normal_2P":
self.__Normal_2P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Normal_2P_params.distribution.CDF(plot_CI=False, linestyle=ls)
elif item == "Gumbel_2P":
self.__Gumbel_2P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Gumbel_2P_params.distribution.CDF(plot_CI=False, linestyle=ls)
elif item == "Loglogistic_2P":
self.__Loglogistic_2P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Loglogistic_2P_params.distribution.CDF(
plot_CI=False, linestyle=ls
)
elif item == "Loglogistic_3P":
self.__Loglogistic_3P_params.distribution.CDF(CI=False, linestyle=ls)
self.__Loglogistic_3P_params.distribution.CDF(
plot_CI=False, linestyle=ls
)
elif item == "Beta_2P":
self.__Beta_2P_params.distribution.CDF(linestyle=ls)
plt.xlim(xmin, xmax)
Expand Down
5 changes: 5 additions & 0 deletions reliability/Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7064,6 +7064,11 @@ def distributions_input_checking(
raise ValueError(
'CI_type must be "time" or "reliability". Default is "time". Only used if the distribution object was created by Fitters.'
)
if CI is True:
CI = 0.95
if CI is False:
CI = 0.95
plot_CI = False
if type(CI) not in [type(None), float]:
raise ValueError(
"CI must be between 0 and 1. Default is 0.95 for 95% confidence interval. Only used if the distribution object was created by Fitters."
Expand Down
2 changes: 1 addition & 1 deletion reliability/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from datetime import date

__title__ = 'reliability'
__version__ = "0.8.0"
__version__ = "0.8.1"
__description__ = 'A Python library for reliability engineering'
__url__ = 'https://reliability.readthedocs.io/en/latest/index.html'
__author__ = 'Matthew Reid'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="reliability",
version="0.8.0",
version="0.8.1",
description="Reliability Engineering toolkit for Python",
author="Matthew Reid",
author_email="alpha.reliability@gmail.com",
Expand Down

0 comments on commit ee4cad8

Please sign in to comment.