mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
Drop Python 3.8 support and introduce Python 3.12 CI/CD (#743)
This commit is contained in:
parent
f99adce23f
commit
9b5badb941
@ -35,10 +35,10 @@ steps:
|
|||||||
matrix:
|
matrix:
|
||||||
setup:
|
setup:
|
||||||
python:
|
python:
|
||||||
|
- '3.12'
|
||||||
- '3.11'
|
- '3.11'
|
||||||
- '3.10'
|
- '3.10'
|
||||||
- '3.9'
|
- '3.9'
|
||||||
- '3.8'
|
|
||||||
stack:
|
stack:
|
||||||
- '8.16.0-SNAPSHOT'
|
- '8.16.0-SNAPSHOT'
|
||||||
- '8.15.2'
|
- '8.15.2'
|
||||||
|
@ -9,3 +9,6 @@ python:
|
|||||||
install:
|
install:
|
||||||
- path: .
|
- path: .
|
||||||
- requirements: docs/requirements-docs.txt
|
- requirements: docs/requirements-docs.txt
|
||||||
|
|
||||||
|
sphinx:
|
||||||
|
configuration: docs/sphinx/conf.py
|
||||||
|
@ -203,7 +203,7 @@ currently using a minimum version of PyCharm 2019.2.4.
|
|||||||
* To test specific versions of Python run
|
* To test specific versions of Python run
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
> nox -s test-3.8
|
> nox -s test-3.12
|
||||||
```
|
```
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
@ -53,8 +53,8 @@ $ conda install -c conda-forge eland
|
|||||||
|
|
||||||
### Compatibility
|
### Compatibility
|
||||||
|
|
||||||
- Supports Python 3.8, 3.9, 3.10, 3.11 and Pandas 1.5
|
- Supports Python 3.9, 3.10, 3.11, 3.12 and Pandas 1.5
|
||||||
- Supports Elasticsearch clusters that are 7.11+, recommended 8.13 or later for all features to work.
|
- Supports Elasticsearch 8+ clusters, recommended 8.16 or later for all features to work.
|
||||||
If you are using the NLP with PyTorch feature make sure your Eland minor version matches the minor
|
If you are using the NLP with PyTorch feature make sure your Eland minor version matches the minor
|
||||||
version of your Elasticsearch cluster. For all other features it is sufficient for the major versions
|
version of your Elasticsearch cluster. For all other features it is sufficient for the major versions
|
||||||
to match.
|
to match.
|
||||||
|
@ -8,8 +8,8 @@ Source code is available on https://github.com/elastic/eland[GitHub].
|
|||||||
[discrete]
|
[discrete]
|
||||||
=== Compatibility
|
=== Compatibility
|
||||||
|
|
||||||
- Supports Python 3.8+ and Pandas 1.5
|
- Supports Python 3.9+ and Pandas 1.5
|
||||||
- Supports {es} clusters that are 7.11+, recommended 7.14 or later for all features to work.
|
- Supports {es} 8+ clusters, recommended 8.16 or later for all features to work.
|
||||||
Make sure your Eland major version matches the major version of your Elasticsearch cluster.
|
Make sure your Eland major version matches the major version of your Elasticsearch cluster.
|
||||||
|
|
||||||
The recommended way to set your requirements in your `setup.py` or
|
The recommended way to set your requirements in your `setup.py` or
|
||||||
|
@ -200,7 +200,7 @@ Configuring PyCharm And Running Tests
|
|||||||
- To test specific versions of Python run
|
- To test specific versions of Python run
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
nox -s test-3.8
|
nox -s test-3.12
|
||||||
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
|
@ -1090,9 +1090,5 @@ def elasticsearch_model_id(model_id: str) -> str:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
id = re.sub(r"[\s\\/]", "__", model_id).lower()[-64:]
|
id = re.sub(r"[\s\\/]", "__", model_id).lower()[-64:]
|
||||||
if id.startswith("__"):
|
id = id.removeprefix("__")
|
||||||
# This check is only needed as long as Eland supports Python 3.8
|
|
||||||
# str.removeprefix was introduced in Python 3.9 and can be used
|
|
||||||
# once 3.8 support is dropped
|
|
||||||
id = id[2:]
|
|
||||||
return id
|
return id
|
||||||
|
@ -61,7 +61,7 @@ def format(session):
|
|||||||
session.install("black", "isort", "flynt")
|
session.install("black", "isort", "flynt")
|
||||||
session.run("python", "utils/license-headers.py", "fix", *SOURCE_FILES)
|
session.run("python", "utils/license-headers.py", "fix", *SOURCE_FILES)
|
||||||
session.run("flynt", *SOURCE_FILES)
|
session.run("flynt", *SOURCE_FILES)
|
||||||
session.run("black", "--target-version=py38", *SOURCE_FILES)
|
session.run("black", "--target-version=py39", *SOURCE_FILES)
|
||||||
session.run("isort", "--profile=black", *SOURCE_FILES)
|
session.run("isort", "--profile=black", *SOURCE_FILES)
|
||||||
lint(session)
|
lint(session)
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ def lint(session):
|
|||||||
session.install("black", "flake8", "mypy", "isort", "numpy")
|
session.install("black", "flake8", "mypy", "isort", "numpy")
|
||||||
session.install(".")
|
session.install(".")
|
||||||
session.run("python", "utils/license-headers.py", "check", *SOURCE_FILES)
|
session.run("python", "utils/license-headers.py", "check", *SOURCE_FILES)
|
||||||
session.run("black", "--check", "--target-version=py38", *SOURCE_FILES)
|
session.run("black", "--check", "--target-version=py39", *SOURCE_FILES)
|
||||||
session.run("isort", "--check", "--profile=black", *SOURCE_FILES)
|
session.run("isort", "--check", "--profile=black", *SOURCE_FILES)
|
||||||
session.run("flake8", "--extend-ignore=E203,E402,E501,E704,E712", *SOURCE_FILES)
|
session.run("flake8", "--extend-ignore=E203,E402,E501,E704,E712", *SOURCE_FILES)
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ def lint(session):
|
|||||||
session.error("\n" + "\n".join(sorted(set(errors))))
|
session.error("\n" + "\n".join(sorted(set(errors))))
|
||||||
|
|
||||||
|
|
||||||
@nox.session(python=["3.8", "3.9", "3.10", "3.11"])
|
@nox.session(python=["3.9", "3.10", "3.11", "3.12"])
|
||||||
@nox.parametrize("pandas_version", ["1.5.0"])
|
@nox.parametrize("pandas_version", ["1.5.0"])
|
||||||
def test(session, pandas_version: str):
|
def test(session, pandas_version: str):
|
||||||
session.install("-r", "requirements-dev.txt")
|
session.install("-r", "requirements-dev.txt")
|
||||||
|
4
setup.py
4
setup.py
@ -38,10 +38,10 @@ CLASSIFIERS = [
|
|||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3 :: Only",
|
"Programming Language :: Python :: 3 :: Only",
|
||||||
"Programming Language :: Python :: 3.8",
|
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
|
"Programming Language :: Python :: 3.12",
|
||||||
"Topic :: Scientific/Engineering",
|
"Topic :: Scientific/Engineering",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ setup(
|
|||||||
entry_points={
|
entry_points={
|
||||||
"console_scripts": "eland_import_hub_model=eland.cli.eland_import_hub_model:main"
|
"console_scripts": "eland_import_hub_model=eland.cli.eland_import_hub_model:main"
|
||||||
},
|
},
|
||||||
python_requires=">=3.8,<3.12",
|
python_requires=">=3.9,<3.13",
|
||||||
package_data={"eland": ["py.typed"]},
|
package_data={"eland": ["py.typed"]},
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user