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

v1.5 release #727

Merged
merged 27 commits into from
Feb 10, 2019
Merged

v1.5 release #727

merged 27 commits into from
Feb 10, 2019

Conversation

bennuttall
Copy link
Member

@bennuttall bennuttall commented Feb 7, 2019

TODO:

bennuttall and others added 17 commits February 7, 2019 10:40
Fix all the missing links found, expand some examples, tidy up diagrams,
structure some of the chapters a bit better (regular vs base classes in
the API reference).

No code changes in this commit; it's all docs.
A little more docs work, plus tidying up the code to match the freshly
fixed docs (e.g. all devices, including internal, should have a
pin_factory arg in their constructor).

Make a vague attempt to appease pylint with some line-length fixes; I
don't think it's going to be terribly useful yet though...
ASCII art for the 3A+, 3B+, and fix up the CM ASCII art
The class hierarchies are a bit messy; some things appear in the
OutputDevices page which don't actually descend from OutputDevice (like
Motor) because they're multi-pin composite devices, but we want to
present them as something relatively simple for the sake of younger
programmers.
@bennuttall bennuttall added this to Important / ready in Triage Feb 8, 2019
@bennuttall bennuttall moved this from Important / ready to In progress in Triage Feb 8, 2019
@codecov-io
Copy link

codecov-io commented Feb 9, 2019

Codecov Report

Merging #727 into master will decrease coverage by 0.04%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #727      +/-   ##
==========================================
- Coverage   79.13%   79.08%   -0.05%     
==========================================
  Files          22       22              
  Lines        4352     4361       +9     
  Branches      634      638       +4     
==========================================
+ Hits         3444     3449       +5     
- Misses        855      856       +1     
- Partials       53       56       +3
Impacted Files Coverage Δ
gpiozero/spi_devices.py 89.44% <ø> (ø) ⬆️
gpiozero/__init__.py 100% <ø> (ø) ⬆️
gpiozero/pins/native.py 37.13% <ø> (ø) ⬆️
gpiozero/pins/mock.py 91.72% <ø> (ø) ⬆️
gpiozero/threads.py 87.5% <ø> (ø) ⬆️
gpiozero/exc.py 100% <ø> (ø) ⬆️
gpiozero/pins/rpigpio.py 3.17% <ø> (ø) ⬆️
gpiozero/mixins.py 97.88% <ø> (ø) ⬆️
gpiozero/pins/spi.py 91.04% <ø> (ø) ⬆️
gpiozero/pins/pigpio.py 1.34% <ø> (ø) ⬆️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8aee06...6f45c90. Read the comment docs.

Just to make the diffs of the generated .dot files easier to read.
We're not doing copyright attribution for contributors because frankly
we haven't been doing it so far and it'd be a right pain to start now.
So "Ben and contributors" it is. I'll fill out the license headers in
a bit.
And add a Makefile target for it, and some notes in the docs clarifying
that contributors retain their copyrights.
And ignore some other useless build artifacts
@bennuttall
Copy link
Member Author

Thanks @waveform80 looking great. I've added a todo list to the top of this PR (which is just a merge request for the docs-tidy-up branch). I think all that's missing now is #630 and your TonalBuzzer changes. And are you happy with #728?

@bennuttall
Copy link
Member Author

@waveform80 sorry hadn't seen your tones branch, I've created PR #729.

Are you happy with it? I will give it some testing with JamHat. Looks great though!

@lurch
Copy link
Contributor

lurch commented Feb 10, 2019

If @waveform80 has time, I think it would be nice if #718 (comment) got fixed for v1.5 too, i.e. add a background thread so that the 'events' fire for InternalDevices.

AIUI if the example shown at https://gpiozero.readthedocs.io/en/stable/api_other.html#gpiozero.TimeOfDay was changed slightly to:

from gpiozero import TimeOfDay, Energenie
from datetime import time
from signal import pause

lamp = Energenie(0)
morning = TimeOfDay(time(7), time(8))

morning.when_activated = lamp.on
morning.when_deactivated = lamp.off

pause()

then the lamp wouldn't turn on and off as you might expect it to.

(although I've not written or run any GpioZero code for ages, so if that does work already then please ignore me and accept my apologies!)

@bennuttall
Copy link
Member Author

@lurch you are correct, it's still broken. However we are on the brink of a release (probably tomorrow) and I think we agreed to leave it to v1.6. Perhaps if it's easy enough we can fix it and pop into a 1.5.1 release?

@bennuttall
Copy link
Member Author

bennuttall commented Feb 10, 2019

There's an issue with pi_info() as it's currently documented.

Both here and here we say you can do:

>>> from gpiozero import *
>>> pi_info()

but you can't any more. You need to set Device.pin_factory first.

Is that a bug that can be fixed in pi_info()?

Update: already fixed in this branch, duh.

@waveform80
Copy link
Member

If @waveform80 has time, I think it would be nice if #718 (comment) got fixed for v1.5 too, i.e. add a background thread so that the 'events' fire for InternalDevices.

Yeah - it would be lovely, but I've already delayed this release enough as it is. I'll try and get that into a 1.5.1 as Ben suggests as it's a major deficiency in the current API.

@waveform80
Copy link
Member

... You need to set Device.pin_factory first.

Is that a bug that can be fixed in pi_info()?

Hmmm ... good point. pi_info() should probably be calling _default_pin_factory - although that's a little dirty - I wonder if there's a "cleaner" way ...

@lurch
Copy link
Contributor

lurch commented Feb 10, 2019

we are on the brink of a release (probably tomorrow)

Ahhh, I've not been keeping up with things and didn't realise the release was so imminent 🙂
BTW seems there's some issues in the first comment which have been "ticked" but the linked issue is still open and I can't see if it's been implemented? e.g. #406

@bennuttall
Copy link
Member Author

#406 is implemented in #727 (the docs-tidy-up branch): 6f45c90

@bennuttall
Copy link
Member Author

Ticked but issue open = done but unmerged

@lurch
Copy link
Contributor

lurch commented Feb 10, 2019

P.S. I dunno what's going on with GH not showing the associated code next to my review comments above :-(

@@ -32,13 +32,14 @@ Release 1.5.0 (2019-02-01)
`#634`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there an underscore missing after 634 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like it - feel free to push little fixes like that when you see them (if you have time).

The method of constructing Device.pin_factory has changed; it is no
longer implicit upon import which means pinout needs to move where it
tests for the inability to construct it (when run on a PC with no
explicit mock settings)
@bennuttall bennuttall merged commit f82fefa into master Feb 10, 2019
Triage automation moved this from In progress to Done Feb 10, 2019
@bennuttall bennuttall deleted the docs-tidy-up branch February 10, 2019 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Triage
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants