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

pythonPackages.python-forecastio: init at 1.4.0 #42052

Merged
merged 2 commits into from Jun 26, 2018

Conversation

makefu
Copy link
Contributor

@makefu makefu commented Jun 14, 2018

Motivation for this change

add the python package to get the darksky home-assistant module to work.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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)
  • [NA] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/) - works with home-assistant
  • Fits CONTRIBUTING.md.

@ryantm
Copy link
Member

ryantm commented Jun 15, 2018

@GrahamcOfBorg build python2.pkgs.python-forecastio python3.pkgs.python-forecastio

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python2.pkgs.python-forecastio, python3.pkgs.python-forecastio

Partial log (click to expand)

forecastio/__init__.py                                      1      0   100%
forecastio/api.py                                          25     18    28%
forecastio/models.py                                       85     61    28%
forecastio/utils.py                                         9      3    67%
---------------------------------------------------------------------------
TOTAL                                                   29175  21648    26%
----------------------------------------------------------------------
Ran 0 tests in 0.214s

OK

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.python-forecastio, python3.pkgs.python-forecastio

Partial log (click to expand)

requests/status_codes.py                                    8      0   100%
requests/structures.py                                     40     19    52%
requests/utils.py                                         400    336    16%
six.py                                                    450    210    53%
---------------------------------------------------------------------------
TOTAL                                                   29011  21509    26%
----------------------------------------------------------------------
Ran 0 tests in 0.272s

OK

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.python-forecastio, python3.pkgs.python-forecastio

Partial log (click to expand)

requests/sessions.py                                      270    219    19%
requests/status_codes.py                                    8      0   100%
requests/structures.py                                     40     19    52%
requests/utils.py                                         400    336    16%
---------------------------------------------------------------------------
TOTAL                                                   29011  21509    26%
----------------------------------------------------------------------
Ran 0 tests in 0.968s

OK

@@ -766,7 +766,7 @@
"sensor.cups" = ps: with ps; [ pycups ];
"sensor.currencylayer" = ps: with ps; [ ];
"sensor.daikin" = ps: with ps; [ ];
"sensor.darksky" = ps: with ps; [ ];
"sensor.darksky" = ps: with ps; [ python-forecastio ];
Copy link
Member

Choose a reason for hiding this comment

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

Was this generated by parse-requirements.py? The top of the file says "do not edit".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh oh :D i will look into it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran the command, however it was unable to detect the new dependency. now sure what to touch to make it work.
The package is called python-forecastio and will be installed with pip install python-forecastio. (see https://github.com/ZeevG/python-forecast.io )
can you check the parse-requirements.py package what went wrong there?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

exactly, but how can i get the parse-requirements.py to find this requirement and add it automatically to the list of components?

Copy link
Member

Choose a reason for hiding this comment

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

@@ -766,7 +766,7 @@
"sensor.cups" = ps: with ps; [ pycups ];
"sensor.currencylayer" = ps: with ps; [ ];
"sensor.daikin" = ps: with ps; [ ];
"sensor.darksky" = ps: with ps; [ ];
"sensor.darksky" = ps: with ps; [ python-forecastio ];
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be a separate commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as discussed above, this should be done somehow automatically by the update script but it doesn't for some reason

Copy link
Member

Choose a reason for hiding this comment

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

I have just tried running the parse-requirements.py script here and it works perfectly fine. In addition to updating the darksky sensor component it also updates the weather component as expected. What happens when you run it?

As mentioned by @FRidh that needs to go into a separate commit.

Copy link
Member

Choose a reason for hiding this comment

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

parse-requirements.py works for me as well. You should however rebase onto latest master, where Home Assistant was updated to 0.72.0.

@FRidh FRidh requested a review from dotlambda June 23, 2018 16:03
propagatedBuildInputs = [ requests responses ];

checkPhase = ''
nosetests --with-coverage
Copy link
Member

Choose a reason for hiding this comment

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

You should be able to just drop --with-coverage and the coverage dependency above.


};

checkInputs = [ nose coverage responses ];
Copy link
Member

Choose a reason for hiding this comment

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

no need for responses here as it's in propagatedBuildInputs

@makefu makefu force-pushed the pkgs/python-forecastio/init branch from 8abb7b0 to f8d30b1 Compare June 25, 2018 23:15
@makefu
Copy link
Contributor Author

makefu commented Jun 25, 2018

i've added the changes requested, rebased onto latest master and i've put the regenerated component-packages into a separate commit.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: home-assistant

Partial log (click to expand)

copying path '/nix/store/gpfvffqn818p6a7xikk8rqj7s42q6kpy-python3.6-requests-2.18.4-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/w6mg8x1vpf9jm0pvggk96sdqi6vpjc1d-python3.6-home-assistant-frontend-20180622.1' from 'https://cache.nixos.org'...
copying path '/nix/store/ndv6m25bhs4p3jab75dbi0cx6r9h4ay7-python3.6-astral-1.6.1' from 'https://cache.nixos.org'...
copying path '/nix/store/ricrxbf07nvb1b9q03fwj573sw01v3vq-python3.6-voluptuous-0.11.1' from 'https://cache.nixos.org'...
copying path '/nix/store/3iwqzvrpi4k9h0wkjfvhhmx6i2bkkqwc-python3.6-yarl-1.2.6' from 'https://cache.nixos.org'...
copying path '/nix/store/45993sfl15lkq626rwdcmhrpckxs0kn6-python3.6-voluptuous-serialize-2018-03-10' from 'https://cache.nixos.org'...
copying path '/nix/store/y0fjdr68b9i4j2fxfj0fiwmc4s5gq0s3-python3.6-aiohttp-3.3.2' from 'https://cache.nixos.org'...
copying path '/nix/store/jzg5b93y54pxs08pkf5s0qfbbgqxl4h1-python3.6-aiohttp-cors-0.7.0' from 'https://cache.nixos.org'...
copying path '/nix/store/ysv8yw8q1gppyrflvyqv6r22gl41i5cz-homeassistant-0.72.0' from 'https://cache.nixos.org'...
/nix/store/ysv8yw8q1gppyrflvyqv6r22gl41i5cz-homeassistant-0.72.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: home-assistant

Partial log (click to expand)

copying path '/nix/store/8jil5isssm8p75kraqxm4b5by21pqhhg-python3.6-home-assistant-frontend-20180622.1' from 'https://cache.nixos.org'...
copying path '/nix/store/3jqvlg5q3mjjv7ynm033g4ld4dya10wf-python3.6-cryptography-2.2.2-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/0n3bfis3zzylmgj4qw92mknjdxvzglcj-python3.6-pyOpenSSL-18.0.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/0la429g5ls1ry6k4i07sv4846gm5az01-python3.6-aiohttp-3.3.2' from 'https://cache.nixos.org'...
copying path '/nix/store/nw5p35qxrvflmk8kl15rriip0zpss946-python3.6-urllib3-1.23' from 'https://cache.nixos.org'...
copying path '/nix/store/rx843h9kw58p8gwnyrxgm1vbv20bcvj0-python3.6-requests-2.18.4-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/28hbw8sw5k9jlqjzs4p4z9m5c00hn3kl-python3.6-aiohttp-cors-0.7.0' from 'https://cache.nixos.org'...
copying path '/nix/store/k5gd6v393m301a0svzca2pbvfd0mim8p-python3.6-astral-1.6.1' from 'https://cache.nixos.org'...
copying path '/nix/store/28skddbwca5cvzil5nv0fpkj20vwl9h5-homeassistant-0.72.0' from 'https://cache.nixos.org'...
/nix/store/28skddbwca5cvzil5nv0fpkj20vwl9h5-homeassistant-0.72.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: home-assistant

Partial log (click to expand)

tests/components/test_init.py ................                           [ 67%]
tests/components/test_introduction.py .                                  [ 68%]
tests/components/test_logger.py ......                                   [ 71%]
tests/components/test_script.py .....                                    [ 75%]
tests/components/test_shell_command.py ........                          [ 80%]
tests/components/test_system_log.py ................                     [ 90%]
tests/components/test_websocket_api.py ................                  [100%]

========================== 160 passed in 4.18 seconds ==========================
/nix/store/l4rzhxy8rl4rwpxy208883q9dlys3wf2-homeassistant-0.72.0

@peterhoeg
Copy link
Member

There are 2 changes to the components file but one of them is in the wrong commit.

@makefu makefu force-pushed the pkgs/python-forecastio/init branch from f8d30b1 to e5ff063 Compare June 26, 2018 06:52
@makefu
Copy link
Contributor Author

makefu commented Jun 26, 2018

@peterhoeg you are right, i fixed that

@dotlambda
Copy link
Member

The file is still changed by the first commit.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: home-assistant

Partial log (click to expand)

/nix/store/ysv8yw8q1gppyrflvyqv6r22gl41i5cz-homeassistant-0.72.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: home-assistant

Partial log (click to expand)

copying path '/nix/store/0la429g5ls1ry6k4i07sv4846gm5az01-python3.6-aiohttp-3.3.2' from 'https://cache.nixos.org'...
copying path '/nix/store/rxba3z7k6gfs80wbqf9rxib108kr121n-python3.6-cffi-1.11.5-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/28hbw8sw5k9jlqjzs4p4z9m5c00hn3kl-python3.6-aiohttp-cors-0.7.0' from 'https://cache.nixos.org'...
copying path '/nix/store/3jqvlg5q3mjjv7ynm033g4ld4dya10wf-python3.6-cryptography-2.2.2-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/0n3bfis3zzylmgj4qw92mknjdxvzglcj-python3.6-pyOpenSSL-18.0.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/nw5p35qxrvflmk8kl15rriip0zpss946-python3.6-urllib3-1.23' from 'https://cache.nixos.org'...
copying path '/nix/store/rx843h9kw58p8gwnyrxgm1vbv20bcvj0-python3.6-requests-2.18.4-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/k5gd6v393m301a0svzca2pbvfd0mim8p-python3.6-astral-1.6.1' from 'https://cache.nixos.org'...
copying path '/nix/store/28skddbwca5cvzil5nv0fpkj20vwl9h5-homeassistant-0.72.0' from 'https://cache.nixos.org'...
/nix/store/28skddbwca5cvzil5nv0fpkj20vwl9h5-homeassistant-0.72.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: home-assistant

Partial log (click to expand)

copying path '/nix/store/byh2f1a56q815idp9qx0ww0r19hncp79-python3.6-urllib3-1.23' from 'https://cache.nixos.org'...
copying path '/nix/store/i11ykrgzc21kpd85yg11ncmr3d5bzmhq-python3.6-voluptuous-0.11.1' from 'https://cache.nixos.org'...
copying path '/nix/store/n9wpballa9lsnds6sf2bl719zkbnxsa1-python3.6-requests-2.18.4-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/kk740ril7kwvb03h60w3yd8xfb81jnxn-python3.6-voluptuous-serialize-2018-03-10' from 'https://cache.nixos.org'...
copying path '/nix/store/x9gbccymiycqrbgycwr43lvg4f2vyh3d-python3.6-astral-1.6.1' from 'https://cache.nixos.org'...
copying path '/nix/store/am909g0rl8a02md58hyx5qr6xbdh426s-python3.6-yarl-1.2.6' from 'https://cache.nixos.org'...
copying path '/nix/store/bddc96p86iwqlixizfbyprvwm4aslf3n-python3.6-aiohttp-3.3.2' from 'https://cache.nixos.org'...
copying path '/nix/store/alkbdnlxv9l4q9kjpf33njsma32fz6mw-python3.6-aiohttp-cors-0.7.0' from 'https://cache.nixos.org'...
copying path '/nix/store/l4rzhxy8rl4rwpxy208883q9dlys3wf2-homeassistant-0.72.0' from 'https://cache.nixos.org'...
/nix/store/l4rzhxy8rl4rwpxy208883q9dlys3wf2-homeassistant-0.72.0

Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

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

as @dotlambda mentioned

@makefu makefu force-pushed the pkgs/python-forecastio/init branch from e5ff063 to 5db01c5 Compare June 26, 2018 16:36
@makefu
Copy link
Contributor Author

makefu commented Jun 26, 2018

... sorry for the fuckup, this is what happens when you try to manually revert changes in a commit instead of knowing the correct git command.
it should be ok now .

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: home-assistant

Partial log (click to expand)

/nix/store/l4rzhxy8rl4rwpxy208883q9dlys3wf2-homeassistant-0.72.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: home-assistant

Partial log (click to expand)

copying path '/nix/store/45993sfl15lkq626rwdcmhrpckxs0kn6-python3.6-voluptuous-serialize-2018-03-10' from 'https://cache.nixos.org'...
copying path '/nix/store/wik3qd5hr2jz414v2vw1vbfqy4b3n870-python3.6-urllib3-1.23' from 'https://cache.nixos.org'...
copying path '/nix/store/li27hpkvvc3z3jbya38835wqf3lrcpci-python3.6-user-agents-1.1.0' from 'https://cache.nixos.org'...
copying path '/nix/store/gpfvffqn818p6a7xikk8rqj7s42q6kpy-python3.6-requests-2.18.4-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/y0fjdr68b9i4j2fxfj0fiwmc4s5gq0s3-python3.6-aiohttp-3.3.2' from 'https://cache.nixos.org'...
copying path '/nix/store/w6mg8x1vpf9jm0pvggk96sdqi6vpjc1d-python3.6-home-assistant-frontend-20180622.1' from 'https://cache.nixos.org'...
copying path '/nix/store/ndv6m25bhs4p3jab75dbi0cx6r9h4ay7-python3.6-astral-1.6.1' from 'https://cache.nixos.org'...
copying path '/nix/store/jzg5b93y54pxs08pkf5s0qfbbgqxl4h1-python3.6-aiohttp-cors-0.7.0' from 'https://cache.nixos.org'...
copying path '/nix/store/ysv8yw8q1gppyrflvyqv6r22gl41i5cz-homeassistant-0.72.0' from 'https://cache.nixos.org'...
/nix/store/ysv8yw8q1gppyrflvyqv6r22gl41i5cz-homeassistant-0.72.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: home-assistant

Partial log (click to expand)

/nix/store/28skddbwca5cvzil5nv0fpkj20vwl9h5-homeassistant-0.72.0

@dotlambda dotlambda merged commit 352995d into NixOS:master Jun 26, 2018
@dotlambda
Copy link
Member

Thanks @makefu! That Dark Sky API seems to be interesting indeed.

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

6 participants