Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make NumPy requirement py version-specific #1036

Merged
merged 3 commits into from
Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/getting_started/filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This guide will briefly outline how to parse OPTIMADE filter strings into databa

## Parsing OPTIMADE filter strings

The [`LarkParser`][optimade.filterparser.LarkParser] class will take an OPTIMADE filter string, supplied by the user, and parse it into a `lark.Tree` instance.
The [`LarkParser`][optimade.filterparser.lark_parser.LarkParser] class will take an OPTIMADE filter string, supplied by the user, and parse it into a `lark.Tree` instance.

Example use:

Expand Down Expand Up @@ -68,7 +68,7 @@ filter

## Flow for parsing a user-supplied filter and converting to a backend query

After the [`LarkParser`][optimade.filterparser.LarkParser] has turned the filter string into a `lark.Tree`, it is fed to a `lark.Transformer` instance, which transforms the 'lark.Tree' into a backend-specific representation of the query.
After the [`LarkParser`][optimade.filterparser.lark_parser.LarkParser] has turned the filter string into a `lark.Tree`, it is fed to a `lark.Transformer` instance, which transforms the 'lark.Tree' into a backend-specific representation of the query.
For example, [`MongoTransformer`][optimade.filtertransformers.mongo.MongoTransformer] will turn the tree into something useful for a MongoDB backend:

```python
Expand Down
2 changes: 1 addition & 1 deletion optimade/filterparser/lark_parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""This submodule implements the [`LarkParser`][optimade.filterparser.LarkParser] class,
"""This submodule implements the [`LarkParser`][optimade.filterparser.lark_parser.LarkParser] class,
which uses the lark library to parse filter strings with a defined OPTIMADE filter grammar
into `Lark.Tree` objects for use by the filter transformers.
Expand Down
3 changes: 2 additions & 1 deletion requirements-client.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
aiida-core==1.6.5
ase==3.22.1
jarvis-tools==2021.10.3
numpy==1.21.5
numpy==1.21.5;python_version<'3.8'
numpy==1.22.0;python_version>='3.8'
pymatgen==2022.0.16