toolsos 0.3.2__tar.gz → 0.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {toolsos-0.3.2 → toolsos-0.3.3}/PKG-INFO +1 -1
- {toolsos-0.3.2 → toolsos-0.3.3}/pyproject.toml +6 -12
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/tables/tables.py +1 -1
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos.egg-info/PKG-INFO +1 -1
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos.egg-info/SOURCES.txt +1 -2
- toolsos-0.3.2/tests/test_tables.py +0 -56
- {toolsos-0.3.2 → toolsos-0.3.3}/README.md +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/setup.cfg +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/__init__.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/cbs_tools.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/create_tables.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/database/database_connection.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/database/database_transfer.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/download.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/geo.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/helpers.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/__init__.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/colors.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/graphs/__init__.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/graphs/bargraph.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/graphs/graph_styles.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/graphs/linegraph.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/graphs/piegraph.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/graphs/styler.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/maps/__init__.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/maps/choropleth.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/tables/__init__.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/tables/table_helpers.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/huisstijl/tables/table_styles.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos/polars_helpers.py +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos.egg-info/dependency_links.txt +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos.egg-info/requires.txt +0 -0
- {toolsos-0.3.2 → toolsos-0.3.3}/src/toolsos.egg-info/top_level.txt +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# pyproject.toml
|
|
2
2
|
|
|
3
3
|
[build-system]
|
|
4
|
-
requires
|
|
4
|
+
requires = ["setuptools>=61.0.0", "wheel"]
|
|
5
5
|
build-backend = "setuptools.build_meta"
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "toolsos"
|
|
9
|
-
version = "0.3.
|
|
9
|
+
version = "0.3.3"
|
|
10
10
|
description = "OS tools"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
authors = [{ name = "OS", email = "d.schmitz@amsterdam.nl" }]
|
|
@@ -28,17 +28,11 @@ dependencies = []
|
|
|
28
28
|
requires-python = ">=3.10"
|
|
29
29
|
|
|
30
30
|
[project.optional-dependencies]
|
|
31
|
-
dev = [
|
|
32
|
-
"black",
|
|
33
|
-
"bumpver",
|
|
34
|
-
"isort",
|
|
35
|
-
"pip-tools",
|
|
36
|
-
"pytest"
|
|
37
|
-
]
|
|
31
|
+
dev = ["black", "bumpver", "isort", "pip-tools", "pytest"]
|
|
38
32
|
|
|
39
33
|
all = [
|
|
40
34
|
"keyring",
|
|
41
|
-
"openpyxl",
|
|
35
|
+
"openpyxl",
|
|
42
36
|
"pandas",
|
|
43
37
|
"plotly",
|
|
44
38
|
"polars",
|
|
@@ -48,8 +42,8 @@ all = [
|
|
|
48
42
|
"requests",
|
|
49
43
|
"sqlalchemy",
|
|
50
44
|
"geopandas",
|
|
51
|
-
"ipykernel"
|
|
52
|
-
|
|
45
|
+
"ipykernel",
|
|
46
|
+
]
|
|
53
47
|
|
|
54
48
|
# [project.urls]
|
|
55
49
|
#Homepage = ""
|
|
@@ -27,5 +27,4 @@ src/toolsos/huisstijl/maps/choropleth.py
|
|
|
27
27
|
src/toolsos/huisstijl/tables/__init__.py
|
|
28
28
|
src/toolsos/huisstijl/tables/table_helpers.py
|
|
29
29
|
src/toolsos/huisstijl/tables/table_styles.py
|
|
30
|
-
src/toolsos/huisstijl/tables/tables.py
|
|
31
|
-
tests/test_tables.py
|
|
30
|
+
src/toolsos/huisstijl/tables/tables.py
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import openpyxl
|
|
2
|
-
import pandas as pd
|
|
3
|
-
import pytest
|
|
4
|
-
|
|
5
|
-
from toolsos.huisstijl.tables.tables import write_table, write_table_from_dict
|
|
6
|
-
|
|
7
|
-
DATA = [["Noord", 1, 0.25], ["Zuid", 3, 0.75]]
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
COLUMNS = ["stadsdeel", "bewoners", "perc_bewoners"]
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@pytest.fixture(scope="class")
|
|
14
|
-
def workbook(data=DATA, columns=COLUMNS):
|
|
15
|
-
df1 = pd.DataFrame(data=DATA, columns=COLUMNS)
|
|
16
|
-
|
|
17
|
-
filename = "temp/singe_table.xlsx"
|
|
18
|
-
write_table(
|
|
19
|
-
df1, file=filename, header_row=0, perc_pattern="perc_bewoners", style="new"
|
|
20
|
-
)
|
|
21
|
-
return openpyxl.load_workbook(filename)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class TestTable:
|
|
25
|
-
@pytest.fixture(autouse=True)
|
|
26
|
-
def setup(self, workbook):
|
|
27
|
-
self.workbook = workbook
|
|
28
|
-
self.ws = workbook.active
|
|
29
|
-
|
|
30
|
-
def test_data(self, data=DATA):
|
|
31
|
-
rows = [[c.value for c in row] for row in self.ws.iter_rows(2)]
|
|
32
|
-
|
|
33
|
-
assert all(src == written for src, written in zip(DATA, rows))
|
|
34
|
-
|
|
35
|
-
def test_data_header(self):
|
|
36
|
-
header = [[c.value for c in row] for row in self.ws.iter_rows(2)]
|
|
37
|
-
|
|
38
|
-
assert all(src == written for src, written in zip(DATA, header))
|
|
39
|
-
|
|
40
|
-
def test_background_color_header(self):
|
|
41
|
-
header_color = [
|
|
42
|
-
[c.fill.fgColor.value for c in row] for row in self.ws.iter_rows(max_row=1)
|
|
43
|
-
]
|
|
44
|
-
|
|
45
|
-
assert all([[c == "004699" for c in row] for row in header_color])
|
|
46
|
-
|
|
47
|
-
# def test_text_color_header(self):
|
|
48
|
-
# header_text_color = [[c.font.color.value for in row] in self.ws]
|
|
49
|
-
|
|
50
|
-
def test_formatting(self):
|
|
51
|
-
perc_values = [
|
|
52
|
-
[c.number_format for c in row]
|
|
53
|
-
for row in self.ws.iter_rows(min_row=2, min_col=3)
|
|
54
|
-
]
|
|
55
|
-
|
|
56
|
-
all([[c == "'0.0%'" for c in row] for row in perc_values])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|