Repository: Moffran/calibrated_explanations (language: python)

Issue:
Rename python module to calibrated_explanations (for PyPI)
We need to rename our main python module from `ce` to `calibrated_explanations` (or something else) before publication at PyPI.  I explain below.

Currently, this library is used as:

```python
import ce
```

or

```python
from ce import *
```

I initially tried to name the package `ce` on PyPI, but that name is reserved by PyPI -- I think it is too short.  So I guess it makes sense to go with a more descriptive name "calibrated explanations".

[PEP 423](https://peps.python.org/pep-0423/) details the rules for packages published at PyPI.  The main guideline is that the module name should match the package name.  Following the guidelines there (which I won't repeat here for brevity), my suggestion is:

* `calibrated_explanations` as the module name
* `calibrated-explanations` as the package name

The inconsistency between underscore (`_`) and dash (`-`) above is intentional and follows the community standard:

* Package [in-place](https://pypi.org/project/in-place/) exports module `in_place`;
* Package [aioauth-fastapi](https://pypi.org/project/aioauth-fastapi/) exports module `aioauth_fastapi`;
* Package [lm-detect](https://pypi.org/project/lm-detect/) exports module `lm_detect`.

So I suggest we should move so that this library is imported as:

```python
import calibrated_explanations
```

or

```python
from calibrated_explanations import *
```

(which was what was here actually before I imported changes from the internal repository.)

And the package would be installed as

```bash
$ pip install calibrated-explanations
```

I'll move on with this change soon.  I'll make sure to backport the changes to the internal repository and update @tuvelofstrom's Python notebooks with the updated import afterwards.


Discussion / hints:
@tuvelofstrom and @Moffran Please let me know what you think of these proposed changes.  :smiley:   If you agree I'll move on with them.

Fix patch:
diff --git a/README.md b/README.md
index 2d2f08dd..3db1b649 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ Getting started
 ---------------
 
 ```python
->>> import ce
+>>> import calibrated_explanations
 ... TODO: write me...
 ```
 
diff --git a/ce/VennAbers.py b/calibrated_explanations/VennAbers.py
similarity index 100%
rename from ce/VennAbers.py
rename to calibrated_explanations/VennAbers.py
diff --git a/ce/__init__.py b/calibrated_explanations/__init__.py
similarity index 89%
rename from ce/__init__.py
rename to calibrated_explanations/__init__.py
index bf7e7041..4ba648ac 100644
--- a/ce/__init__.py
+++ b/calibrated_explanations/__init__.py
@@ -1,10 +1,9 @@
 """
-Calibrated Explainer (ce) 
+Calibrated Explanations (calibrated_explanations)
 
 is a Python package for explaining black-box models.
 
 It is based on the paper "Calibrated Explanations" by Helena Löfström et al.
-
 """
 import warnings
 
diff --git a/ce/_discretizers.py b/calibrated_explanations/_discretizers.py
similarity index 100%
rename from ce/_discretizers.py
rename to calibrated_explanations/_discretizers.py
diff --git a/ce/_explanations.py b/calibrated_explanations/_explanations.py
similarity index 100%
rename from ce/_explanations.py
rename to calibrated_explanations/_explanations.py
diff --git a/ce/core.py b/calibrated_explanations/core.py
similarity index 100%
rename from ce/core.py
rename to calibrated_explanations/core.py
diff --git a/ce/wrappers.py b/calibrated_explanations/wrappers.py
similarity index 100%
rename from ce/wrappers.py
rename to calibrated_explanations/wrappers.py
diff --git a/doc/release.md b/doc/release.md
index 06117da2..3bc1eedf 100644
--- a/doc/release.md
+++ b/doc/release.md
@@ -65,7 +65,7 @@ Set-up your .pypirc as instructed when creating a token:
 	(venv) $ python3 -m pip install ipython  # TODO: move to requirements!
 	(venv) $ python3 -m pip install -i https://test.pypi.org/simple/ --no-deps calibrated-explanations
 	(venv) $ python3
-	>>> import ce
+	>>> import calibrated_explanations
 	>>> ...
 
 9. Commit and tag a new [semantic version] on git.
@@ -90,7 +90,7 @@ Set-up your .pypirc as instructed when creating a token:
 12. test installation
 
 	$ pip install calibrated-explanations
-	>>> import ce
+	>>> import calibrated_explanations
 
 This could be automated through CI,
 but would only be worth it if we are releasing very often.
diff --git a/pyproject.toml b/pyproject.toml
index 5ccca90f..20abd09f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -32,4 +32,4 @@ classifiers = [
 "Bug Tracker" = "https://github.com/Moffran/calibrated_explanations/issues"
 
 [tool.setuptools.packages.find]
-where = ["ce"]
+where = ["calibrated_explanations"]


Test patch:
diff --git a/tests/test_classification.py b/tests/test_classification.py
index 5a8fad0c..8b8b6586 100644
--- a/tests/test_classification.py
+++ b/tests/test_classification.py
@@ -13,7 +13,7 @@
 from lime.discretize import EntropyDiscretizer
 # from shap import Explainer
 
-from ce import CalibratedExplainer, BinaryDiscretizer, BinaryEntropyDiscretizer
+from calibrated_explanations import CalibratedExplainer, BinaryDiscretizer, BinaryEntropyDiscretizer
 
 model = 'RF'
 def load_binary_dataset():
diff --git a/tests/test_regression.py b/tests/test_regression.py
index f8e7fb4c..588b07e6 100644
--- a/tests/test_regression.py
+++ b/tests/test_regression.py
@@ -13,7 +13,7 @@
 from lime.discretize import EntropyDiscretizer, DecileDiscretizer, QuartileDiscretizer
 # from shap import Explainer
 
-from ce import CalibratedExplainer, BinaryDiscretizer, BinaryEntropyDiscretizer
+from calibrated_explanations import CalibratedExplainer, BinaryDiscretizer, BinaryEntropyDiscretizer
 from crepes.extras import DifficultyEstimator # sigma_knn, sigma_variance, sigma_variance_oob
 
 model = 'RF'