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

papis: 0.5.2 -> 0.5.3 #35252

Merged
merged 3 commits into from Feb 22, 2018
Merged

papis: 0.5.2 -> 0.5.3 #35252

merged 3 commits into from Feb 22, 2018

Conversation

nico202
Copy link
Contributor

@nico202 nico202 commented Feb 20, 2018

Motivation for this change

Fixed tests as pointed out in papis/papis#58

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

This seems fine so far.
However, looking at https://travis-ci.org/papis/papis/jobs/344071736, I see that we're only running 11/35 tests.
Maybe you could specify

checkPhase = ''
  make test
  make test-non-pythonic
'';

But then, we'd need to package https://pypi.org/project/dmenu/ and at least add pytest to checkInputs: https://github.com/papis/papis/blob/master/setup.py#L87

@nico202
Copy link
Contributor Author

nico202 commented Feb 20, 2018

@dotlambda done, but there's a failing test on my machine

@adisbladis
Copy link
Member

@GrahamcOfBorg build papis

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘python3.6-construct-2.8.16’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/development/python-modules/construct/default.nix:22 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

DEBUG:downloaders:aps:[bibtex url] = http://journals.aps.org/prb/export/10.1103/PhysRevB.95.085434?type=bibtex&download=true
DEBUG:downloaders:aps:[bibtex url] = http://journals.aps.org/prb/export/10.1103/PhysRevB.95.085434?type=bibtex&download=true
------------------------------ Captured log call -------------------------------
base.py                     20 DEBUG    [url] = http://journals.aps.org/prb/abstract/10.1103/PhysRevB.95.085434
aps.py                      55 DEBUG    [bibtex url] = http://journals.aps.org/prb/export/10.1103/PhysRevB.95.085434?type=bibtex&download=true
aps.py                      55 DEBUG    [bibtex url] = http://journals.aps.org/prb/export/10.1103/PhysRevB.95.085434?type=bibtex&download=true
===================== 1 failed, 34 passed in 3.90 seconds ======================
make: *** [Makefile:302: test] Error 1
builder for ‘/nix/store/qwmsr4r6slp6hiv0r1zp9l5lmvllwcq5-papis-0.5.3.drv’ failed with exit code 2
error: build of ‘/nix/store/qwmsr4r6slp6hiv0r1zp9l5lmvllwcq5-papis-0.5.3.drv’ failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

DEBUG:downloaders:aps:[bibtex url] = http://journals.aps.org/prb/export/10.1103/PhysRevB.95.085434?type=bibtex&download=true
DEBUG:downloaders:aps:[bibtex url] = http://journals.aps.org/prb/export/10.1103/PhysRevB.95.085434?type=bibtex&download=true
------------------------------ Captured log call -------------------------------
base.py                     20 DEBUG    [url] = http://journals.aps.org/prb/abstract/10.1103/PhysRevB.95.085434
aps.py                      55 DEBUG    [bibtex url] = http://journals.aps.org/prb/export/10.1103/PhysRevB.95.085434?type=bibtex&download=true
aps.py                      55 DEBUG    [bibtex url] = http://journals.aps.org/prb/export/10.1103/PhysRevB.95.085434?type=bibtex&download=true
===================== 1 failed, 34 passed in 24.74 seconds =====================
make: *** [Makefile:302: test] Error 1
builder for '/nix/store/c6sivp9r4xyqshbqf4h2a79b1sqz65i2-papis-0.5.3.drv' failed with exit code 2
�[31;1merror:�[0m build of '/nix/store/c6sivp9r4xyqshbqf4h2a79b1sqz65i2-papis-0.5.3.drv' failed

, vim
}:

buildPythonApplication rec {
pname = "papis";
version = "0.5.2";
version = "0.5.3";

# Missing tests on Pypi
src = fetchFromGitHub {
owner = "alejandrogallo";
Copy link
Member

Choose a reason for hiding this comment

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

Github redirects from https://github.com/alejandrogallo/papis to https://github.com/papis/papis so this should be updated.

@adisbladis
Copy link
Member

@nico202 This is because that test is attempting to use networking (which is not available in the build environment).

You can skip that test.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Please squash the last two commits and name them something like papis: fix tests

@nico202
Copy link
Contributor Author

nico202 commented Feb 21, 2018

I'll squash everything as soon as it starts working. I can't figure out the problem now

edit: found the problem, but don't know what was causing it. Also, the fixes are ugly

mkdir -p check-phase
patchShebangs tests
sed -i "s|^papis |$out/bin/papis |" tests/bash/test_default.sh
sed -i "s|papis |$out/bin/papis |" tests/bash/test_help.sh
Copy link
Member

Choose a reason for hiding this comment

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

You can probably do this with

export PATH=$out/bin:$PATH

Copy link
Contributor Author

Choose a reason for hiding this comment

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

better thanks

# Still don't know why this fails
sed -i 's/--set dir=hello //' tests/bash/test_default.sh

sed -i 's/test_downloader_getter(self):/disabled_test_downloader_getter(self):/' papis/downloaders/tests/test_main.py
Copy link
Member

Choose a reason for hiding this comment

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

Add a comment that this tests requires a network connection

mkdir -p check-phase
patchShebangs tests
Copy link
Member

Choose a reason for hiding this comment

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

This belongs into pre/postPatch

@nico202 nico202 force-pushed the master branch 2 times, most recently from 0e2cdf9 to 9bf261f Compare February 21, 2018 12:44
postPatch = "sed -i 's/configparser>=3.0.0/# configparser>=3.0.0/' setup.py";
postPatch = ''
sed -i 's/configparser>=3.0.0/# configparser>=3.0.0/' setup.py
patchShebangs tests
Copy link
Member

Choose a reason for hiding this comment

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

indentation

@dotlambda
Copy link
Member

I'll look at the --set dir=hello thing later today.

export HOME=$(pwd)/check-phase
make test
make test-non-pythonic
Copy link
Member

Choose a reason for hiding this comment

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

SH=${bashInteractive}/bin/bash make test-non-pythonic should solve the problem.

@nico202
Copy link
Contributor Author

nico202 commented Feb 21, 2018

@dotlambda thanks a lot, it seems to be ok now

@dotlambda
Copy link
Member

@GrahamcOfBorg build papis

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

  --rofi      Rofi based UI
  --urwid     Urwid based UI
  --vim       Vim based UI
sync
usage: papis sync [-h]

optional arguments:
  -h, --help  show this help message and exit
zotero/test_zotero.sh
/nix/store/paaqyfv1n7csbz4dcn3dp2n0pljm32iv-papis-0.5.3

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

  --rofi      Rofi based UI
  --urwid     Urwid based UI
  --vim       Vim based UI
sync
usage: papis sync [-h]

optional arguments:
  -h, --help  show this help message and exit
zotero/test_zotero.sh
/nix/store/qk0klmqr2jn71yk2yi9gig08mjlpphw9-papis-0.5.3

@FRidh FRidh merged commit 383da0f into NixOS:master Feb 22, 2018
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

5 participants