Help needed for first pull request

I’ve just registered for Hacktoberfest and I’m looking to make a contribution to Mopidy. I was looking through the issues and found Issue 1198 which seemed like a good place to start - just to make sure I actually know what I’m doing! I’ve looked through the code and found the possible search queries in the internal.validation file and I’m ready to make the change.

Basically, I just wanted to run the process by someone before doing it in case I’ve got something wrong. My current understanding is that I will need to follow these steps:

  1. Fork the Mopidy repository.

  2. In the develop branch, edit the comment for the search function of LibraryController in core/ with the list of possible search criteria. This is the part I really wanted to make sure of. It seems to me that the documentation is auto-generated from the comments in the API, so this would be the only change I need to make. Am I correct in thinking that?

  3. Create a pull request from my develop branch to the official branch.

  4. Hope for the best.

Any guidance is very much appreciated!

You’re correct in that the API reference docs are generated from the comments in the source code.

Your suggestion procedure should work nicely. One possible improvement is to create a new branch off of the develop branch. Make your changes in the new branch, push the new branch to your repo fork at GitHub, and submit that branch as the pull request. That way you are free to update your develop branch to match any changes we do in the upstream develop branch, and you’re also free to create new branches for other unrelated fixes.

See for detailed instructions.

Thanks for the help! I’ll give it a whirl tomorrow.

Alright, I’ve opened the pull request but for some reason one of the Travis CI builds have failed. I’ve had a look at the details but unfortunately can’t work out what went wrong - I only made a small change inside an existing comment so I’m not sure how it could have caused tests to fail.

As I answered in the pull request, the test failure seems to be caused by a bug in pytest 2.8.1, and has nothing to do with your change.

Thanks for the contribution! :slight_smile:

Ah, that makes sense. Thanks for all your help - I look forward to hopefully contributing more in the future!