Author Archives: hirokiqi

Status Reports: Mar 29, 2013

Felix Sung:

Currently

  • Have noninteractive HTML view of checklist items, lots of skeleton code
    Working on ability to check off items.
  • Figuring out Backbone.js.

Roadblocks

  • Not familiar enough with Javascript / Backbone.

Next

  •  Ability to add checklist items, check off checklist items.

Questions

  • None.

Surya Nallu:

Currently:

  • Fixed bug involving using easy_install call which was overwriting the easy_install.pth file.
  • Fixed bug involving using easy_install call which was overwriting the easy_install.pth file.
  • Added pagination support for search results (each JSON response sends “next” and “previous” keys (if needed) with respective offsets into the search results for paging).
  • Restricted access to the administrators for the new resources created in webAPI (equivalent to @staff_member_required).
  • Ported the extension browser css file to .less and posted a review which is now out of WIP (/r/3906).

Roadblocks

  • None.

Next

  • Follow up on some minor changes in the updated review — should be out for a review again by Saturday (tomorrow).
  • Finish documentation for detailing the structure of JSON responses expected back with an overall view of the endpoints.
  • Try testing out the features fully on a production environment.

Questions

  • Are there any more changes required @ /r/3973?

Greg Wang:

Current

  • Prevent `linkifyText` from applying to `.rich-text`
  • Rename `rich_text_markdown` function and template to `review_text_block`, which generate all pre-text blocks now.
  • Add textUtils.js and inserted `marked` options initialization
  • Extract `linkifyText` from reviews.js into three different functions in textUtils.js

Roadblocks

  • Need reviews on the current file and program structures

Next

  • Adjust Markdown styles

Questions

  • None

Hiroki Gohara:

Current

  • Modified cording style and Documentation.
  • Tried taking EasyFix bug.

Roadblocks

  • None

Questions

  • None.

Jon Demelo:

Currently

  • Continued to address task #1′s merging/outside commit issues, I’ve hopefully dealt with it. We’ll see.
  • This is one of those weeks where the time I’ve been able to set aside for this project lies after this status report deadline, so I will be addressing the task #2 fixes on Sunday!

Roadblocks

  • No roadblocks. Just the end of the year battle.

Next

  •  Sunday is my scheduled work period for the project, so I’ll be addressing task #2′s fixes!

Questions

  • No questions.

Schramm Katherine:

Currently

  • Updating columns
  • Making changes per the review posted to my patch

Roadblocks

  • None

Next

  •  More of the same

Questions

  • None.

 

Advertisements

Meeting Minutes for Group B – March 23th, 2013

Announcements

m_conley: hiroki and yurimingp – this is it! Final week!  Your work should come out of WIP within the next day or two, and we’ll be reviewing it. Make sure to ping us if you’re blocked on reviews, and we’ll get to it ASAP.

ChipX86: Last semester, we did a sort of “Show Off Your Work” presentation on Google Hangout. it was optional, btu let people show what they had put together. If any of you are interested in that, please let us know. This can always be after the semester too. Not an official part of your course. (and you could also just observe if you didn’t want to present but presenting is awesome)

m_conley: Next weekend is Easter weekend. Not sure how that affects you folks, but we’re going to be proactive and cancel next week’s in-IRC meeting. Status reports should still come in on time, but questions will be asked and answered over email.

 

Note

Demelo:

– addressed the initial fixes.
– It probably got lost because, after the rebase, it ended up looking like an empty commit (since it went back to how it was before your change)
– git reflog
– git log -g –abbrev-commit –pretty=oneline –author “your name here”

Hiroki:

– got a few reviews on your patch
– take easy fix bug, ” http://code.google.com/p/reviewboard/issues/detail?id=1995&q=label%3AEasyFix&colspec=ID%20Type%20Status%20Priority%20Component%20Owner%20Summary%20Milestone

Yuri:

– got some reviews.
– fix them in tomorrow(24th Mar)

Closing

m_conley: This is mostly for hiroki_ and yurimingp, since this is their last official meeting. I’d just like to extend a friendly invitation to continue hacking on Review Board. We like you folks. We’re really happy with the community we’ve developed around Review Board, and we’d love to have you keep sticking around and hacking. Whether or not it’s bugs in the bug tracker, or if you have an itch to scratch, or if there’s some problems with your projects that you just want to polish off. Also, if you’re still students going into the summer, you might consider applying to GSoC for Review Board. We cannot guarantee that you’ll get accepted, but you have nothing to lose. Feel free to keep hanging out in this channel. But if you’re likely not going to, that’s OK too – just tell ChipX86 to disable your bouncer (if you had one). And that’s totally acceptable. You won’t be black-balled – you’re welcome back anytime. 🙂

Blog Post: Hiroki

I’m Hiroki GOHARA, a first year graduate school student from the University of Tokyo.
I am really glad to have the opportunity to participate in the Reviewboard in this winter.

This course started with 2 days Hackathon at Facebook’s office on middle of January. In the Hackathon, I tried fixing a bug which is coursed by Tag name mismatch. It was very hard for me because I didn’t know much about Reviewboard  Django framework, jQuery , and architecture of Reviewboard. But I fixed the bug over time with our mentors help. And I put the review request of my work. The funny thing was that the modification of Reviewboard was reviewed through the Reviewboard. I felt very happy that my work was taken in the project.

Trophy case

I’m working on the Trophy case in this course. What’s the Trophy? It’s something which is more exciting the Reviewboard. For example, trophies are attached on review request which has special ID. People want to collect trophies and Reviewboard will be activated. My goal of this course is to make an improvement about logic of the Trophy. I have changed to use database when show the trophies at the review request. Therefore, it is calculated once whether or not to show the trophies.
I will change trophy type logic more pliability to handle a large variety of trophies for next step.

Things I learned

In this work, I had experience and knowledge. I have never used Django framework before.
I learned MVC architecture, especially “Model” during changing logic to use database.
I also learned unit tests. It is very useful to confirm the validity of my work. I should develop to pass all of tests.
With one month, I work more to capitalize on an opportunity to get experiences. I’m very happy to participate in this project.

Meeting Minutes for Group B – March 2nd, 2013

Announcements

I’d remind hiroki and yurimingo that tomorrow is the approximate midterm point of the course for you. (well, the course from our perspective)

Question Period

yurimingo:

Q:  i don’t have any idea what i should check

A: You can move that over to test “iftrophy” instead. most of the unit tests should probably be in Hiroki’s code. (As a side note, I’m getting a little worried about the common code in yurimingo and hiroki’s patches – we’re setting ourselves up for manual merge…)

Demelo:

Q: if it’s possible, could you give me a screenshot of the specific banner its referring too, there’s so many banners that I can’t figure out the exact one. I’m good with what the changes require tho, just can’t find which banner it is.

A: currently it’s just the text box. which works like the fields. might be a couple things to figure out, play around with. I’m going to be doing a round of reviews tonight and tomorrow. glanced at it and in general it looked fine. there will be some things to fix.

hiroki:

Q: It looks difficult for me ” We need to move the trophy “type” logic out into the TrophyManager. TemplateTags, etc, should not care about palindromes or milestones. This adds a maintenance burden, and is fragile.”

A: so, I’m concerned that too many pieces of the code outside of the TrophyManager know about the types of trophies we have. the templatetags, for example, look specifically for palindrome and milestone trophy types. this was fine for those two trophies, but now that we’re more serious about trophies, this is not sustainable. basically, the only place that should know anything about specific trophies should be in TrophyManager. the template tag and any other code should ask TrophyManager. For example, it might call a function on TrophyManager, passing the review request, and then get a result back

Q: I want to do something to make adding a trophy_type easier. but I don’t see how to implement it.

A: ok, after this meeting, how about we talk and sketch out a spec.
https://hackpad.com/Trophy-Case-Design-MK30awhb3nL

 

Closing Remarks

none

Meeting Minutes for Group B – February 9th, 2013

Announcements

Announcements:

It’s been far, far, far too quiet in IRC. Your mentors are starting to get freaked out.
This has been a very unusual semester so far – normally, we would have seen more traffic, more questions and it’s been super-silent.
Which means one of several things:

  • You’re all coming along just swimmingly, and aren’t running into any difficulties whatsoever
  • You’re not working enough on the project, and don’t have any questions because you haven’t put in enough time yet
  • You’re working on the project, and are running into difficulties, but you aren’t asking questions

2 and 3 are a problem. If you fall into either of these categories, it’s time to stop being there. You should definitely be putting time into this course. You should also definitely be asking questions. So, unless you fall into group 1, we should have seen more questions by now. Don’t wait for the meeting to ask questions. Please ping us on IRC anytime during the week We might not respond right away, but our bouncers will record what you’re asking and we’ll respond to you. Alternatively, send mail to reviewboard-dev or reviewboard-students. Please ask questions when you’re stuck. It’s that simple.

Question Period

Q: Which does python-codes control templates? (esp. “templates/accounts”)

A: are you asking about templatetags? The commands inside of templates? Or are you asking how Django renders templates? Or how the template folders are structured? Or something else entirely? We’d be happy to answer for any of those, but I recommend keeping this bookmarked:https://docs.djangoproject.com/en/dev/ref/templates/  That’s basically a complete reference to everything related to Django templates. Could you please rephrase your question?

Q: RB may use django’s template function but i couldn’t find which code control them.

A: Django has a ton of built-in template functions RB will call render_to_response and pass the template name and some variables (a “RequestContext”) that the template can use. Here’s a big list: https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs. Django provides all the special tags (like {% if %}) in the template. So a template is just HTML + those tags. I should also point out that Django’s templating language is extensible. We can provide our own templatetags – we have one called “commentcounts” for example, that returns a JSON array of comments for a filediff.

Q: i don’t understand what i have to change code

A: so, that’s where the templates are stored. so, the first big question is: “Where is the user page template?” This is the question you should have asked. And that’s something we can totally answer. you can find the user page template at reviewboard/reviewboard/templates/reviews/user_page.html. so this answers your first question, where is the user page template. What is your next question?

Q: which does code control them? reviewtags?

A: Django’s built-in templating support basically takes care of it for you look at the ‘submitter’ function in reviews/views.py. This is what renders using that template https://github.com/reviewboard/reviewboard/blob/master/reviewboard/reviews/views.py#L919. this function is what is executed when someone goes to /users/[some user name] https://github.com/reviewboard/reviewboard/blob/master/reviewboard/reviews/views.py#L949 this line is what is rendering the template. We’re doing this in a kind of special way here because of the datagrid.

Q: I tried to fix issue3780. I cannot write code here… http://pastie.org/6107716 . this is function related syncnum (widgets.py). it generate cache at line 2

A: it *might*. cache.add(KEY, 1) will only set the value of KEY to 1 if and only if that value is not currently being stored already. so if no value exists for KEY, cache.add(KEY, 1) will set the value to 1. but if a value *does* exist for KEY. this line is a no-op. no-op = does not do anything. which I think is what you want, is it not? the cache is a very simple key / value store. with the caveat that things might disappear from it over time. it only stores the data you give it okay. in your case, it’s storing 1, and later it’s incrementing the stored number. but it can store strings too. for example, generated templates are converted into strings and stored in there. er, by generated templates, I think I mean rendered templates.

Q: have some questions about datagrids.

A: Datagrids power things like the dashboard They take a query, a list of columns, and can render the data for each result in the query, given the columsn that are turned on. and they do things like allow the user to choose which columns they want to see, in what order, etc. which part?

Q: I’ve seen a few cases where groups are requested, and it seems like whatever was returned was in a  list format, more so confirmation.

A: do you have a function you can point to? there might be something being done that’s fed into a datagrid, or used to choose a datagrid’s query. the base datagrids don’t know anything about the data coming in. They leave it up to a subclass (things in reviews/datagrids.py) to say what data to render, what the query should be, default columns, etc.

Q: like i said, i was just curious, I’m not directly dealing with it right now so i don’t have a specific reason/function.  i’ve got a few more related questions though for my task.

A: ok.I’d be happy to walk through this in more detail after the meeting or any time this week

Q: Like i said in my report, today and tonight is my coding day, so, I’m come up with a question or two over the past few hours. so i’ve successfully been able to convert a review request into it’s appropriate url link within the review_request_box.html . however, i’m struggling to find how to convert a draft it seems like the _get_review_request function in the draftreviewrequest model is private. i have no way to break into it’s review request to get the id. should i just make it a standard public function, or would you suggest another route.

A: most places that deal with a draft also have the review request handy where is this? if you have the draft model, you can just follow the fields draft.review_request.get_absolute_url(). when there’s a foreign key relation, when you access that field it’ll give you an instance of the target model. is this in a template or python code?

Q: I’m using it in the review_request_box.html, through the models.py of reviews

A: So in there, {{review_request}} should point to the review request you care about ({{review_request_details}} may be a review request or a draft, depending on the state) does that clear it up?

Q: yup, i’ll work with this to go forward. so when a user types in a new field within _box.html, if it’s incorrectly entered or something wrong, we get the red error box

A: right. https://github.com/reviewboard/reviewboard/blob/master/reviewboard/static/rb/js/reviews.js#L166 This does that

Q: I added Trophy model and changed LocalSiteProfile model at reviewboard/accounts/models.py. After that I wanted to update DB definition. But I had a error with this command. “manage.py evolve –hint” I got this error. “django.db.utils.DatabaseError: no such table: django_project_version” I don’t understand how to solve this error.

A: are you running this from inside the directory where manage.py is? or from the top of the source tree? it looks like it’s not seeing a populated databas you probably want to be running it like this: ./reviewboard/manage.py evolve –hint

Q: I ran “reviewboard/manage.py”

A: what happens if you run: ./reviewboard/manage.py syncdb. just to make sure, did you have your local Review Board working? and is your local instance still operating properly? If you run ./reviewboard/contrib/internal/devserver.py, and go to localhost:8080 in your browser, are things still working properly? (just ./contrib/internal/devserver.py)

Q: ”./contrib/internal/devserver.py” was working. but I’m not sure “evolve –hint” is working. I got “No evolution required.”

A: ok. So maybe the change you made is already in the database now. What you can do is: 1) make a backup of the database, 2) delete it, 3) switch back to the ‘master’ branch, 4) create a new database (./reviewboard/manage.py syncdb), then 5) switch back to your branch and try evolve –hint again

Q: I don’t know how to make a backup of the database. could you tell me?

A: sure – the database is called reviewboard.db. you simply need to copy the file. Is the evolve –hint working now?

Q: It is working and I got “Trial evolution successful.”   Thanks!

Closing Remarks

ask questions. Prepare for the meetings with questions and data.The more detailed your status report and questions, the better.
Use pastie.org or pastebin.com. And don’t wait for the meetings. ask us as soon as you’re stuck
we’re here to get you unstuck. Use us.