<div dir="ltr">Ok .<div>I will be writing Milestones seperately very soon.<br>What is your irc id? and on what channel are you available.i use freenode.</div><div>Also rather than irc could we use comments in docs.google to interact.And simultaneously you can see the changes.That would quicken the process.</div><div><br></div><div><br>I have a good prior expeirence with sql.I had planned to use that instead of log file.This idea had striked my mind to create table.As it would really simplfy the statistics section.<br>But creating tables for so many ports would be good or not .is something i cant decide.<br><br>I can learn django in no time.As i mentioned i am a quick learner.<br>So i guess it would be wise to make everything in django.<br><br>I will try to create the Static Website .If possible will submit that before the deadline.</div><div><br></div><div><br></div><div>I wanted to know if we can chat somewhere. </div><div><br></div><div>Thanks</div><div>Vishnu</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 26 March 2018 at 17:23, Mojca Miklavec <span dir="ltr"><<a href="mailto:mojca@macports.org" target="_blank">mojca@macports.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Vishnu,<br>
<br>
First some general remarks, then the answers to your questions below.<br>
<br>
- One of the most important things that we should discuss and improve<br>
is the timeline. This is very little work, but it requires some<br>
coordination to make sure that they are defined in the most sensible<br>
way. One option is to discuss over IRC, but email is also fine. I'll<br>
write about that separately.<br>
<br>
- I suggest to write the milestones in a separate section. For example<br>
something along those lines:<br>
  May X: The first version of database design is ready, finish the<br>
first import of portindex.<br>
  May Y: The prototype website gets deployed at a temporary location<br>
<a href="http://xyz.com" rel="noreferrer" target="_blank">xyz.com</a>. It is possible to show the most basic properties of any port<br>
"foo" on a plain html page via <a href="http://xyz.com/index/port/foo" rel="noreferrer" target="_blank">xyz.com/index/port/foo</a> and list all<br>
ports via <a href="http://xyz.com/index/list" rel="noreferrer" target="_blank">xyz.com/index/list</a><br>
  ...<br>
  June Z: The website is accepting installation statistics submissions<br>
from users.<br>
<br>
- At the moment your schedule says "June 11-15: Phase 1 Evaluation"<br>
and no plans to code during those days and no explicit criteria that<br>
would define whether the project passed or not. It makes sense to put<br>
evaluation on the schedule, so that you see where it is, but note that<br>
this doesn't take any of your time, that's when mentors are busy and<br>
that's when you need to make sure to show results that were agreed on.<br>
(It can happen that there are valid reasons why the milestones would<br>
not be met, for example if the plan gets changed during the coding<br>
since a better solution or idea is found etc., so the milestones are<br>
not set in stone, but in case of disagreement between a student and<br>
mentor it helps a lot if it's straightforward to check for outsiders<br>
or admin as well.)<br>
I didn't check if those days are weekend, but don't make it sound like<br>
you would be spending all your time on evaluation. You only need to<br>
fill in a simple webform some time during the evaluation period,<br>
that's all.<br>
<br>
- Please do take a look at how relational databases work and get<br>
familiar with some basic Object-oriented programming in case you don't<br>
know those concepts already. This is of crucial importance for success<br>
of the project. In case you would work in Django (this is not the only<br>
option, there are other possibilities as well), you should be familiar<br>
with<br>
    <a href="https://docs.djangoproject.com/en/2.0/intro/tutorial02/" rel="noreferrer" target="_blank">https://docs.djangoproject.<wbr>com/en/2.0/intro/tutorial02/</a><br>
(this is part of a slightly longer tutorial). We need a single uniform<br>
website rather than something scraped from random chunks of scripts<br>
which do individual tasks without knowing about each other.<br>
<br>
- After the proposal gets submitted (because that's the highest<br>
priority task at the moment), we would still want to verify your<br>
skills with a simple coding challenge before we request slots (so<br>
ideally the challenge should be complete cca. one week after the<br>
deadline for proposal submission). Other organisations would ask for a<br>
pull request, but in this case it probably makes more sense to<br>
demonstrate a simple prototype. You may pick a slightly different<br>
task, but it should demonstrate comparable skillset or ability to<br>
learn. My suggestion would be to do these two tasks:<br>
(a) Create a simple (static) website for one single port of your<br>
choice and include nearly everything that will be part of the final<br>
product. You can copy some data from a Portfile to help you, but you<br>
can just as well make up the information, statistics etc. I would<br>
actually consider this to be part of the proposal. The page should<br>
demonstrate how the final product will look like (only with fake data)<br>
and will also help you while developing the actual functionality of<br>
the website: you would know where is it that you are heading. This<br>
should not take you more than a few hours to do, you basically need to<br>
visualize what should already be in the proposal.<br>
(b) Pick a framework to use and create a super simple hello-port<br>
application. In case you pick Django, go to<br>
    <a href="https://docs.djangoproject.com/en/2.0/intro/tutorial01/" rel="noreferrer" target="_blank">https://docs.djangoproject.<wbr>com/en/2.0/intro/tutorial01/</a><br>
or<br>
    <a href="https://devcenter.heroku.com/articles/getting-started-with-python#introduction" rel="noreferrer" target="_blank">https://devcenter.heroku.com/<wbr>articles/getting-started-with-<wbr>python#introduction</a><br>
or any other tutorial of your choice, install the framework and the<br>
database, follow the steps towards creating a simple app and modify<br>
the app in such a way that it will implement *any* super simple<br>
functionality from the final application. You could for example import<br>
three ports, create a listing of those three ports with symlink to the<br>
port page which will do nothing else but print port name and<br>
description. You may ask for help in case you are struggling with<br>
installation of dependencies.<br>
(c - fully optional) If you still have time and motivation, try to<br>
make the page from (a) look at nice with basic style (you could use<br>
any existing framework for fontend development or ask a friend to help<br>
you with this particular one :)<br>
<span class=""><br>
On 26 March 2018 at 11:39, Vishnu wrote:<br>
><br>
> Can you help me with where does that json api work from?where is the code<br>
> that sends request to the backend.To get that data.<br>
<br>
</span>You mean in the planned website or on our buildbot setup?<br>
<br>
For the planned website you would need to write it yourself.<br>
<br>
For our buildbot setup I honestly have absolutely no idea. The source<br>
code is here if you want to check:<br>
    <a href="https://github.com/buildbot/buildbot/tree/eight" rel="noreferrer" target="_blank">https://github.com/buildbot/<wbr>buildbot/tree/eight</a><br>
<span class=""><br>
> Once i get to know that it will simplify my job to send request to backend<br>
> for port<br>
<br>
</span>But why would you talk to backend directly? When I said that there is<br>
a JSON api, it means that you simply fetch a JSON file from the server<br>
directly, no need to talk to backend, that's what API is made for.<br>
<br>
OK, one way to solve this (if you really needed super efficiency)<br>
would be to copy the complete database and all the additional log<br>
files to your computer and do the analysis straight on the database,<br>
but I don't think that's worth the effort.<br>
<span class=""><br>
> Also is there any existing method to show all ports of a maintainer?<br>
> or to show all ports of a category?say python?<br>
<br>
</span>There is a port command that can list you all the ports from a<br>
particular maintainer or all ports from a particular category, but it<br>
would be way too inefficient to use that for the website. You need to<br>
support that in the website app.<br>
<br>
Once you read the 15 MB ports.json file (created with portindex2json),<br>
you'll have all the information about who maintains a particular port<br>
and what categories the port belongs to and you need to store that<br>
information. You cannot afford to read the file and iterate through<br>
all entries to check whether maintainer A maintains that port every<br>
single time when someone loads the website.<br>
<br>
Asking `port` to retrieve that information for you will not only be<br>
equally slow, but it will also make the website difficult to deploy.<br>
<span class=""><br>
> It would be best if i start working gmy gsoc with 3 most important things .<br>
> 1) Basic Port information through portindex2json<br>
<br>
</span>Yes, this is probably the most important piece of information that<br>
will lay foundation for everything else.<br>
<span class=""><br>
> 2) Port Build history. It would use JSON API<br>
<br>
</span>OK. But just to make sure that we are on the same page: you should use<br>
the JSON api to retrieve information from the build master *once* per<br>
build, not each time when someone takes a look at your website. You<br>
should then store the results internally.<br>
<span class=""><br>
> 3) Buildbot code updation to send updates to the logs.<br>
<br>
</span>I would say that for the time being, if you implement nr. 2 anyway,<br>
you could check the buildbot master for any updates and use the same<br>
JSON api to, say, update the status once per hour or every 10 minutes.<br>
<br>
As I already said, I would put a higher priority to statistics<br>
collection. You should be able to accept and store installation<br>
statistics submissions by the first milestone, else there will be no<br>
time to improve the code based on all the problems you might find in<br>
the process. Point 3 (buildbot code update) is merely an<br>
implementation detail to allow more efficient collection of build<br>
statistics and can be implemented later.<br>
<span class=""><br>
> And as you said logs would be ineffective to store .For history of builds of<br>
> the port.I think logfile would be the bestway to store history.<br>
<br>
</span>I still cannot imagine an efficient implementation of a scalable<br>
website with lots of information to be based on data stored in plain<br>
text files.<br>
<br>
You REALLY REALLY should be looking at Object-oriented design of the<br>
software and have a closer look at relational databases and try to<br>
understand the basic concepts there (tables, rows, primary index,<br>
foreign keys etc).<br>
<br>
While you can certainly hack something quickly with plain text files,<br>
the solution will not scale well.<br>
<br>
I would suggest you to include the database layout in your proposal:<br>
how will you store the information you need for the described<br>
functionality of the website.<br>
<span class=""><br>
> And regarding the syntax . I was thinking of storing the build history in<br>
> json format in one line in log.txt of a particular port.<br>
><br>
> Also mojca can i know your working hours.or atleast the timezone where you<br>
> live.<br>
<br>
</span>I'm at UTC+2. Working hours are hard to define precisely, but I try to<br>
sleep at night :)<br>
Umesh is at the same time zone as you are and knows enough details to<br>
be able to help you (if he has time).<br>
<span class="HOEnZb"><font color="#888888"><br>
Mojca<br>
</font></span></blockquote></div><br></div>