Repository: google/qhbm-library (language: python)

Issue:
Change packaging name from qhbm-library to qhbm-lib
Shorter is more comfortable for development.


Discussion / hints:

Fix patch:
diff --git a/pyproject.toml b/pyproject.toml
index b3f59d62..5bbd5a72 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
 [tool.poetry]
-name = "qhbm-library"
+name = "qhbmlib"
 version = "0.1.0"
 description = "Quantum Hamiltonian-Based Models built on TensorFlow Quantum"
 license = "Apache-2.0"
@@ -23,11 +23,11 @@ flake8 = "3.9.2"
 pytest = "6.2.4"
 
 [tool.coverage.paths]
-source = ["qhbm_libary"]
+source = ["qhbmlib"]
 
 [tool.coverage.run]
 branch = true
-source = ["qhbm_library"]
+source = ["qhbmlib"]
 
 [tool.coverage.report]
 show_missing = true
diff --git a/qhbm_library/__init__.py b/qhbmlib/__init__.py
similarity index 100%
rename from qhbm_library/__init__.py
rename to qhbmlib/__init__.py
diff --git a/qhbm_library/architectures.py b/qhbmlib/architectures.py
similarity index 99%
rename from qhbm_library/architectures.py
rename to qhbmlib/architectures.py
index 4384fa23..593c0cb8 100644
--- a/qhbm_library/architectures.py
+++ b/qhbmlib/architectures.py
@@ -20,7 +20,7 @@
 import sympy
 import tensorflow_quantum as tfq
 
-from qhbm_library import ebm
+from qhbmlib import ebm
 
 
 # ============================================================================ #
diff --git a/qhbm_library/ebm.py b/qhbmlib/ebm.py
similarity index 100%
rename from qhbm_library/ebm.py
rename to qhbmlib/ebm.py
diff --git a/qhbm_library/hamiltonian.py b/qhbmlib/hamiltonian.py
similarity index 100%
rename from qhbm_library/hamiltonian.py
rename to qhbmlib/hamiltonian.py
diff --git a/qhbm_library/qhbm_base.py b/qhbmlib/qhbm_base.py
similarity index 100%
rename from qhbm_library/qhbm_base.py
rename to qhbmlib/qhbm_base.py
diff --git a/qhbm_library/qmhl.py b/qhbmlib/qmhl.py
similarity index 99%
rename from qhbm_library/qmhl.py
rename to qhbmlib/qmhl.py
index 83e9b220..2df86f3c 100644
--- a/qhbm_library/qmhl.py
+++ b/qhbmlib/qmhl.py
@@ -17,7 +17,7 @@
 import tensorflow as tf
 import tensorflow_quantum as tfq
 
-from qhbm_library import qhbm_base
+from qhbmlib import qhbm_base
 
 
 # ============================================================================ #
diff --git a/qhbm_library/util.py b/qhbmlib/util.py
similarity index 100%
rename from qhbm_library/util.py
rename to qhbmlib/util.py
diff --git a/qhbm_library/vqt.py b/qhbmlib/vqt.py
similarity index 99%
rename from qhbm_library/vqt.py
rename to qhbmlib/vqt.py
index ccde9e0f..51474335 100644
--- a/qhbm_library/vqt.py
+++ b/qhbmlib/vqt.py
@@ -17,7 +17,7 @@
 import tensorflow as tf
 import tensorflow_quantum as tfq
 
-from qhbm_library import qhbm_base
+from qhbmlib import qhbm_base
 
 
 # ============================================================================ #
diff --git a/scripts/prepare_pr.sh b/scripts/prepare_pr.sh
index 97715c3f..ffd3789c 100755
--- a/scripts/prepare_pr.sh
+++ b/scripts/prepare_pr.sh
@@ -14,7 +14,7 @@
 # limitations under the License.
 # ==============================================================================
 
-poetry run black qhbm_library/ tests/
+poetry run black qhbmlib/ tests/
 poetry run flake8
 retval=$?
 if [ "$retval" == 0 ]


Test patch:
diff --git a/tests/architectures_test.py b/tests/architectures_test.py
index 07b181b7..0a9fbed5 100644
--- a/tests/architectures_test.py
+++ b/tests/architectures_test.py
@@ -21,7 +21,7 @@
 import tensorflow as tf
 import tensorflow_quantum as tfq
 
-from qhbm_library import architectures
+from qhbmlib import architectures
 
 
 class RPQCTest(tf.test.TestCase, parameterized.TestCase):
diff --git a/tests/ebm_test.py b/tests/ebm_test.py
index 9ede6b7b..919e2540 100644
--- a/tests/ebm_test.py
+++ b/tests/ebm_test.py
@@ -17,8 +17,8 @@
 
 import tensorflow as tf
 
-from qhbm_library import ebm
-from qhbm_library import qhbm_base
+from qhbmlib import ebm
+from qhbmlib import qhbm_base
 
 
 class ProbTest(tf.test.TestCase):
diff --git a/tests/hamiltonian_test.py b/tests/hamiltonian_test.py
index bdda720a..3d3966f2 100644
--- a/tests/hamiltonian_test.py
+++ b/tests/hamiltonian_test.py
@@ -17,7 +17,7 @@
 import cirq
 import tensorflow as tf
 
-from qhbm_library import hamiltonian
+from qhbmlib import hamiltonian
 
 
 class QubitGridTest(tf.test.TestCase):
diff --git a/tests/qhbm_base_test.py b/tests/qhbm_base_test.py
index 4acc456c..afe14143 100644
--- a/tests/qhbm_base_test.py
+++ b/tests/qhbm_base_test.py
@@ -20,7 +20,7 @@
 import tensorflow_probability as tfp
 import tensorflow_quantum as tfq
 
-from qhbm_library import qhbm_base
+from qhbmlib import qhbm_base
 from tests import test_util
 
 
diff --git a/tests/qmhl_test.py b/tests/qmhl_test.py
index 4957c9e5..349344b6 100644
--- a/tests/qmhl_test.py
+++ b/tests/qmhl_test.py
@@ -17,7 +17,7 @@
 import cirq
 import tensorflow as tf
 
-from qhbm_library import qmhl
+from qhbmlib import qmhl
 from tests import test_util
 
 
diff --git a/tests/test_util.py b/tests/test_util.py
index 6bcc7c6e..43f07884 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -23,9 +23,9 @@
 import tensorflow as tf
 import tensorflow_probability as tfp
 
-from qhbm_library import architectures
-from qhbm_library import ebm
-from qhbm_library import qhbm_base
+from qhbmlib import architectures
+from qhbmlib import ebm
+from qhbmlib import qhbm_base
 
 
 def get_random_qhbm(
diff --git a/tests/util_test.py b/tests/util_test.py
index f1d0af75..681c2bcb 100644
--- a/tests/util_test.py
+++ b/tests/util_test.py
@@ -19,7 +19,7 @@
 import tensorflow as tf
 import tensorflow_quantum as tfq
 
-from qhbm_library import util
+from qhbmlib import util
 from tests import test_util
 
 
diff --git a/tests/vqt_test.py b/tests/vqt_test.py
index 13cf74fb..9a0348cd 100644
--- a/tests/vqt_test.py
+++ b/tests/vqt_test.py
@@ -19,8 +19,8 @@
 import tensorflow as tf
 import tensorflow_quantum as tfq
 
-from qhbm_library import qhbm_base
-from qhbm_library import vqt
+from qhbmlib import qhbm_base
+from qhbmlib import vqt
 from tests import test_util