| Friday, 3rd June 2016 - 15:30 UTC
| jayvdb, darthbhyrava
{Icon user} legoktm did not attend
IRC Chat
Description: Second weekly project meeting.
Start: 15.30 UTC
End: 17.00 UTC
Minutes of the Meeting
.
Design for Code
A rough sketch of the code I want to add to thanks.py. Please see T136892#2353272
- This is not what was described in T135409, we are not building a bot here, we are writing code that others will use in their bots.
To stay on track, I must ignore the class diagrams etc, as I don't have it yet, and jump straight into coding. By next Wednesday morning, create a proof of concept that sends thanks to the server for an edit on test.wikipedia.org for this edit. Ignore all design. Create a hack that works. Write code and send it via email if necessary. Hard code anything, interact with anything. Just get it to work.
If you only have a great design by next Friday, and no working code, the project is off track, but if you have working code, and a poor design by next Friday, that is something we can improve in the following week. Once I've sent jayvdb a proof of concept for thanks, spend a day working on getting add_text.py to write to test.wikipedia.org .
Queries regarding basic.py, weblinkchecker.py
Refer to the corresponding blog post here. The doubts (jayvdb's answers are in italics) are as follows:
- What is the live wiki here? See pywikibot.handle_args for site selection , and user-config.py for site configuration
- What is the depth in issue_deprecation_warning? Stack level. The deprecation message will print a line of source code, changing depth will change the code printed.
- What is the Options variable? How are they using self.availableOptions.update without defining or calling it? It's magic, we'll look at it later in weeks 5 and 6. :)
- Why do we import unicode_literals? It means every string is unicode, not ascii. Python 2 was ascii by default, and u'...' created unicode strings. Unicode_literals says we want the python 3 default of unicode strings, and we will use b'....' if we want ascii.
- Why are we importing 'partial'? functools.partial is a core component of python, and well documented online. Google it up.
- What was the point of this conditional block? " if sys.version_info[0] > 2: ... " Google up sys.version_info.
- What are T001 tests in tox.ini? T001 & T003 : See here. flake8-print is a code checker.
- What is memento? Google up, again, but only the basics.
Unit Testing
Doubts I had based on what I'd read, and plan for the next week.
- Shouldn't I write a method first, perform unit tests for it, and then proceed to the next method to be written? How do I 'start' with unit_tests? You can write the unit tests first , or while you write the rest of your code. The former is better engineering.
- Where should I write my unit tests? In tests/thanks_tests.py.
Create test module, called tests/thanks_tests.py . Read tests/README.rst , and read tests/add_text_tests.py to see a nice simple example. I have written tests/panoramiopicker_tests.py, but that was a test which didnt talk to the network, and doesnt have a 'site'. Here, though, thanks_tests.py will need to talk to the wiki. Getting my first unit test working will be hard, and I'll probably need me to tell you how to fix the last 5% of it. Once I have one unit test written, I'll be able to replicate it and it will be easy after that.
Closing the Community Bonding Evaluation task.
T133666 was closed, after unticking some progress checkers which were left incomplete. Clarifications as to why they were unticked ensued.
Before next Meet:
- Redo design mentioned in T136892#2353272 in accordance with T135409. (See new design at T136892#2374804)
- Create the proof of concept which send thanks to server for this edit. ( Check P3234)
- Get add_text.py to write to test.wikipedia.org.
- Read tests/README.rst and tests/add_text_tests.py.
- Create tests/thanks_tests.py. (Please see here.
- Update blog. Done, see name
- Update weekly progress report.