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

pinboard: init at 2.1.8 #101400

Merged
merged 2 commits into from Oct 25, 2020
Merged

pinboard: init at 2.1.8 #101400

merged 2 commits into from Oct 25, 2020

Conversation

djanatyn
Copy link
Contributor

Motivation for this change

I wanted to use this Pinboard client and library to backup my saved bookmarks on NixOS.

There's an existing package (pinboard-notes-backup) to backup notes that uses curl. This package has a few more features available and maps to much more of the available Pinboard API.

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.

@djanatyn
Copy link
Contributor Author

The tests are disabled as they require an API key:

running install tests
============================= test session starts ==============================
platform darwin -- Python 3.8.6, pytest-5.4.3, py-1.9.0, pluggy-0.13.1
rootdir: /private/tmp/nix-build-python3.8-pinboard-2.1.8.drv-0/source
collected 2 items

test_pinboard.py FF                                                      [100%]

=================================== FAILURES ===================================
___________ TestPinboardAPIPropagation.test_add_tag_through_website ____________

self = <test_pinboard.TestPinboardAPIPropagation testMethod=test_add_tag_through_website>

    def setUp(self):
>       self.pinboard = Pinboard(os.environ['PINBOARD_API_TOKEN'])

test_pinboard.py:15:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = environ({'propagatedBuildInputs': '/nix/store/65gmh01007csxmd6bbkvas8zkhlw0k7n-python3-3.8.6', 'stdenv': '/nix/store/d...7531:0:0', 'PYTEST_CURRENT_TEST': 'test_pinboard.py::TestPinboardAPIPropagation::test_add_tag_through_website (call)'})
key = 'PINBOARD_API_TOKEN'

    def __getitem__(self, key):
        try:
            value = self._data[self.encodekey(key)]
        except KeyError:
            # raise KeyError with the original key value
>           raise KeyError(key) from None
E           KeyError: 'PINBOARD_API_TOKEN'

/nix/store/65gmh01007csxmd6bbkvas8zkhlw0k7n-python3-3.8.6/lib/python3.8/os.py:675: KeyError
__________ TestPinboardAPIPropagation.test_remove_tag_through_website __________

self = <test_pinboard.TestPinboardAPIPropagation testMethod=test_remove_tag_through_website>

    def setUp(self):
>       self.pinboard = Pinboard(os.environ['PINBOARD_API_TOKEN'])

test_pinboard.py:15:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = environ({'propagatedBuildInputs': '/nix/store/65gmh01007csxmd6bbkvas8zkhlw0k7n-python3-3.8.6', 'stdenv': '/nix/store/d...1:0:0', 'PYTEST_CURRENT_TEST': 'test_pinboard.py::TestPinboardAPIPropagation::test_remove_tag_through_website (call)'})
key = 'PINBOARD_API_TOKEN'

    def __getitem__(self, key):
        try:
            value = self._data[self.encodekey(key)]
        except KeyError:
            # raise KeyError with the original key value
>           raise KeyError(key) from None
E           KeyError: 'PINBOARD_API_TOKEN'

/nix/store/65gmh01007csxmd6bbkvas8zkhlw0k7n-python3-3.8.6/lib/python3.8/os.py:675: KeyError
=========================== short test summary info ============================
FAILED test_pinboard.py::TestPinboardAPIPropagation::test_add_tag_through_website
FAILED test_pinboard.py::TestPinboardAPIPropagation::test_remove_tag_through_website
============================== 2 failed in 0.29s ===============================
builder for '/nix/store/pf5sbl3w30mzhvygc9fgnfzs4lf1hv1m-python3.8-pinboard-2.1.8.drv' failed with exit code 1
error: build of '/nix/store/pf5sbl3w30mzhvygc9fgnfzs4lf1hv1m-python3.8-pinboard-2.1.8.drv' failed

@bjornfor bjornfor merged commit b775bc7 into NixOS:master Oct 25, 2020
@bjornfor
Copy link
Contributor

Thanks!

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

2 participants