Skip to content

A few minors issues are addressed and a new example is added#51

Closed
nameoftherose wants to merge 6 commits into
python-zeroconf:masterfrom
nameoftherose:master
Closed

A few minors issues are addressed and a new example is added#51
nameoftherose wants to merge 6 commits into
python-zeroconf:masterfrom
nameoftherose:master

Conversation

@nameoftherose
Copy link
Copy Markdown

No description provided.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 76.276% when pulling c9284d0 on nameoftherose:master into f33b8f9 on jstasiak:master.

@stephenrauch
Copy link
Copy Markdown
Collaborator

I am not in charge of this repo, but you probably should squash all of those build commits. Also it is generally good form to add test coverage for any new lines of code.

To squash the changes for the last 11 commits, from a shell with the correct branch checked out you need to do:

git rebase -i HEAD~11

An editor should appear. For all but the first line, at the beginning of the line change the word to squash. Save the file.

Another editor should appear. This will be the new comments for the squashed commit. Probably want to delete all but the original comment.

Then you need to force push the changes by:

 git push origin {branch-name} --force

Change {branch-name} to the appropriate branch name. more details here:

https://github.com/ginatrapani/todo.txt-android/wiki/Squash-All-Commits-Related-to-a-Single-Issue-into-a-Single-Commit

@nameoftherose
Copy link
Copy Markdown
Author

Thank you, I will try to. All these commits were forced on me by travis for stylistic reasons.
It is quite obvious this is my first time, your help is welcome.
I would also appreciate any suggestions or references concerning test coverage.

@stephenrauch
Copy link
Copy Markdown
Collaborator

Test coverage:

My preferred way would be to revert the changes in my local work space. Then add test cases to show the error. Then add changes back in one at a time to see that the changes handle the error demonstrated by the test case.

For running the test cases, there are two ways I use:

  1. pytest under pycharm. pycharm is great tool. It will not only run the test cases in an easy to follow manner, it will show you most of the stylistic problems right in the editor.

  2. sign up for accounts on the various testing services and enable your forked repository in those services. Then, do any work on a personal branch. After that, when you push that branch to github, the testing service can pickup your changes and run the test suite on your repo. Easiest way to get to the testing service is to click on their badge, and then logon via your github account. Badges are generally on the main page below the files section. In the case of python-zeroconf, goto your repo main page and scroll down to the readme.rst section. Click on the 'build passing' badge and also on the 'coverage xx%' badge to go to the various service provider pages.

I added a bunch of test coverage on pr #45 and some more on #49, so you can look at those if you like. In general, for your error handling, you need to figure out how to source a packet which has the error condition your new code will be handling.

Hopefully the owner of this repo will be back soon to pickup these various changes...

Cheers,

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 76.276% when pulling bd0935b on nameoftherose:master into f33b8f9 on jstasiak:master.

A few minor issues mentioned below are addressed:
1. Unicast responses are sent to the port where the query came from.
   This makes zeroconf compliant with RFC 6762 §6.7 enabling legacy programs
   like nslookup to resolve names ending in .local
2. DNSAdress Object __repr__() is modified to properly treat ipv6 addresses
3. DNSService constructor is modified to handle mixed case names
4. malformed packets sent by certain minimal mdns responders are handled (ie ignored) without throwing exceptions

zcresolv.py is added to examples resolving names in the local domain
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 76.276% when pulling 2ecc9eb on nameoftherose:master into f33b8f9 on jstasiak:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.2%) to 76.777% when pulling f25ff7b on nameoftherose:master into f33b8f9 on jstasiak:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+1.0%) to 77.578% when pulling 1025c51 on nameoftherose:master into f33b8f9 on jstasiak:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+1.0%) to 77.578% when pulling ebffd73 on nameoftherose:master into f33b8f9 on jstasiak:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+1.4%) to 77.978% when pulling d4a20bb on nameoftherose:master into f33b8f9 on jstasiak:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+1.4%) to 77.978% when pulling 8f7e462 on nameoftherose:master into f33b8f9 on jstasiak:master.

@nameoftherose
Copy link
Copy Markdown
Author

@stephenrauch Thank you very much for your help

@stephenrauch
Copy link
Copy Markdown
Collaborator

@nameoftherose you are welcome. Those tests look great. I remember how out of sorts I was while trying to understand the workflow the first few times I committed changes on github.

Cheers,

PS. You are probably going to want to squash those changes down again.

@jstasiak
Copy link
Copy Markdown
Collaborator

Hey @nameoftherose, thanks for the patch. Would you mind cleaning the branch up? (Mainly I'm thinking about squashing related commits together and splitting some larger commits into logically-independent changes).

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 12, 2016

Coverage Status

Coverage decreased (-0.3%) to 76.276% when pulling bd0935b on nameoftherose:master into f33b8f9 on jstasiak:master.

@bdraco
Copy link
Copy Markdown
Member

bdraco commented May 3, 2021

This PR has gone stale, if you are still interested in merging this work, please open a new PR. Thanks 👍

@bdraco bdraco closed this May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants