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

Update lark #110

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.8', '3.9', '3.10']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python 3.8 reached end-of-life, is it safe to keep and support it?

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Before submitting a bug, please do the following:

Make sure your report gets the attention it deserves: bug reports with missing information may be ignored or punted back to you, delaying a fix. The below constitutes a bare minimum; more info is almost always better:

* __What version of Python are you using?__ For example, are you using Python 2.7, Python 3.7, PyPy 2.0?
* __What version of Python are you using?__ For example, are you using Python 3.8+, PyPy 2.0?
* __What operating system are you using?__ Windows (7, 8, 10, 32-bit, 64-bit), Mac OS X, (10.7.4, 10.9.0), GNU/Linux (which distribution, which version?) Again, more detail is better.
* __Which version or versions of the software are you using?__ Ideally, you've followed the advice above and are on the latest version, but please confirm this.
* __How can the we recreate your problem?__ Imagine that we have never used pygeofilter before and have downloaded it for the first time. Exactly what steps do we need to take to reproduce your problem?
Expand Down
3 changes: 2 additions & 1 deletion pygeofilter/parsers/cql2_text/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
logger.setLevel(logging.DEBUG)


@v_args(inline=True)
@v_args(meta=False, inline=True)
class CQLTransformer(WKTTransformer, ISO8601Transformer):
def and_(self, *args):
return ast.And.from_items(*args)
Expand Down Expand Up @@ -202,6 +202,7 @@ def interval(self, start, end):
rel_to=__file__,
parser="lalr",
debug=True,
maybe_placeholders=False,
transformer=CQLTransformer(),
import_paths=[os.path.dirname(os.path.dirname(__file__))],
)
Expand Down
3 changes: 2 additions & 1 deletion pygeofilter/parsers/ecql/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}


@v_args(inline=True)
@v_args(meta=False, inline=True)
class ECQLTransformer(WKTTransformer, ISO8601Transformer):
def and_(self, lhs, rhs):
return ast.And(lhs, rhs)
Expand Down Expand Up @@ -201,6 +201,7 @@ def envelope(self, x1, x2, y1, y2):
rel_to=__file__,
parser="lalr",
debug=True,
maybe_placeholders=False,
transformer=ECQLTransformer(),
import_paths=[os.path.dirname(os.path.dirname(__file__))],
)
Expand Down
2 changes: 1 addition & 1 deletion pygeofilter/parsers/iso8601.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from ..util import parse_datetime, parse_duration


@v_args(inline=True)
@v_args(meta=False, inline=True)
class ISO8601Transformer(Transformer):
def DATETIME(self, dt):
return parse_datetime(dt)
Expand Down
2 changes: 1 addition & 1 deletion pygeofilter/parsers/wkt.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from lark import Transformer, v_args


@v_args(inline=True)
@v_args(meta=False, inline=True)
class WKTTransformer(Transformer):
def wkt__geometry_with_srid(self, srid, geometry):
print(srid, geometry)
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
install_requires=(
[
"dateparser",
"lark<1.0",
"lark",
"pygeoif>=1.0.0",
"dataclasses;python_version<'3.7'",
]
Expand All @@ -76,10 +76,11 @@
"Intended Audience :: Developers",
"Topic :: Scientific/Engineering :: GIS",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
tests_require=["pytest"],
)
Loading