gnu: python-plotnine: Update to 0.14.5.

* gnu/packages/python-science.scm (python-plotnine): Update to 0.14.5.
[arguments]: Disable more image tests; add phase 'pretend-version.

Change-Id: I7ba5cc47ff93187785b0d8c2f5e294e0d08c9f54
This commit is contained in:
Ricardo Wurmus 2025-02-15 21:53:01 +01:00
parent 9c540ceefd
commit f1d34da912
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -3107,7 +3107,7 @@ aggregated sum and more.")
(define-public python-plotnine (define-public python-plotnine
(package (package
(name "python-plotnine") (name "python-plotnine")
(version "0.10.1") (version "0.14.5")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
@ -3116,7 +3116,7 @@ aggregated sum and more.")
(commit (string-append "v" version)))) (commit (string-append "v" version))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "0lg53wcm00lj8zbb4q9yj4a0n0fqaqq7c7vj18bda0k56gg0fpwl")))) (base32 "02ph0h312qn5a9ivh2qhv0x9sybccgbidzvb8im1hikwcqp8v2fw"))))
(build-system pyproject-build-system) (build-system pyproject-build-system)
(arguments (arguments
(list (list
@ -3124,64 +3124,77 @@ aggregated sum and more.")
;; XXX: Check for any new failing tests during next update cycle. ;; XXX: Check for any new failing tests during next update cycle.
;; These all fail because the images are considered to be too different, ;; These all fail because the images are considered to be too different,
;; though they really do look fine. ;; though they really do look fine.
'(list "-k" ;; See https://github.com/has2k1/plotnine/issues/627
(string-append "not TestThemes" `(list ,@(map (lambda (file) (string-append "--ignore=" file))
(string-join (list (list "tests/test_aes.py"
;; Image tests "tests/test_annotation_logticks.py"
"test_adjust_text" "tests/test_coords.py"
"test_annotation_logticks_coord_flip_discrete" "tests/test_facet_labelling.py"
"test_annotation_logticks_faceting" "tests/test_facets.py"
"test_arrow" "tests/test_geom_bar_col_histogram.py"
"test_aslabeller_dict_0tag" "tests/test_geom_bin_2d.py"
"test_caption_simple" "tests/test_geom_boxplot.py"
"test_continuous_x" "tests/test_geom_count.py"
"test_continuous_x_fullrange" "tests/test_geom_density_2d.py"
"test_coord_trans_backtransforms" "tests/test_geom_density.py"
"test_coord_trans_se_false" "tests/test_geom_dotplot.py"
"test_custom_shape" "tests/test_geom_freqpoly.py"
"test_datetime_scale_limits" "tests/test_geom_map.py"
"test_dir_v_ncol" "tests/test_geom_path_line_step.py"
"test_discrete_x" "tests/test_geom_point.py"
"test_discrete_x_fullrange" "tests/test_geom_raster.py"
"test_facet_grid_drop_false" "tests/test_geom_rect_tile.py"
"test_facet_grid_expression" "tests/test_geom_ribbon_area.py"
"test_facet_grid_space_ratios" "tests/test_geom_sina.py"
"test_facet_wrap" "tests/test_geom_smooth.py"
"test_facet_wrap_expression" "tests/test_geom_text_label.py"
"test_facet_wrap_label_both" "tests/test_geom_violin.py"
"test_label_context_wrap2vars" "tests/test_layout.py"
"test_labeller_cols_both_grid" "tests/test_position.py"
"test_labeller_cols_both_wrap" "tests/test_qplot.py"
"test_labeller_towords" "tests/test_scale_internals.py"
"test_missing_data_discrete_scale" "tests/test_scale_labelling.py"
"test_ribbon_facetting" "tests/test_stat_ecdf.py"
"test_stack_non_linear_scale" "tests/test_stat_function.py"
"test_uneven_num_of_lines" "tests/test_stat_summary.py"
"tests/test_theme.py"))
;; This triggers an unexpected but harmless "-k"
;; warning. (string-append "not "
"test_save_method" (string-join
(list
;; Missing optional modules ;; This triggers an unexpected but harmless
"test_non_linear_smooth" ;; warning.
"test_non_linear_smooth_no_ci") "test_save_method"
" and not " ;; This test fails to set the locale.
'prefix))) "test_no_after_scale_warning"
#:phases '(modify-phases %standard-phases ;; Missing optional modules
(add-before 'check 'pre-check "test_non_linear_smooth"
(lambda* (#:key inputs outputs #:allow-other-keys) "test_non_linear_smooth_no_ci")
;; The data files are referenced by the tests but they are not " and not "
;; installed. 'infix)))
(copy-recursively "plotnine/data" #:phases
(string-append (site-packages inputs #~(modify-phases %standard-phases
outputs) (add-before 'build 'pretend-version
"/plotnine/data")) ;; The version string is usually derived via setuptools-scm, but
;; Matplotlib needs to be able to write its configuration file ;; without the git metadata available, the version string is set to
;; somewhere. ;; '999'.
(setenv "MPLCONFIGDIR" "/tmp") (lambda _
(setenv "TZ" "UTC") (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
(setenv "TZDIR" (add-before 'check 'pre-check
(search-input-directory inputs "share/zoneinfo"))))))) (lambda* (#:key inputs outputs #:allow-other-keys)
;; The data files are referenced by the tests but they are not
;; installed.
(copy-recursively "plotnine/data"
(string-append (site-packages inputs
outputs)
"/plotnine/data"))
(setenv "CI" "1") ;skip tests that are known to fail on CI.
;; Matplotlib needs to be able to write its configuration file
;; somewhere.
(setenv "MPLCONFIGDIR" "/tmp")
(setenv "TZ" "UTC")
(setenv "TZDIR"
(search-input-directory inputs "share/zoneinfo")))))))
(propagated-inputs (list python-adjusttext (propagated-inputs (list python-adjusttext
python-matplotlib python-matplotlib
python-mizani python-mizani