Package Details: papis 0.14-2

Git Clone URL: https://aur.archlinux.org/papis.git (read-only, click to copy)
Package Base: papis
Description: Command-line document and bibliography manager
Upstream URL: https://github.com/papis/papis
Licenses: GPL-3.0-or-later
Submitter: JP-Ellis
Maintainer: gesh (tuurep)
Last Packager: gesh
Votes: 17
Popularity: 0.57
First Submitted: 2018-08-13 20:42 (UTC)
Last Updated: 2024-12-23 13:59 (UTC)

Dependencies (44)

Sources (2)

Pinned Comments

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 Next › Last »

ExpandingMan commented on 2024-05-20 13:13 (UTC)

This was working for me in the previous PKGBUILD, but now it runs through a ton of tests and fails spectacularly. Should this even be running tests just to install it?

gesh commented on 2024-05-16 19:25 (UTC)

Oh, and BTW, you do need typing_extensions in v0.13 -- it does get removed in v0.14, though.

gesh commented on 2024-05-16 19:22 (UTC)

So I ended up giving up on searching the precise fix to backport, but there's no need to disable tests entirely -- it suffices to disable this one test, by adding -k 'not (test_config.py and test_get_configuration)' to the pytest invocation. Double checking this works, then pushing.

gesh commented on 2024-05-16 12:44 (UTC) (edited on 2024-05-16 12:46 (UTC) by gesh)

Yeah, that one was failing for me as well. Checking papis-git to see if I can backport the fix. ... or in hindsight, can contact upstream to ask what I need to backport, they'll know better.

BoostCookie commented on 2024-05-16 12:31 (UTC)

@gesh I'm giving up on the tests. I just commented them out. Maybe they will work in v0.14. This is what I was getting btw:

=================================== FAILURES ===================================
____________________________ test_get_configuration ____________________________

    def test_get_configuration() -> None:
        settings = papis.config.get_general_settings_name()
        config = papis.config.get_configuration()
        assert type(config) is papis.config.Configuration
        assert settings in config.keys()
>       assert id(_CONFIGURATION) == id(config)
E       assert 140158974375696 == 140158789915120
E        +  where 140158974375696 = id(<papis.config.Configuration object at 0x7f794de13710>)
E        +  and   140158789915120 = id(<papis.config.Configuration object at 0x7f7942e291f0>)

/build/papis/src/papis-0.13/tests/test_config.py:184: AssertionError

gesh commented on 2024-05-16 11:45 (UTC) (edited on 2024-05-16 11:46 (UTC) by gesh)

Actually, I had a different error in my commit -- I was missing python-setuptools as a makedep (note that PEP517 just codifies a consistent invocation style for build backends, it doesn't itself contain a build backend.

I'm guessing the complaint about markdownify a paru bug, not a packaging bug. Just tested with a clean chroot, and after the above edits it builds fine, albeit failing one pytest check.

In any case, as noted by the comment above that dep, it's only strictly needed if you want to test out the markdownify integration ahead of installing that optdepend, you can comment it out of the `checkdepends if you want.

Updated patch is attached:

commit 5e56daa16d75b848332414fa52417caf3af1370b (HEAD -> local)
Author: gesh <gesh@gesh.uni.cx>
Date:   Wed May 15 13:29:24 2024 +0300

    Fix deps, add optdeps, checks, cleanup

diff --git a/PKGBUILD b/PKGBUILD
index 99e0575..d893387 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,66 @@
+# Contributor: Gesh <gesh@gesh.uni.cx>
 # Maintainer: Stefan Gehr <stefan@gehr.xyz>

 pkgname=papis
 pkgver=0.13
-pkgrel=3
-pkgdesc="Papis is a powerful and highly extensible command-line based document and bibliography manager."
+pkgrel=4
+pkgdesc="Command-line document and bibliography manager"
 arch=('any')
 url="https://github.com/papis/papis"
-license=('GPL')
-depends=('python-pyaml'
-         'python-arxiv2bib'
-         'python-beautifulsoup4'
-         'python-bibtexparser'
-         'python-click'
-         'python-colorama'
-         'python-dominate'
-         'python-filetype'
-         'python-habanero'
-         'python-isbnlib'
-         'python-lxml'
-         'python-platformdirs'
-         'python-prompt_toolkit'
-         'python-pygments'
-         'python-pyparsing'
-         'python-doi'
-         'python-slugify'
-         'python-requests'
-         'python-stevedore'
-        )
+license=('GPL-3.0-or-later')
+depends=('python'
+    'python-arxiv2bib'
+    'python-beautifulsoup4'
+    'python-bibtexparser'
+    'python-click'
+    'python-colorama'
+    'python-doi'
+    'python-dominate'
+    'python-filetype'
+    'python-habanero'
+    'python-isbnlib'
+    'python-lxml'
+    'python-platformdirs'
+    'python-prompt_toolkit'
+    'python-pygments'
+    'python-pyparsing'
+    'python-requests'
+    'python-slugify'
+    'python-stevedore'
+    'python-yaml'
+)
 optdepends=(
-  'papis-rofi: integration with rofi'
-  'python-whoosh'
+    'fzf: fzf picker'
+    'papis-rofi: integration with rofi'
+    'papis-zotero: imports from zotero'
+    'pdfjs: pdf reader in the web app'
+    'python-chardet: improved encoding autodetection when scraping'
+    'python-jinja: jinja formatting'
+    'python-papis-scihub: imports from scihub'
+    'python-markdownify: convert zenodo imports to markdown'
+    'python-whoosh: whoosh database backend'
+    'python-docutils: for papis.sphinx_ext (used by some plugins)'
+    'python-sphinx: for papis.sphinx_ext (used by some plugins)'
+    'python-sphinx-click: for papis.sphinx_ext (used by some plugins)'
+    'python-pytest: for papis.testing (used by some plugins)'
+)
+makedepends=(
+    'python-build'
+    'python-installer'
+    'python-wheel'
+
+    'python-setuptools'
+)
+checkdepends=(
+    'python-pytest'
+    'python-pytest-cov'
+    # These are optional -- if they're not installed, papis will automatically
+    # skip these tests -- and are only necessary if you intend to use the
+    # optdeps as well
+    'python-jinja'
+    'python-markdownify'
+    'python-whoosh'
 )
-makedepends=(python-build python-installer python-wheel)

 source=("https://github.com/papis/papis/archive/refs/tags/v${pkgver}.tar.gz")
 b2sums=("efff09aeaaacf170ef5c01170f1c856dbe09566096deb7ae649bfe755d58f225467241464e4b4bf8f36c25898fc7e9f689358073ab45e81d651defd127729af3")
@@ -41,6 +70,11 @@ build() {
   python -m build --wheel --no-isolation
 }

+check() {
+  cd "${pkgname}-${pkgver}"
+  python -m pytest papis tests
+}
+
 package() {
   cd "${pkgname}-${pkgver}"
   python -m installer --destdir="$pkgdir" dist/*.whl

BoostCookie commented on 2024-05-15 10:52 (UTC)

@gesh I don't know. From paru -U I'm getting

error: could not find all required packages:
    python-markdownify (wanted by: papis)

Even though it is only an optdepends. There is no need to hurry. You can do it in the evening or tomorrow.

gesh commented on 2024-05-15 10:31 (UTC)

@BoostCookie Need to leave home and won't be back until much later today, so I can't test the edits yet. Mind doing so? Patch is attached below, just copy to a .patch file and do git apply cleanup.patch

commit 016a103514306e8a25fd97afe7ee86d6fe5defa7
Author: gesh <gesh@gesh.uni.cx>
Date:   Wed May 15 13:29:24 2024 +0300

    Fix deps, add optdeps, checks, cleanup

diff --git a/PKGBUILD b/PKGBUILD
index 99e0575..505c85e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,64 @@
+# Contributor: Gesh <gesh@gesh.uni.cx>
 # Maintainer: Stefan Gehr <stefan@gehr.xyz>

 pkgname=papis
 pkgver=0.13
-pkgrel=3
-pkgdesc="Papis is a powerful and highly extensible command-line based document and bibliography manager."
+pkgrel=4
+pkgdesc="Command-line document and bibliography manager"
 arch=('any')
 url="https://github.com/papis/papis"
-license=('GPL')
-depends=('python-pyaml'
-         'python-arxiv2bib'
-         'python-beautifulsoup4'
-         'python-bibtexparser'
-         'python-click'
-         'python-colorama'
-         'python-dominate'
-         'python-filetype'
-         'python-habanero'
-         'python-isbnlib'
-         'python-lxml'
-         'python-platformdirs'
-         'python-prompt_toolkit'
-         'python-pygments'
-         'python-pyparsing'
-         'python-doi'
-         'python-slugify'
-         'python-requests'
-         'python-stevedore'
-        )
+license=('GPL-3.0-or-later')
+depends=('python'
+    'python-arxiv2bib'
+    'python-beautifulsoup4'
+    'python-bibtexparser'
+    'python-click'
+    'python-colorama'
+    'python-doi'
+    'python-dominate'
+    'python-filetype'
+    'python-habanero'
+    'python-isbnlib'
+    'python-lxml'
+    'python-platformdirs'
+    'python-prompt_toolkit'
+    'python-pygments'
+    'python-pyparsing'
+    'python-requests'
+    'python-slugify'
+    'python-stevedore'
+    'python-yaml'
+)
 optdepends=(
-  'papis-rofi: integration with rofi'
-  'python-whoosh'
+    'fzf: fzf picker'
+    'papis-rofi: integration with rofi'
+    'papis-zotero: imports from zotero'
+    'pdfjs: pdf reader in the web app'
+    'python-chardet: improved encoding autodetection when scraping'
+    'python-jinja: jinja formatting'
+    'python-papis-scihub: imports from scihub'
+    'python-markdownify: convert zenodo imports to markdown'
+    'python-whoosh: whoosh database backend'
+    'python-docutils: for papis.sphinx_ext (used by some plugins)'
+    'python-sphinx: for papis.sphinx_ext (used by some plugins)'
+    'python-sphinx-click: for papis.sphinx_ext (used by some plugins)'
+    'python-pytest: for papis.testing (used by some plugins)'
+)
+makedepends=(
+    'python-build'
+    'python-installer'
+    'python-wheel'
+)
+checkdepends=(
+    'python-pytest'
+    'python-pytest-cov'
+    # These are optional -- if they're not installed, papis will automatically
+    # skip these tests -- and are only necessary if you intend to use the
+    # optdeps as well
+    'python-jinja'
+    'python-markdownify'
+    'python-whoosh'
 )
-makedepends=(python-build python-installer python-wheel)

 source=("https://github.com/papis/papis/archive/refs/tags/v${pkgver}.tar.gz")
 b2sums=("efff09aeaaacf170ef5c01170f1c856dbe09566096deb7ae649bfe755d58f225467241464e4b4bf8f36c25898fc7e9f689358073ab45e81d651defd127729af3")
@@ -41,6 +68,11 @@ build() {
   python -m build --wheel --no-isolation
 }

+check() {
+  cd "${pkgname}-${pkgver}"
+  python -m pytest papis tests
+}
+
 package() {
   cd "${pkgname}-${pkgver}"
   python -m installer --destdir="$pkgdir" dist/*.whl

BoostCookie commented on 2024-05-15 10:15 (UTC)

@gesh I've added you as co-maintainer. Can you add your changes?

gesh commented on 2024-05-15 10:05 (UTC)

Thanks for picking this up, was intending to do so once 0.14 was released.

A few remarks: You want python-yaml in your depends, not pyaml -- I recently pushed a commit to papis-git that fixes that. You might also want to pick up the optdepends from there. Also, licenses should be specified in SPDX nowadays, ie GPL-3.0-or-later.

I'm pretty sure you'll need to add python-chardet and switch python-arxiv2bib -> python-arxiv once 0.14 drops, though I don't 100% recall whether python-typing_extensions is necessary. (Actually, going over things like this makes me wonder at the status of python-chardet -- is it a hard or optdepend? Will need to contact upstream later today to check).

You may want to add at least the pytest checks, I added the others out of perfectionism.

Last and least, you probably want to sort the depends array and break makedepends into multiple lines -- that makes it more legible.

Thanks again for picking this up, I prefer only packaging things I actually use, which in my case is papis-git.