User:Fhocutt

I'm Frances Hocutt. I trained as a chemist and materials scientist and have recently decided to move on from the field. I enjoy: playing with patterns and details, working on tools, creating supportive communities, and clear communiction. I like making things, whether that's with words, wood, fibers, textiles, or chemicals.

My constants:
 * It's always more complicated.
 * So what are we going to do about it?

Me, elsewhere:
 * Twitter: @franceshocutt
 * Website: www.franceshocutt.com
 * CV: www.franceshocutt.com/CV
 * My hackerspace: www.seattleattic.com
 * Ravelry: franceshocutt

I'm applying to the OPW internship project; here's a draft of my proposal. I'm interested in improving the documentation around the Wikimedia API because I want to make Wikimedia's toolset easier to use and improve the ways that clients can interact with it. I want to learn how APIs work, I want to learn to write good specs, and I want to see what a variety of implementations look like in different languages.

Status
Since Sumana emailed me with details on this project, I have:
 * Learned what APIs are and discussed with Sumana what the point of an API library is
 * Ideally, it provides affordances that lets you access the deeper wiki structure in an intuitive and functional manner
 * Asked around for well documented APIs that other people have suggested
 * Ruby/S3 SDK
 * Google Drive
 * Google Android
 * another Google one
 * there were a few more
 * Looked at the code and the documentation for the Python libraries listed on API:Client Code
 * Noticed that some of the libraries created layers of abstraction around the MediaWiki API, and others were very simple wrappers over the MediaWiki API
 * Compared the three simple libraries on whether they are maintained, documentation quality, and whether the library includes unit tests. early revision
 * Attempted to start testing simplemediawiki...
 * ...but flailed very hard at setting up my tools. My portable computer only has Windows working on it right now, so, lessons learned:
 * I already had Python installed, but it turns out that I didn't have a package manager. It additionally turned out that pip is ironically difficult to install on Windows.
 * A recommended .tar.gz unzipper is http://www.7-zip.org/. Note that you have to run it twice, once for the .tar and once for the .gz.
 * I tried installing setup_tools with the installer it came with and then install pip with setup_tools, but when I then tried to use pip to install the simplemediawiki library I got error messages referencing "egg_info failed", usually associated with a bad package installer.
 * Installed simplemediawiki with pip! Finally it worked and I could import it with no problems. Once that worked, also installed mwclient with no problems.
 * Started writing test scripts!
 * Started trying to use simplemediawiki to make API calls like those suggested in the API sandbox.
 * Problems along the way: [scripts get linked to here, too]
 * Had to figure out that the call function was very close to the actual API calls. I wasn't totally clear that 'action' wasn't to be replaced by e.g. 'wbsearchentities', but once I looked at the API documentation I could see that the same arguments were passed in as a dict)
 * Had to figure out not to try Wikidata API calls with the Mediawiki page! (this is still in the wbsearchentities script along with testing)
 * tested queries of various sorts, they worked fine, cool
 * get stuff seemed to be working ok, so I tried to post
 * logged in, login was fine and easy to use
 * I flailed around with tokens (remembering python syntax: GoodIdea, also see: http://stackoverflow.com/questions/17730144/getting-a-python-error-attributeerror-dict-object-has-no-attribute-read-t)
 * I actually read the tokens documentation Manual:Edit token, API:Tokens, User-Agent policy,, and I'll link all of those here
 * this is where I figured out the mediawiki/wikidata bug!
 * so I got tokens and 'edit' working! woohoo. haven't tested other post calls yet. Also haven't tested the wikibase post calls in the wikidata sandbox yet so I don't know if login/cookies/tokens work there.
 * General feeling: simplemediawiki makes it easy to make calls pretty directly to the API interface in a simple python bot. woo! Has not failed yet once I gave it what it expected!


 * mwclient
 * Once installed (also fine once I had pip), I looked at the documentation and pretty easily got it working for get calls (though you have to take care with capitalization or you get funky errors like http://stackoverflow.com/questions/4534438/typeerror-module-object-is-not-callable); different variable names in the sample code would be useful, yesss

Resources

 * MediaWiki collaboration tools
 * Wikimedia pastebin
 * Example, shared on IRC with Sumana: https://tools.wmflabs.org/paste/view/1394197e
 * MediaWiki code
 * Bugzilla list of open API bugs
 * Using this search page and searching for "API" yielded no results, but using the search textbox at the upper right corner does
 * Submit a bug


 * Learning styles resources for engineers/scientists
 * Learning styles as used at Hacker School
 * I love that Mel addresses the "but I don't fit into either of these options!" objection, because I thought precisely that at several points on the quiz
 * Quiz to figure your own out
 * my results and reflections on them
 * Description of 4 learning-style spectra


 * MediaWiki API resources
 * Special:APISandbox
 * API:Client code
 * Project:Sandbox
 * API
 * API:Tutorial
 * the Wikidata API sandbox
 * Extension:Wikibase/API


 * Other MediaWiki resources
 * Manual:Coding conventions/Python


 * Other API resources
 * Google, Ruby, S3 APIs
 * Ch. 1-2 of RESTful Web Services


 * Test pages/wikis, ok to use for trial edits
 * https://test.wikipedia.org/wiki/Main_Page
 * https://test2.wikipedia.org/wiki/Main_Page
 * Project:Sandbox
 * Not on my bot's talk page...