From 95ec31f878f78800b7a580e2bd577150b1e2a739 Mon Sep 17 00:00:00 2001 From: Abhijith Date: Tue, 17 Sep 2019 10:28:15 -0500 Subject: [PATCH 1/4] added a version indicator --- qmpy/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qmpy/__init__.py b/qmpy/__init__.py index 8e203198..15d4f96e 100644 --- a/qmpy/__init__.py +++ b/qmpy/__init__.py @@ -18,6 +18,8 @@ import django.core.exceptions as de +__version__ = 'qmpy version = 1.3' + INSTALL_PATH = os.path.abspath(os.path.dirname(__file__)) sys.path = [os.path.join(INSTALL_PATH, 'qmpy', 'db')] + sys.path From c8215524e0e5315640699054a45bd9aa729adf69 Mon Sep 17 00:00:00 2001 From: tachyontraveler Date: Tue, 17 Sep 2019 10:38:04 -0500 Subject: [PATCH 2/4] Changelog: added spglib changes and new unit tests --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f1ff07a..e5b3f9de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ qmpy changelog - Serialized DFT data availability with both default [OQMD](http://oqmd.org/static/docs/models.html) and [OPTiMaDe](http://www.optimade.org/) specified keyword-sets. - [Lark Parser](https://lark-parser.readthedocs.io/en/latest/) to convert raw queries to logical Django Queries - Pagination is implemented while retreiving RESTful query results +- Spglib upgraded to >1.9 + - Removed dependency on pyspglib since it is no longer maintained by its developer(s) + - Significant changes to the internal implementation of Structure model, even though it's not expected to be affect the end-user +- More unit tests + - duplicate entry detection, structure transformations - Change in UI of the landing page - Removed the on-the-fly calculations of # of entries while loading the oqmd.org main page - Removed the twitter based phase lookup instructions since it's no longer operational From 0ac3ace9dd726af5e22ff67af5124c19ed5bb59d Mon Sep 17 00:00:00 2001 From: Abhijith Date: Tue, 17 Sep 2019 11:25:56 -0500 Subject: [PATCH 3/4] rest queries of >=, <=, != are now supported --- qmpy/utils/oqmd_optimade/QueryLarkDjangoParser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qmpy/utils/oqmd_optimade/QueryLarkDjangoParser.py b/qmpy/utils/oqmd_optimade/QueryLarkDjangoParser.py index 64acc36e..17a3ea20 100644 --- a/qmpy/utils/oqmd_optimade/QueryLarkDjangoParser.py +++ b/qmpy/utils/oqmd_optimade/QueryLarkDjangoParser.py @@ -41,7 +41,7 @@ def parse(self, filter_): self.filter = filter_ return self.tree except Exception as e: - #print(e) + # print(e) return def __repr__(self): @@ -70,16 +70,16 @@ def gt(self,a,b): return Q(**{a+'__gt':b}) def ge(self,a,b): - return Q(**{a+'__ge':b}) + return Q(**{a+'__gte':b}) def lt(self,a,b): return Q(**{a+'__lt':b}) def le(self,a,b): - return Q(**{a+'__le':b}) + return Q(**{a+'__lte':b}) def ne(self,a,b): - return Q(**{a+'__ne':b}) + return ~Q(**{a:b}) def not_(self,a): return ~a From d8126fd64a5d81b9d3d30ed19b199765e5da160f Mon Sep 17 00:00:00 2001 From: Abhijith Date: Tue, 17 Sep 2019 11:30:25 -0500 Subject: [PATCH 4/4] the filter != is supported for form fields like bandgap, natoms, etc --- qmpy/rester/qmpy_rester.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmpy/rester/qmpy_rester.py b/qmpy/rester/qmpy_rester.py index adb0a7d3..cc71ffaa 100644 --- a/qmpy/rester/qmpy_rester.py +++ b/qmpy/rester/qmpy_rester.py @@ -56,7 +56,7 @@ def get_oqmd_phases(self, verbose=True, **kwargs): if k in kwargs_list: url_args.append('%s=%s' %(k, kwargs[k])) elif k in filter_list: - if '>' in kwargs[k] or '<' in kwargs[k]: + if '>' in kwargs[k] or '<' in kwargs[k] or '!' in kwargs[k]: filter_args.append('%s%s' %(k, kwargs[k])) else: filter_args.append('%s=%s' %(k, kwargs[k]))