From eb839d30fdfdad4ea05a1dfc7f919b2341392397 Mon Sep 17 00:00:00 2001 From: mjwen Date: Thu, 18 Aug 2022 17:12:17 -0500 Subject: [PATCH] Update version to be compatible with kim-api 2.3.0 --- .github/workflows/pythonpublish.yml | 2 +- .github/workflows/testing.yml | 6 +++--- .travis.yml | 2 +- CHANGELOG.txt | 32 +++++++++++++++++++++-------- TODO | 22 -------------------- api_compatibility.py | 4 ++-- api_compatibility.txt | 3 ++- kimpy/__init__.py | 2 +- utils/update_version.py | 2 +- 9 files changed, 35 insertions(+), 40 deletions(-) delete mode 100644 TODO diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 362b1c8..2697ccf 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -17,7 +17,7 @@ jobs: - name: Install kim-api run: | export KIMPY_DIR=${PWD} - export KIM_API_VERSION="2.2.1" + export KIM_API_VERSION="2.3.0" cd $KIMPY_DIR && cd .. wget http://s3.openkim.org/kim-api/kim-api-$KIM_API_VERSION.txz tar Jxvf kim-api-$KIM_API_VERSION.txz diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 3af0683..2b4d569 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -18,7 +18,7 @@ jobs: - name: Install kim-api run: | export KIMPY_DIR=${PWD} - export KIM_API_VERSION="2.2.1" + export KIM_API_VERSION="2.3.0" cd $KIMPY_DIR && cd .. wget http://s3.openkim.org/kim-api/kim-api-$KIM_API_VERSION.txz tar Jxvf kim-api-$KIM_API_VERSION.txz @@ -80,7 +80,7 @@ jobs: - name: Install kim-api run: | export KIMPY_DIR=${PWD} - export KIM_API_VERSION="2.2.1" + export KIM_API_VERSION="2.3.0" cd $KIMPY_DIR && cd .. mkdir -p KIM_API && cd KIM_API export KIM_API_DIR=$PWD @@ -157,7 +157,7 @@ jobs: - name: Install KIM-API run: | export KIMPY_DIR=${PWD} - export KIM_API_VERSION="2.2.1" + export KIM_API_VERSION="2.3.0" cd $KIMPY_DIR && cd .. wget http://s3.openkim.org/kim-api/kim-api-$KIM_API_VERSION.txz tar Jxvf kim-api-$KIM_API_VERSION.txz diff --git a/.travis.yml b/.travis.yml index a605401..1a54773 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,7 @@ jobs: before_install: # environment variable - export KIMPY_DIR=$PWD ; - - export KIM_API_VERSION="2.2.1" + - export KIM_API_VERSION="2.3.0" - if [ "$TRAVIS_OS_NAME" = "osx" ]; then python3 --version ; diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 379211f..7cec460 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,23 +2,39 @@ Change Log ========== +v2.0.1 (2022/08/18) +=================== + +- Include generated binding and testing file in the repo, instead of generating + them in the setup.py file. This means each time we modify the source template + file, we need to run `$ python scripts/generate_all.py` manually +- Drop python3.6 support +- Update to be compatible with kim-api-2.3.0 + + v2.0.0 (2021/04/26) =================== This release is not backward compatible. -- remove the manual memory management. There is no need to destroy the KIM-API objects in Python explicitly. By using smart pointers with custom deleters, Python controls the ownership of newly created objects, and the garbage collector module is tracking their status. -- the interface is updated, and no error message returns from the KIM-API to the users. It throws a RuntimeError exception with a print indicating what went wrong in case of an error. -- input and return arguments are now in lower case. -- methods are provided with a docstring explaining the purpose. -- NeighList module is updated. One uses NeighList() class to create an instance of the NeighList object and calls its methods. -- find example usage at kimpy/examples/ +- Remove the manual memory management. There is no need to destroy the KIM-API + objects in Python explicitly. By using smart pointers with custom deleters, + Python controls the ownership of newly created objects, and the garbage + collector module is tracking their status. +- The interface is updated, and no error message returns from the KIM-API to the + users. It throws a RuntimeError exception with a print indicating what went + wrong in case of an error. +- Input and return arguments are now in lower case. +- Methods are provided with a docstring explaining the purpose. +- NeighList module is updated. One uses NeighList() class to create an instance + of the NeighList object and calls its methods. +- Find example usage at kimpy/examples/ v0.3.3 (2019/10/28) ================== -- update setup.py to not explicitly use `pip` and `python` +- Update setup.py to not explicitly use `pip` and `python` -- remove pybind11==2.2.3 version dependence, since the `get_include()` of +- Remove pybind11==2.2.3 version dependence, since the `get_include()` of pybind11 is fixed diff --git a/TODO b/TODO deleted file mode 100644 index 132bd41..0000000 --- a/TODO +++ /dev/null @@ -1,22 +0,0 @@ -1. 05/21/2018 - Remove py::nodelete in binding to class where it is unnecessory, such as - KIM_DataType.hpp. Done - -2. 05/21/2018 - Add py::scoped_interpreter guard{}; to embed functions. Done - Answer: cannot use it. Runtime error will occur. - -3. 05/22/2018 - Check whether polymophism works for functions like `set_argument_pointer` - in KIM_ComputeArguments.hpp. Done - Answer: yes, it works. - -4. 06/21/2018 - The followting two member functions in KIM_ComputeArguments.hpp and - KIM_Model.hpp are not wrapper. - void SetSimulatorBufferPointer(void * const ptr); - void GetSimulatorBufferPointer(void ** const ptr) const; - To do it, we can require `ptr` to be a dictionary, and use the same method - for callbacks to wrap it. But check with Ryan to see whether this is - really needed. Not yet - diff --git a/api_compatibility.py b/api_compatibility.py index c197fe0..f485949 100644 --- a/api_compatibility.py +++ b/api_compatibility.py @@ -174,7 +174,7 @@ def check_kim_api_compatibility(kimpy_version, kim_api_version): msg3 += "latest kimpy, which is not compatible " msg3 += "with this\n KIM-API version " msg3 += '"{}" yet. Please contact\n '.format(kim_api_version) - msg3 += "Mingjian Wen (wenxx151@umn.edu) or\n " + msg3 += "Mingjian Wen (wenxx151@gmail.com) or\n " msg3 += "raise an issue on github so we update the kimpy.\n" else: compatible_kimpy = suggest_kimpy(kim_api_version, compatible_table) @@ -190,5 +190,5 @@ def check_kim_api_compatibility(kimpy_version, kim_api_version): if __name__ == "__main__": - kim_api_compatibility = check_kim_api_compatibility("0.2.3", "2.0.1") + kim_api_compatibility = check_kim_api_compatibility("2.0.1", "2.3.0") print(kim_api_compatibility) diff --git a/api_compatibility.txt b/api_compatibility.txt index 15d5d06..580ea70 100644 --- a/api_compatibility.txt +++ b/api_compatibility.txt @@ -1,7 +1,7 @@ # # To update kimpy version (in kimpy/__init__.py) and kim-api version (in .travis.yml), # append to this table and then run: -# $ python scripts/update_version.py +# $ python utils/update_version.py # # kimpy-version target-api-version backward-compatible-api-version @@ -20,3 +20,4 @@ 0.3.4 2.2.0 2.2.0 1.0.0 2.2.1 2.2.0 2.0.0 2.2.1 2.2.1 + 2.0.1 2.3.0 2.2.1 diff --git a/kimpy/__init__.py b/kimpy/__init__.py index 5dbcedf..b6a3e89 100644 --- a/kimpy/__init__.py +++ b/kimpy/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.0.0" +__version__ = "2.0.1" # import all modules from . import model diff --git a/utils/update_version.py b/utils/update_version.py index c41a906..d0c56a8 100644 --- a/utils/update_version.py +++ b/utils/update_version.py @@ -58,7 +58,7 @@ def update_version(version, path, key, in_quotes=False, extra_space=False): path = os.path.join(kimpy_dir, ".travis.yml") update_version(api_v, path, "export KIM_API_VERSION", in_quotes=True) - path = os.path.join(kimpy_dir, ".github/workflows/pythonpackage.yml") + path = os.path.join(kimpy_dir, ".github/workflows/testing.yml") update_version(api_v, path, "export KIM_API_VERSION", in_quotes=True) path = os.path.join(kimpy_dir, ".github/workflows/pythonpublish.yml") update_version(api_v, path, "export KIM_API_VERSION", in_quotes=True)