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

Add a patch/unpatch example for the Python API #671

Merged
merged 4 commits into from Mar 15, 2015

Conversation

@simark
Copy link
Contributor

@simark simark commented Mar 11, 2015

It serves as an example and it's useful as a quick way to test is things
are working.

# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# ola_patch_unpatch.py
# Copyright (C) 2005 Simon Newton

This comment has been minimized.

@peternewman

peternewman Mar 12, 2015
Member

Just you again.

from ola.OlaClient import OlaClient
import argparse

__author__ = 'nomis52@gmail.com (Simon Newton), ' \

This comment has been minimized.

@peternewman

peternewman Mar 12, 2015
Member

Just you.



def ParseArgs():
description='Example program that shows how to patch or unpatch a port.'

This comment has been minimized.

@peternewman

peternewman Mar 12, 2015
Member

I'd drop the example bit, its a fully functioning app isn't it?

It serves as an example and it's useful as a quick way to test is things
are working.
@simark simark force-pushed the simark:patch_unpatch_example branch from 9d5707a to 2ed92f5 Mar 12, 2015
@peternewman
Copy link
Member

@peternewman peternewman commented Mar 13, 2015

LGTM, @nomis52

One thing @simark , I'd rather see the commit history please, as opposed to them being squashed, otherwise I have to review the entire thing each time. If you don't squash them, I can just review the changes to fix comments/other issues.

@simark
Copy link
Contributor Author

@simark simark commented Mar 13, 2015

Ok, so next time I should add commits on top of the initial one when addressing comments?

return argparser.parse_args()


def PathPortCallback(status):

This comment has been minimized.

@nomis52

nomis52 Mar 14, 2015
Member

Change to PatchPortCallback() , PathPort is something different :)

@nomis52
Copy link
Member

@nomis52 nomis52 commented Mar 14, 2015

Just the one comment


def PathPortCallback(status):
if status.Succeeded():
print('Success!')

This comment has been minimized.

@nomis52

nomis52 Mar 14, 2015
Member

2 character indents please

@peternewman
Copy link
Member

@peternewman peternewman commented Mar 14, 2015

Yes please @simark , just make another commit with the fixes from the comments, and push that, so we then have two commits, we can see the overall change via GitHub, and the changes to address our comments only by viewing the second commit.

@simark
Copy link
Contributor Author

@simark simark commented Mar 14, 2015

Done!

@nomis52
Copy link
Member

@nomis52 nomis52 commented Mar 15, 2015

One thing I forgot, you need to add these to the Makefile.mk in the same directory - otherwise they won't be included in the tarball.

@nomis52
Copy link
Member

@nomis52 nomis52 commented Mar 15, 2015

Other than that this looks fine.

@simark
Copy link
Contributor Author

@simark simark commented Mar 15, 2015

Ah, of course. Done.

@nomis52
Copy link
Member

@nomis52 nomis52 commented Mar 15, 2015

Thanks!

nomis52 added a commit that referenced this pull request Mar 15, 2015
Add a patch/unpatch example for the Python API
@nomis52 nomis52 merged commit 8275bcd into OpenLightingProject:master Mar 15, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 55.78%
Details
@peternewman peternewman modified the milestone: 0.9.6 Jun 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants