Skip to content

Commit d00992c

Browse files
committed
update python & django versions
1 parent 19de2ba commit d00992c

File tree

8 files changed

+125
-57
lines changed

8 files changed

+125
-57
lines changed

Diff for: .github/workflows/test.yml

+30-23
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,41 @@ jobs:
1010
TEST_VARIANT: ${{ matrix.variant }}
1111
strategy:
1212
matrix:
13-
python-version: ["3.11", "3.10", "3.9", "3.8"]
14-
django-version: [4.1.7]
15-
drf-version: [3.14.0]
16-
pandas-version: [1.5.3]
13+
python-version: ["3.12", "3.11", "3.10"]
14+
django-version: [5.0.3]
15+
drf-version: [3.15.1]
16+
pandas-version: [2.2.1]
1717
variant: ['']
1818
include:
19-
- python-version: "3.11"
20-
django-version: 4.1.7
21-
drf-version: 3.14.0
22-
pandas-version: 1.5.3
19+
- python-version: "3.12"
20+
django-version: 5.0.3
21+
drf-version: 3.15.1
22+
pandas-version: 2.2.1
2323
variant: matplotlib
24-
- python-version: "3.11"
25-
django-version: 4.1.7
24+
- python-version: "3.12"
25+
django-version: 5.0.3
26+
drf-version: 3.15.1
27+
pandas-version: 2.2.1
28+
variant: django-pandas
29+
- python-version: "3.9"
30+
django-version: 4.2.11
2631
drf-version: 3.14.0
2732
pandas-version: 1.5.3
28-
variant: django-pandas
29-
- python-version: "3.11"
30-
django-version: 3.2.14
31-
drf-version: 3.13.1
33+
variant: ''
34+
- python-version: "3.8"
35+
django-version: 4.2.11
36+
drf-version: 3.14.0
3237
pandas-version: 1.5.3
3338
variant: ''
3439
steps:
35-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v4
3641
- name: Set up Python ${{ matrix.python-version }}
3742
uses: actions/setup-python@v2
3843
with:
3944
python-version: ${{ matrix.python-version }}
4045
- name: Install dependencies
4146
run: |
42-
python -m pip install --upgrade pip
47+
python -m pip install --upgrade pip setuptools
4348
python -m pip install build
4449
python -m pip install flake8 wheel
4550
python -m pip install django==${{ matrix.django-version }}
@@ -69,22 +74,22 @@ jobs:
6974
PACKAGE: ${{ matrix.package }}
7075
strategy:
7176
matrix:
72-
python-version: ["3.11"]
73-
node-version: [18]
77+
python-version: ["3.12"]
78+
node-version: [20]
7479
package:
7580
- pandas
7681
- chart
7782
- analyst
7883
steps:
79-
- uses: actions/checkout@v2
84+
- uses: actions/checkout@v4
8085
with:
8186
fetch-depth: 0
8287
- name: Set up Node ${{ matrix.node-version }}
83-
uses: actions/setup-node@v2
88+
uses: actions/setup-node@v4
8489
with:
8590
node-version: ${{ matrix.node-version }}
8691
- name: Set up Python ${{ matrix.python-version }}
87-
uses: actions/setup-python@v2
92+
uses: actions/setup-python@v5
8893
with:
8994
python-version: ${{ matrix.python-version }}
9095
- name: Install dependencies
@@ -97,11 +102,13 @@ jobs:
97102
run: |
98103
cd packages/$PACKAGE
99104
npm run test
100-
- uses: smartsquaregmbh/delete-old-packages@v0.4.0
105+
- uses: smartsquaregmbh/delete-old-packages@v0.8.0
101106
if: github.event_name == 'push'
102107
with:
103-
keep: 5
108+
type: npm
109+
organization: wq
104110
names: ${{ matrix.package }}
111+
keep: 5
105112
- name: Publish to Github Packages
106113
if: github.event_name == 'push'
107114
run: |

Diff for: pyproject.toml

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ authors = [
1111
]
1212
description = "Serves up pandas dataframes via the Django REST Framework for client-side visualizations."
1313
readme = "README.md"
14-
requires-python = ">=3.7"
14+
requires-python = ">=3.8"
1515
license = {text = "MIT"}
1616
classifiers = [
1717
"Development Status :: 5 - Production/Stable",
@@ -20,17 +20,16 @@ classifiers = [
2020
"Natural Language :: English",
2121
"Programming Language :: JavaScript",
2222
"Programming Language :: Python :: 3",
23-
"Programming Language :: Python :: 3.6",
24-
"Programming Language :: Python :: 3.7",
2523
"Programming Language :: Python :: 3.8",
2624
"Programming Language :: Python :: 3.9",
2725
"Programming Language :: Python :: 3.10",
2826
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
2928
"Framework :: Django",
30-
"Framework :: Django :: 3.2",
3129
"Framework :: Django :: 4.0",
3230
"Framework :: Django :: 4.1",
3331
"Framework :: Django :: 4.2",
32+
"Framework :: Django :: 5.0",
3433
"Topic :: Scientific/Engineering :: Information Analysis",
3534
"Topic :: Scientific/Engineering :: Visualization",
3635
]
@@ -58,4 +57,4 @@ include = ["rest_pandas*"]
5857

5958
[tool.setuptools_scm]
6059
write_to = "packages/analyst/src/version.js"
61-
write_to_template = 'export default "{version}";'
60+
write_to_template = 'export default "{version}";'

Diff for: tests/files/multitimeseries.html

+42-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
<head>
55
<title>Multi Time Series</title>
66
<link rel="stylesheet" href="admin/css/base.css">
7-
<link href="admin/css/dark_mode.css" rel="stylesheet">
87

8+
<link rel="stylesheet" href="admin/css/dark_mode.css">
9+
<script src="admin/js/theme.js" defer></script>
910

10-
<link rel="stylesheet" href="admin/css/forms.css" type="text/css">
1111

1212

13+
<link rel="stylesheet" type="text/css" href="admin/css/forms.css">
1314

1415

15-
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
16+
17+
18+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1619
<link rel="stylesheet" href="admin/css/responsive.css">
1720

1821

@@ -21,38 +24,60 @@
2124

2225
<body class=""
2326
data-admin-utc-offset="0">
24-
27+
<a href="#content-start" class="skip-to-content-link">Skip to main content</a>
2528
<!-- Container -->
2629
<div id="container">
2730

2831

2932
<!-- Header -->
3033

31-
<div id="header">
34+
<header id="header">
3235
<div id="branding">
3336

34-
<h1 id="site-name"><a href="/admin">Django administration</a></h1>
37+
<div id="site-name"><a href="/admin">Django administration</a></div>
38+
39+
40+
<button class="theme-toggle">
41+
<div class="visually-hidden theme-label-when-auto">Toggle theme (current theme: auto)</div>
42+
<div class="visually-hidden theme-label-when-light">Toggle theme (current theme: light)</div>
43+
<div class="visually-hidden theme-label-when-dark">Toggle theme (current theme: dark)</div>
44+
<svg aria-hidden="true" class="theme-icon-when-auto">
45+
<use xlink:href="#icon-auto" />
46+
</svg>
47+
<svg aria-hidden="true" class="theme-icon-when-dark">
48+
<use xlink:href="#icon-moon" />
49+
</svg>
50+
<svg aria-hidden="true" class="theme-icon-when-light">
51+
<use xlink:href="#icon-sun" />
52+
</svg>
53+
</button>
54+
55+
3556

3657
</div>
3758

3859

3960

4061

41-
</div>
62+
</header>
4263

4364
<!-- END Header -->
4465

66+
<nav aria-label="Breadcrumbs">
67+
4568
<div class="breadcrumbs">
4669
<a href="/admin">Admin Home</a>
4770
&rsaquo;
4871
Multi Time Series
4972
</div>
5073

74+
</nav>
75+
5176

5277

5378
<div class="main" id="main">
5479

55-
<div class="content">
80+
<main id="content-start" class="content" tabindex="-1">
5681

5782

5883

@@ -155,9 +180,17 @@ <h1 style="flex:1">Multi Time Series</h1>
155180
</div>
156181
<!-- END Content -->
157182
<div id="footer"></div>
158-
</div>
183+
</main>
159184
</div>
160185
</div>
161186
<!-- END Container -->
187+
188+
<!-- SVGs -->
189+
<svg xmlns="http://www.w3.org/2000/svg" class="base-svgs">
190+
<symbol viewBox="0 0 24 24" width="1rem" height="1rem" id="icon-auto"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2V4a8 8 0 1 0 0 16z"/></symbol>
191+
<symbol viewBox="0 0 24 24" width="1rem" height="1rem" id="icon-moon"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol>
192+
<symbol viewBox="0 0 24 24" width="1rem" height="1rem" id="icon-sun"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol>
193+
</svg>
194+
<!-- END SVGs -->
162195
</body>
163196
</html>

Diff for: tests/files/timeseries.html

+42-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
<head>
55
<title>Time Series Custom</title>
66
<link rel="stylesheet" href="admin/css/base.css">
7-
<link href="admin/css/dark_mode.css" rel="stylesheet">
87

8+
<link rel="stylesheet" href="admin/css/dark_mode.css">
9+
<script src="admin/js/theme.js" defer></script>
910

10-
<link rel="stylesheet" href="admin/css/forms.css" type="text/css">
1111

1212

13+
<link rel="stylesheet" type="text/css" href="admin/css/forms.css">
1314

1415

15-
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
16+
17+
18+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1619
<link rel="stylesheet" href="admin/css/responsive.css">
1720

1821

@@ -21,38 +24,60 @@
2124

2225
<body class=""
2326
data-admin-utc-offset="0">
24-
27+
<a href="#content-start" class="skip-to-content-link">Skip to main content</a>
2528
<!-- Container -->
2629
<div id="container">
2730

2831

2932
<!-- Header -->
3033

31-
<div id="header">
34+
<header id="header">
3235
<div id="branding">
3336

34-
<h1 id="site-name"><a href="/admin">Django administration</a></h1>
37+
<div id="site-name"><a href="/admin">Django administration</a></div>
38+
39+
40+
<button class="theme-toggle">
41+
<div class="visually-hidden theme-label-when-auto">Toggle theme (current theme: auto)</div>
42+
<div class="visually-hidden theme-label-when-light">Toggle theme (current theme: light)</div>
43+
<div class="visually-hidden theme-label-when-dark">Toggle theme (current theme: dark)</div>
44+
<svg aria-hidden="true" class="theme-icon-when-auto">
45+
<use xlink:href="#icon-auto" />
46+
</svg>
47+
<svg aria-hidden="true" class="theme-icon-when-dark">
48+
<use xlink:href="#icon-moon" />
49+
</svg>
50+
<svg aria-hidden="true" class="theme-icon-when-light">
51+
<use xlink:href="#icon-sun" />
52+
</svg>
53+
</button>
54+
55+
3556

3657
</div>
3758

3859

3960

4061

41-
</div>
62+
</header>
4263

4364
<!-- END Header -->
4465

66+
<nav aria-label="Breadcrumbs">
67+
4568
<div class="breadcrumbs">
4669
<a href="/admin">Admin Home</a>
4770
&rsaquo;
4871
Time Series Custom
4972
</div>
5073

74+
</nav>
75+
5176

5277

5378
<div class="main" id="main">
5479

55-
<div class="content">
80+
<main id="content-start" class="content" tabindex="-1">
5681

5782

5883

@@ -149,9 +174,17 @@ <h1 style="flex:1">Time Series Custom</h1>
149174
</div>
150175
<!-- END Content -->
151176
<div id="footer"></div>
152-
</div>
177+
</main>
153178
</div>
154179
</div>
155180
<!-- END Container -->
181+
182+
<!-- SVGs -->
183+
<svg xmlns="http://www.w3.org/2000/svg" class="base-svgs">
184+
<symbol viewBox="0 0 24 24" width="1rem" height="1rem" id="icon-auto"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2V4a8 8 0 1 0 0 16z"/></symbol>
185+
<symbol viewBox="0 0 24 24" width="1rem" height="1rem" id="icon-moon"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol>
186+
<symbol viewBox="0 0 24 24" width="1rem" height="1rem" id="icon-sun"><path d="M0 0h24v24H0z" fill="currentColor"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol>
187+
</svg>
188+
<!-- END SVGs -->
156189
</body>
157190
</html>

Diff for: tests/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@
5454

5555
from django import VERSION # noqa
5656

57-
HAS_DJANGO_4 = VERSION[0] == 4
57+
HAS_DJANGO_5 = VERSION[0] == 5

Diff for: tests/test_multi.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from rest_pandas.test import parse_csv
66
from django.core.exceptions import ImproperlyConfigured
77
import os
8-
from .settings import HAS_MATPLOTLIB, HAS_DJANGO_4
8+
from .settings import HAS_MATPLOTLIB, HAS_DJANGO_5
99
import pandas
1010

1111

@@ -62,7 +62,7 @@ def test_multi_series(self):
6262
self.assertEqual(d0["date"], "2015-01-05")
6363
self.assertEqual(d0["value"], 0.3)
6464

65-
@unittest.skipUnless(HAS_DJANGO_4, "requires django 4")
65+
@unittest.skipUnless(HAS_DJANGO_5, "requires django 5")
6666
def test_multi_series_html(self):
6767
response = self.client.get("/multitimeseries.html")
6868
expected = open(
@@ -74,11 +74,7 @@ def test_multi_series_html(self):
7474

7575
def test_multi_scatter(self):
7676
response = self.client.get("/multiscatter.csv")
77-
if pandas.__version__ == "0.20.3":
78-
# FIXME: Remove when dropping Python 3.4 support
79-
header = "date,test1-value,test2-value"
80-
else:
81-
header = ",test1-value,test2-value\ndate,,"
77+
header = ",test1-value,test2-value\ndate,,"
8278
self.assertEqual(
8379
header
8480
+ """

0 commit comments

Comments
 (0)