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,50 +3124,62 @@ 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"))
"-k"
(string-append "not "
(string-join
(list
;; This triggers an unexpected but harmless ;; This triggers an unexpected but harmless
;; warning. ;; warning.
"test_save_method" "test_save_method"
;; This test fails to set the locale.
"test_no_after_scale_warning"
;; Missing optional modules ;; Missing optional modules
"test_non_linear_smooth" "test_non_linear_smooth"
"test_non_linear_smooth_no_ci") "test_non_linear_smooth_no_ci")
" and not " " and not "
'prefix))) 'infix)))
#:phases '(modify-phases %standard-phases #:phases
#~(modify-phases %standard-phases
(add-before 'build 'pretend-version
;; The version string is usually derived via setuptools-scm, but
;; without the git metadata available, the version string is set to
;; '999'.
(lambda _
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
(add-before 'check 'pre-check (add-before 'check 'pre-check
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
;; The data files are referenced by the tests but they are not ;; The data files are referenced by the tests but they are not
@ -3176,6 +3188,7 @@ aggregated sum and more.")
(string-append (site-packages inputs (string-append (site-packages inputs
outputs) outputs)
"/plotnine/data")) "/plotnine/data"))
(setenv "CI" "1") ;skip tests that are known to fail on CI.
;; Matplotlib needs to be able to write its configuration file ;; Matplotlib needs to be able to write its configuration file
;; somewhere. ;; somewhere.
(setenv "MPLCONFIGDIR" "/tmp") (setenv "MPLCONFIGDIR" "/tmp")