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

@djanatyn djanatyn commented Oct 22, 2020

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 djanatyn requested review from FRidh and jonringer as code owners Oct 22, 2020
@djanatyn
Copy link
Contributor Author

@djanatyn djanatyn commented Oct 22, 2020

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
19 checks passed
19 checks passed
@github-actions[bot]
tests
Details
@github-actions[bot]
action
Details
@ofborg[bot]
Evaluation Performance Report Evaluator Performance Report
Details
@github-actions[bot]
Wait for ofborg
Details
@ofborg[bot]
grahamcofborg-eval ^.^!
Details
@ofborg[bot]
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
@ofborg[bot]
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
@ofborg[bot]
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2a022e4"; rev="2a022e4b5d95a87b38723c9c31250c6ecd7d3a7a"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
@ofborg[bot]
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2a022e4"; rev="2a022e4b5d95a87b38723c9c31250c6ecd7d3a7a"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2a022e4"; rev="2a022e4b5d95a87b38723c9c31250c6ecd7d3a7a"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2a022e4"; rev="2a022e4b5d95a87b38723c9c31250c6ecd7d3a7a"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2a022e4"; rev="2a022e4b5d95a87b38723c9c31250c6ecd7d3a7a"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2a022e4"; rev="2a022e4b5d95a87b38723c9c31250c6ecd7d3a7a"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2a022e4"; rev="2a022e4b5d95a87b38723c9c31250c6ecd7d3a7a"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
@ofborg[bot]
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@ofborg[bot]
pinboard, pinboard.passthru.tests on aarch64-linux Success
Details
@ofborg[bot]
pinboard, pinboard.passthru.tests on x86_64-linux Success
Details
@bjornfor
Copy link
Contributor

@bjornfor bjornfor commented Oct 25, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants