-
Notifications
You must be signed in to change notification settings - Fork 4
Migrate to pyproject.toml and hatchling #6
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
Changes from 11 commits
4456a12
9501d8c
cb2b023
4f0c1d6
18bfb72
9801cc9
55e4190
105e571
9b51c74
e49b7a8
96e5519
f108a36
16c972f
b5600f9
f2e091d
177e9ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
--- | ||
version: 2 | ||
sphinx: | ||
configuration: docs/sphinx/conf.py | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.10" | ||
jobs: | ||
pre_install: | ||
- "python -m pip install sphinx-rtd-theme sphinx-autodoc-typehints" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this really needed since those dependencies are now in docs extra requirements? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wondered what was going and investigated too to be able to tell when we can drop the pins. As you've noticed, the root cause is that the two sphinx packages that we install currently require incompatible versions of Sphinx:
Then pip considers that the plugin "at fault" is sphinx-rtd-theme. I'm not sure how the resolver works, maybe it's the only package that does not support Sphinx 7. Anyway, pip then tries to find a version that does in fact support Sphinx 7:
Since sphinx-rtd-theme 0.5.1 is the latest release without bounds, pip considers that it does support Sphinx 7. And then installs it. This is something we are likely to continue seeing in the future, given:
I can see two ways out of this issue:
I think I prefer the second approach. Although it does not have to block the pull request, we can do this later as this pull request is otherwise ready to be merged IMO. |
||
|
||
python: | ||
version: "3.7" | ||
pquentin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
install: | ||
- requirements: dev-requirements.txt | ||
- path: . | ||
extra_requirements: | ||
- "docs" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "elasticsearch-serverless" | ||
version = "0.1.0" | ||
description = "Python client for Elasticsearch Serverless" | ||
readme = "README.rst" | ||
license = "Apache-2.0" | ||
requires-python = ">=3.7, <4" | ||
authors = [ | ||
{ name = "Elastic Clients Team", email = "[email protected]" }, | ||
] | ||
maintainers = [ | ||
{ name = "Elastic Clients Team", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
] | ||
keywords = [ | ||
"elasticsearch", | ||
"elastic", | ||
"kibana", | ||
"mapping", | ||
"REST", | ||
"search", | ||
"client", | ||
"index", | ||
] | ||
dependencies = [ | ||
"elastic-transport>=8,<9", | ||
] | ||
|
||
[project.optional-dependencies] | ||
async = [ | ||
"aiohttp>=3,<4", | ||
] | ||
requests = [ | ||
"requests>=2.4.0, <3.0.0", | ||
] | ||
dev = [ | ||
"requests>=2, <3", | ||
"aiohttp", | ||
"pytest", | ||
"pytest-cov", | ||
"pytest-asyncio", | ||
"coverage", | ||
"jinja2", | ||
"python-dateutil", | ||
"unasync", | ||
"pyyaml>=5.4", | ||
"isort", | ||
"black", | ||
"twine", | ||
"build", | ||
"nox", | ||
"numpy", | ||
"pandas", | ||
"mapbox-vector-tile", | ||
] | ||
docs = [ | ||
"sphinx-rtd-theme", | ||
"sphinx-autodoc-typehints", | ||
"sphinx", | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://elasticsearch-serverless-python.readthedocs.io" | ||
Homepage = "https://github.com/elastic/elasticsearch-serverless-python" | ||
"Issue Tracker" = "https://github.com/elastic/elasticsearch-serverless-python/issues" | ||
"Source Code" = "https://github.com/elastic/elasticsearch-serverless-python" | ||
|
||
[tool.hatch.build.targets.sdist] | ||
include = [ | ||
"/elasticsearch_serverless", | ||
] | ||
|
||
[tool.pytest] | ||
junit_family = "legacy" | ||
addopts = "-vvv -p no:logging --cov-report=term-missing --cov=elasticsearch_serverless --cov-config=.pyproject.toml" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"raise NotImplementedError*", | ||
] | ||
|
||
[tool.mypy] | ||
ignore_missing_imports = true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,2 @@ | ||
[flake8] | ||
ignore = E203, E266, E501, W503 | ||
|
||
[tool:pytest] | ||
junit_family=legacy | ||
addopts = -vvv -p no:logging --cov-report=term-missing --cov=elasticsearch --cov-config=.coveragerc | ||
|
||
[tool:isort] | ||
profile=black | ||
|
||
[report] | ||
exclude_lines= | ||
raise NotImplementedError* | ||
|
||
[mypy] | ||
ignore_missing_imports = True |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.