Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paperwork 2.0 #102235

Merged
merged 5 commits into from Nov 20, 2020
Merged

Paperwork 2.0 #102235

merged 5 commits into from Nov 20, 2020

Conversation

symphorien
Copy link
Member

@symphorien symphorien commented Oct 31, 2020

Motivation for this change

Update. Also bugs which are only fixed in 2.0.

This is still wip, I opened the PR to prevent potential duplicate work with co-maintainer @aszlig

Scanning looks buggy, I still have to investigate.

Backup your papers directory before reviewing.

The format changes with paperwork 2.0, and it is not possible to downgrade (at least, some information will be lost).
https://forum.openpaper.work/t/paperwork-2-0/112/5

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 102235 run on x86_64-darwin 1

4 packages marked as broken and skipped:
  • python37Packages.paperwork-backend
  • python37Packages.paperwork-shell
  • python38Packages.paperwork-backend
  • python38Packages.paperwork-shell
10 packages built:
  • python27Packages.fabulous
  • python27Packages.getkey
  • python37Packages.fabulous
  • python37Packages.getkey
  • python37Packages.openpaperwork-core
  • python37Packages.openpaperwork-gtk
  • python38Packages.fabulous
  • python38Packages.getkey
  • python38Packages.openpaperwork-core
  • python38Packages.openpaperwork-gtk

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 102235 run on x86_64-linux 1

9 packages failed to build:
  • paperwork
  • python37Packages.openpaperwork-core
  • python37Packages.openpaperwork-gtk
  • python37Packages.paperwork-backend
  • python37Packages.paperwork-shell
  • python38Packages.openpaperwork-core
  • python38Packages.openpaperwork-gtk
  • python38Packages.paperwork-backend
  • python38Packages.paperwork-shell
6 packages built:
  • python27Packages.fabulous
  • python27Packages.getkey
  • python37Packages.fabulous
  • python37Packages.getkey
  • python38Packages.fabulous
  • python38Packages.getkey

@symphorien
Copy link
Member Author

I'm surprised by the build failure no x86_64 because it works for me™

@SuperSandro2000
Copy link
Member

Sandbox issue I guess:

patching script interpreter paths in ../tools
../tools/plugin-grapher/setup.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/346skv0d24rqnf4npknbp9h5bs14j8zy-python3-3.8.6/bin/python3"
../tools/merge_authors_json.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/346skv0d24rqnf4npknbp9h5bs14j8zy-python3-3.8.6/bin/python3"
../tools/labelgenerator/setup.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/346skv0d24rqnf4npknbp9h5bs14j8zy-python3-3.8.6/bin/python3"
../tools/l10n_extract.sh: interpreter directive changed from "/bin/bash" to "/nix/store/k8p54jg8ipvnfz435mayf5bnqhw4qqap-bash-4.4-p23/bin/bash"
../tools/l10n_compile.sh: interpreter directive changed from "/bin/bash" to "/nix/store/k8p54jg8ipvnfz435mayf5bnqhw4qqap-bash-4.4-p23/bin/bash"
../tools/get_git_authors.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/346skv0d24rqnf4npknbp9h5bs14j8zy-python3-3.8.6/bin/python3"
../tools/docgenerator/setup.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/346skv0d24rqnf4npknbp9h5bs14j8zy-python3-3.8.6/bin/python3"
configuring
no configure script, doing nothing
building
Executing setuptoolsBuildPhase
/build/source/openpaperwork-gtk/../tools/l10n_compile.sh \
        "/build/source/openpaperwork-gtk/l10n" \
        "/build/source/openpaperwork-gtk/src/openpaperwork_gtk/l10n" \
        "openpaperwork_gtk"
make: /bin/sh: No such file or directory
make: *** [Makefile:84: l10n_compile] Error 127
builder for '/nix/store/s5dbr9031m758q67sb23y1vv4hwbadh2-python3.8-openpaperwork-gtk-2.0.drv' failed with exit code 2
cannot build derivation '/nix/store/xan94k2r532amf22kapbyy01fhqvdmdc-python3.8-paperwork-backend-2.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/xan94k2r532amf22kapbyy01fhqvdmdc-python3.8-paperwork-backend-2.0.drv' failed

@symphorien
Copy link
Member Author

Huh, the sandbox contains /bin/sh, and I do have the sandbox enabled.
@GrahamcOfBorg build paperwork

@symphorien symphorien marked this pull request as ready for review October 31, 2020 19:25
@symphorien symphorien changed the title WIP: Paperwork 2.0 Paperwork 2.0 Oct 31, 2020
@symphorien
Copy link
Member Author

It is ready now. The only thing not working as well as I would like is that ocr takes forever (several minutes) even for single page documents. But this is probably a tesseract-level problem.

cc @Ekleog as a potential reviewer.

Copy link
Member

@aszlig aszlig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, actually I was about to start packaging 2.0, thanks for being first :-)

Just commented on a few nitpicks, but I'm wondering whether it makes sense to just build everything within one package and provide the components via multiple outputs, since everything is based on a single source tree. I think there is no other package depending on some of the Paperwork components and if there would be it would still work by referring to eg. a .dev output.

What do you think?

pkgs/top-level/python-packages.nix Outdated Show resolved Hide resolved
@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 102235 run on x86_64-darwin 1

4 packages marked as broken and skipped:
  • python37Packages.paperwork-backend
  • python37Packages.paperwork-shell
  • python38Packages.paperwork-backend
  • python38Packages.paperwork-shell
10 packages built:
  • python27Packages.fabulous
  • python27Packages.getkey
  • python37Packages.fabulous
  • python37Packages.getkey
  • python37Packages.openpaperwork-core
  • python37Packages.openpaperwork-gtk
  • python38Packages.fabulous
  • python38Packages.getkey
  • python38Packages.openpaperwork-core
  • python38Packages.openpaperwork-gtk

@aszlig
Copy link
Member

aszlig commented Nov 5, 2020

This is still wip

@symphorien: Is there anything left to do here?

@symphorien
Copy link
Member Author

I added release notes about the backward incompatible on-disk format and I think this is ready.

@aszlig
Copy link
Member

aszlig commented Nov 6, 2020

Scanning looks buggy, I still have to investigate.

Is this also still the case?

@symphorien
Copy link
Member Author

No it's just surprisingly slow. All the waiting time is due to a tesseract child process.

@symphorien
Copy link
Member Author

fixed usage of wrapGappsHook. paperwork was crashing when opening a gtk file chooser, but I had not caught that when running paperwork in xfce-terminal because then paperwork was indirectly wrapped by xfce-terminal's own wrapper.

Copy link
Member

@aszlig aszlig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 But of course see my earth-shattering nitpobjections :-)

@symphorien symphorien merged commit 01083f1 into NixOS:master Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants