Skip to content

Commit 11b7e4b

Browse files
committed
pyproject.toml + poetry [ENG-9692]
1 parent f5b9312 commit 11b7e4b

File tree

8 files changed

+102
-116
lines changed

8 files changed

+102
-116
lines changed

.github/workflows/test_djelme.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,9 @@ jobs:
2626
test:
2727
strategy:
2828
matrix:
29-
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
30-
django: ['1.11', '2.0', '2.1', '2.2', '3.0', '3.1', '3.2', '4.0', '4.1']
29+
python: ['3.8', '3.9', '3.10']
30+
django: ['3.2', '4.1']
3131
# TODO: elasticsearch: ['6', '7', '8', '9']
32-
exclude:
33-
- {python: '3.6', django: '4.0'}
34-
- {python: '3.6', django: '4.1'}
35-
- {python: '3.7', django: '4.0'}
36-
- {python: '3.7', django: '4.1'}
37-
- {python: '3.10', django: '1.11'}
38-
- {python: '3.10', django: '2.0'}
3932
runs-on: ubuntu-20.04
4033
services:
4134
elasticsearch:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Django app for storing time-series metrics in Elasticsearch.
77

88
## Pre-requisites
99

10-
* Python 2.7 or >=3.6
11-
* Django 1.11 or 2.0
10+
* Python >=3.10
11+
* Django 4.2, 5.1, or 5.2
1212
* Elasticsearch 6
1313

1414
## Install

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
depends_on:
1010
- elasticsearch
1111
environment:
12-
TOXENV: py39-django40
12+
TOXENV: py310-django41
1313
ELASTICSEARCH_HOST: elasticsearch:9200
1414
volumes:
1515
- ./:/code:cached

pyproject.toml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
[project]
2+
name = "django-elasticsearch-metrics"
3+
version = "2022.0.6"
4+
description = "Django app for storing time-series metrics in Elasticsearch."
5+
authors = [
6+
{name = "CenterForOpenScience", email = "[email protected]"}
7+
]
8+
readme = "README.md"
9+
license = "MIT"
10+
requires-python = ">=3.10"
11+
keywords = [
12+
"django",
13+
"elastic",
14+
"elasticsearch",
15+
"elasticsearch-dsl",
16+
"time-series",
17+
"metrics",
18+
"statistics",
19+
]
20+
classifiers = [
21+
"Operating System :: OS Independent",
22+
"Programming Language :: Python",
23+
"Programming Language :: Python :: 3",
24+
"Programming Language :: Python :: 3.5",
25+
"Programming Language :: Python :: 3.6",
26+
"Programming Language :: Python :: 3.7",
27+
"Programming Language :: Python :: 3.8",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Framework :: Django",
31+
"Framework :: Django :: 1.11",
32+
"Framework :: Django :: 2.0",
33+
"Framework :: Django :: 2.1",
34+
"Framework :: Django :: 2.2",
35+
"Framework :: Django :: 3.0",
36+
"Framework :: Django :: 3.1",
37+
"Framework :: Django :: 3.2",
38+
"Framework :: Django :: 4.0",
39+
"Framework :: Django :: 4.1",
40+
"Environment :: Web Environment",
41+
"Intended Audience :: Developers",
42+
"Topic :: Internet :: WWW/HTTP",
43+
"Topic :: Software Development :: Libraries :: Python Modules",
44+
]
45+
dependencies = [
46+
"elasticsearch6-dsl>=6.3.0,<7.0.0",
47+
]
48+
49+
[project.urls]
50+
repository = "http://github.com/CenterForOpenScience/django-elasticsearch-metrics"
51+
changelog = "https://github.com/CenterForOpenScience/django-elasticsearch-metrics/blob/master/CHANGELOG.md"
52+
53+
[dependency-groups]
54+
tests = [
55+
"pytest",
56+
"mock",
57+
"pytest-django==3.10.0",
58+
"factory-boy==2.11.1",
59+
]
60+
lint = [
61+
"flake8==5.0.4",
62+
'flake8-bugbear==18.8.0; python_version >= "3.5"',
63+
"pre-commit==2.17.0",
64+
]
65+
dev = [
66+
{ include-group = "tests" },
67+
{ include-group = "lint" },
68+
"konch>=3.0.0",
69+
"tox",
70+
]
71+
72+
[tool.poetry.group.tests]
73+
optional = true
74+
75+
[tool.poetry.group.lint]
76+
optional = true
77+
78+
[tool.poetry.group.dev]
79+
optional = true
80+
81+
[tool.poetry]
82+
packages = [
83+
{ include = "elasticsearch_metrics" }
84+
]
85+
86+
[build-system]
87+
requires = ["poetry-core>=2.0.0,<3.0.0"]
88+
build-backend = "poetry.core.masonry.api"

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[metadata]
2-
license_file = LICENSE
3-
41
[bdist_wheel]
52
universal=1
63

setup.py

Lines changed: 0 additions & 96 deletions
This file was deleted.

testbox.Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
FROM python:3.9-slim as testbox
1+
FROM python:3.10-slim as testbox
2+
3+
RUN pip install poetry==2.2.1
24

35
RUN mkdir -p /code
46
WORKDIR /code
57
COPY ./ /code
8+
RUN poetry install --with dev
69

7-
RUN pip install .[dev]
8-
9-
CMD ["tox"]
10+
CMD ["poetry", "run", "tox"]

tox.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ envlist =
55

66
[testenv]
77
passenv=ELASTICSEARCH_HOST
8-
extras = tests
8+
dependency_groups =
9+
tests
910
deps =
1011
django111: Django>=1.11,<1.12
1112
django20: Django>=2.0,<2.1
@@ -18,6 +19,8 @@ deps =
1819
django41: Django>=4.1,<4.2
1920
commands=
2021
pytest {posargs}
22+
allowlist_externals =
23+
pytest
2124

2225
; NOTE: pre-commit runs both black and flake8
2326
[testenv:lint]

0 commit comments

Comments
 (0)