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 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 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])) 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