summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e3766f0f02259aa7ab73f9280548d055bf9f8fe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Maintainer: Jakub Klinkovský <lahwaacz at archlinux dot org>
# Contributor: Butui Hu <hot123tea123@gmail.com>

_name=ydata-profiling
pkgname=python-ydata-profiling
pkgver=4.18.1
pkgrel=1
pkgdesc='Create HTML profiling reports from pandas DataFrame objects'
arch=(any)
url='https://github.com/ydataai/ydata-profiling'
license=(MIT)
depends=(
  ipython
  python
  python-dacite
  python-dateutil
  python-filetype
  python-minify-html
  python-imagehash
  python-ipywidgets
  python-jinja
  python-matplotlib
  python-markupsafe
  python-multimethod
  python-networkx
  python-numba
  python-numpy
  python-packaging
  python-pandas
  python-phik
  python-pillow
  python-pydantic
  python-requests
  python-seaborn
  python-scipy
  python-statsmodels
  python-tqdm
  python-typeguard
  python-visions
  python-wordcloud
  python-yaml
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-setuptools-scm
  python-wheel
)
checkdepends=(
  python-pyarrow
  python-pytest
  python-pytest-xdist
)
optdepends=(
  'python-tangled-up-in-unicode: support for more detailed Unicode analysis, at the expense of additional disk space'
)
conflicts=(python-pandas-profiling)
replaces=(python-pandas-profiling)
source=($_name-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz)
b2sums=('170c76a7b8fd9718ac459579297238d1980c4105140c597621309d62ca9093339e595aeb841e39c367815683cd3f80766062a7150d01d47317da82811ca2a902')

prepare() {
  # fix version fallback (the git snapshot does not contain the VERSION file)
  sed -i 's|version = "0.0.dev0"|version = "'$pkgver'"|' $_name-$pkgver/setup.py

  # drop version constraints for setuptools
  sed -i 's|"setuptools>=72.0.0,<80.0.0"|"setuptools"|' $_name-$pkgver/pyproject.toml
  sed -i 's|"setuptools-scm>=8.0.0,<9.0.0"|"setuptools-scm"|' $_name-$pkgver/pyproject.toml
}

build() {
  cd $_name-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  local pytest_options=(
    -vv
    -W ignore::DeprecationWarning
    # skip hanging test
    --deselect tests/unit/test_console.py
    # ModuleNotFoundError: No module named 'scipy.stats._mvn'
    --deselect tests/unit/test_correlations.py::test_compare_report_with_correlation_table
    --deselect tests/unit/test_correlations.py::test_compare_report_without_correlation_table
    --deselect tests/unit/test_correlations.py::test_standard_report_with_correlation_table
    --deselect tests/unit/test_correlations.py::test_standard_report_without_correlation_table
    --deselect tests/unit/test_modular.py::test_modular_present
    # Connection to data.nasa.gov timed out. (connect timeout=None)
    --deselect tests/unit/test_example.py::test_example
    # pandas/_libs/arrays.pyx:103: NotImplementedError
    --deselect tests/unit/test_serialize.py::test_load
  )

  cd $_name-$pkgver
  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer dist/*.whl
  test-env/bin/python -m pytest "${pytest_options[@]}" tests/unit
}

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}