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

upgrade tests to python 3.8 (instead of 3.6) and elasticsearch to 8.17 (instead of 8.00) #19

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.10']
python-version: ['3.8', '3.10']

steps:
- uses: actions/checkout@v2
Expand All @@ -39,18 +39,18 @@ jobs:
run: |
python test.py --live --coverage

- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
#- name: Coveralls
# uses: AndreMiras/coveralls-python-action@develop
# with:
# parallel: true
# flag-name: Unit Test

elasticsearch-8-unsecured:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.10']
python-version: ['3.8', '3.10']

steps:
- uses: actions/checkout@v2
Expand All @@ -61,12 +61,12 @@ jobs:

- name: Run elasticsearch
run: |
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.0.0
docker pull docker.elastic.co/elasticsearch/elasticsearch-wolfi:8.17.1
docker run -d -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-e "xpack.security.enabled=false" \
-e "action.destructive_requires_name=false" \
docker.elastic.co/elasticsearch/elasticsearch:8.0.0
docker.elastic.co/elasticsearch/elasticsearch-wolfi:8.17.1

- name: Install dependencies
run: |
Expand All @@ -77,8 +77,8 @@ jobs:
run: |
python test.py --live --coverage

- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
#- name: Coveralls
# uses: AndreMiras/coveralls-python-action@develop
# with:
# parallel: true
# flag-name: Unit Test
3 changes: 2 additions & 1 deletion definition/markd.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from mistletoe import Document, BaseRenderer
from mistletoe import Document, block_token
from mistletoe.base_renderer import BaseRenderer


def parse_markdown(text: str):
Expand Down
33 changes: 17 additions & 16 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
elasticsearch>=7.10.1
PyYAML>=5.3.1
mistletoe>=0.7.2
tqdm>=4.55.1
pandas>=1.1.5
PyYAML>=6.0.2
mistletoe>=1.4.0
tqdm>=4.67.1
pandas>=2.0.3
jupyter>=1.0.0
matplotlib>=3.3.3
seaborn>=0.11.1
plotly>=4.14.3
Shapely>=1.7.1
geopandas>=0.8.2
matplotlib>=3.7.5
seaborn>=0.13.2
scipy>=1.10.1
plotly>=5.24.1
shapely>=2.0.6
geopandas>=0.13.2

# test utils
coverage>=5.3.1
coveralls>=3.0.0
coverage>=7.6.1
coveralls>=4.0.1

# for doc-tests
Sphinx>=3.4.3
sphinx-rtd-theme>=0.5.1
docutils>=0.16
# for generate-doc tests
Sphinx>=7.1.2
sphinx-rtd-theme>=3.0.2
docutils>=0.20.1

# for pre-commit hook
pre-commit>=2.17.0
pre-commit>=3.5.0
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_packages():
packages=get_packages(),
zip_safe=False,
keywords="elasticsearch aggregation pandas dataframe backend",
python_requires='>=3.3, <4',
python_requires='>=3.8, <4',
install_requires=[
'elasticsearch>=7.10.1',
],
Expand All @@ -64,11 +64,9 @@ def get_packages():
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'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',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Database :: Front-Ends',
'Topic :: Scientific/Engineering :: Information Analysis',
Expand Down
10 changes: 10 additions & 0 deletions tests/mock_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ def __init__(self):
self._client = FakeClient(self)
self.bulk_calls = []
self.search_calls = []
try:
from elasticsearch._otel import OpenTelemetry
self._otel = OpenTelemetry()
except ImportError:
pass

def exists(self, index, id):
return False
Expand Down Expand Up @@ -123,6 +128,11 @@ class FakeClient:
def __init__(self, parent):
self.parent = parent
self.transport = Transport(parent)
try:
from elasticsearch._otel import OpenTelemetry
self._otel = OpenTelemetry()
except ImportError:
pass

def bulk(self, *args, **kwargs):
self.parent.bulk_calls.append([
Expand Down
Loading