mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 03:51:53 +02:00
gnu: python-rq-scheduler: Improve package, fix tests.
* gnu/packages/databases.scm (python-rq-scheduler): Reallocate some fields, fix the style and readability. [source] <url>: Use exact git URL instead of [home-page]. [arguments] <test-flags>: Skip tests requiring root access. [propagated-inputs]: Remove python-croniter; add python-crontab, python-freezegun, and python-dateutil. [native-inputs]: Remove python-crontab, python-freezegun, and python-wheel. [home-page]: Move above [synopsis]. Change-Id: If82959e5cb028b826a5a53293b3c58aefb507f36
This commit is contained in:
committed by
Andreas Enge
parent
7d6c683bc4
commit
66ec92b2c3
+54
-27
@@ -5132,41 +5132,68 @@ is designed to have a low barrier to entry.")
|
|||||||
(package
|
(package
|
||||||
(name "python-rq-scheduler")
|
(name "python-rq-scheduler")
|
||||||
(version "0.14")
|
(version "0.14")
|
||||||
(home-page "https://github.com/rq/rq-scheduler")
|
(source
|
||||||
(source (origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url home-page)
|
(url "https://github.com/rq/rq-scheduler")
|
||||||
(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
|
(base32 "09fh9m2vcl1jndq35xp1x0j8ih009r71qmhn2pkl93fykrqfavyn"))))
|
||||||
"09fh9m2vcl1jndq35xp1x0j8ih009r71qmhn2pkl93fykrqfavyn"))))
|
|
||||||
(build-system pyproject-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
;; tests: 60 passed, 15 deselected, 12 warnings
|
||||||
#:test-flags
|
#:test-flags
|
||||||
#~(list "-k" (string-append "not test_cron"
|
#~(list #$@(map (lambda (test) (string-append "--deselect="
|
||||||
" and not test_job_creation_with"
|
"tests/test_scheduler.py"
|
||||||
" and not test_job_with_crontab"))
|
"::TestScheduler::"
|
||||||
#:phases #~(modify-phases %standard-phases
|
test))
|
||||||
(add-before 'check 'start-redis
|
;; OSError: Read crontab <...>: mcron: Only root can use
|
||||||
(lambda _
|
;; the -u option.
|
||||||
(invoke "redis-server" "--daemonize" "yes")))
|
(list "test_cron_sets_default_result_ttl_to_minus_1"
|
||||||
(add-after 'unpack 'loosen-requirements
|
"test_cron_sets_default_ttl_to_none"
|
||||||
(lambda _
|
"test_cron_sets_provided_result_ttl"
|
||||||
(substitute* "setup.py"
|
"test_cron_sets_provided_ttl"
|
||||||
(("crontab>=[0-9.]*")
|
"test_crontab_persisted_correctly"
|
||||||
"python-crontab")))))))
|
"test_crontab_persisted_correctly_with_local_timezone"
|
||||||
|
"test_crontab_rescheduled_correctly_with_local_timezone"
|
||||||
|
"test_crontab_schedules_correctly"
|
||||||
|
"test_crontab_sets_default_result_ttl"
|
||||||
|
"test_crontab_sets_description"
|
||||||
|
"test_crontab_sets_id"
|
||||||
|
"test_crontab_sets_timeout"
|
||||||
|
"test_job_with_crontab_get_rescheduled"))
|
||||||
|
#$@(map (lambda (test) (string-append "--deselect="
|
||||||
|
"tests/test_callbacks.py"
|
||||||
|
"::JobCallbackTestCase::"
|
||||||
|
test))
|
||||||
|
;; AssertionError: <object object at 0x7ffff7599c10> !=
|
||||||
|
;; None
|
||||||
|
(list "test_job_creation_with_failure_callback"
|
||||||
|
"test_job_creation_with_success_callback")))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-before 'check 'start-redis
|
||||||
|
(lambda _
|
||||||
|
(invoke "redis-server" "--daemonize" "yes")))
|
||||||
|
(add-after 'unpack 'loosen-requirements
|
||||||
|
(lambda _
|
||||||
|
;; crontab package is python_crontab in PyPI.
|
||||||
|
(substitute* "setup.py"
|
||||||
|
(("crontab>=[0-9.]*")
|
||||||
|
"python-crontab")))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list python-crontab
|
(list python-pytest
|
||||||
python-freezegun
|
|
||||||
python-pytest
|
|
||||||
python-setuptools
|
python-setuptools
|
||||||
python-wheel
|
|
||||||
redis))
|
redis))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list python-croniter python-rq))
|
(list python-crontab
|
||||||
|
python-freezegun
|
||||||
|
python-dateutil
|
||||||
|
python-rq))
|
||||||
|
(home-page "https://github.com/rq/rq-scheduler")
|
||||||
(synopsis "Job scheduling capabilities for RQ (Redis Queue)")
|
(synopsis "Job scheduling capabilities for RQ (Redis Queue)")
|
||||||
(description
|
(description
|
||||||
"This package provides job scheduling capabilities to @code{python-rq}
|
"This package provides job scheduling capabilities to @code{python-rq}
|
||||||
|
|||||||
Reference in New Issue
Block a user