<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear Arjun,</div><div dir="ltr"><br></div><div>I'm CC-ing the list as that's potentially interesting to others as well.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 14 May 2019 at 19:45, Arjun Salyan wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Summary of today's discussion:</div><div><br></div><div>1. <b>Repository: </b>The existing repository for the web app would be moved from the staging area to the official MacPorts organisations's repositories. And then we will setup issues and milestones (after making changes to the timeline, if needed). The previous macports-webapp repository (from last year) can be key separate to the new one by making some name changes.</div><div><br></div><div>2. <b>Docker Containers: </b>The infra team has suggested that for initial deployment of the app we make a docker container so that our app would not pose any security issues to rest of the server.</div><div><br></div><div>3. <b>mpstats: </b>We can add a new port (mpstats 2.0 or some other name) to submit statistics to our app, so that when we start working on stats part- we will have some data to test the setup. The newer version would drop submission of "inactive ports" and "gcc".</div><div><br></div><div>4. <b>Buildbot</b>: I will be learning buildbot more thoroughly.</div></div></div></blockquote><div><br></div><div>Apart from</div><div>    <a href="https://github.com/macports/macports-infrastructure/tree/master/buildbot">https://github.com/macports/macports-infrastructure/tree/master/buildbot</a><br></div><div>see also</div><div>    <a href="https://github.com/rajdeepbharati/macports-buildbot/">https://github.com/rajdeepbharati/macports-buildbot/</a></div><div><br></div><div>Students with similar projects are certainly encouraged to follow (and provide feedback) to the other similar projects.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><br></div><div>5. <b>Database Design: </b>It would be better to store all weekly submissions instead of just the latest one in the base table (the one which is used to populate all other tables).</div><div><br></div><div>6. <b>Variants: </b>A low priority task. We could pickup default variant for any port from our database of port info.</div><div><br></div><div>I hope I haven't missed anything important.</div><div><br></div><div>I have set up the app to receive submissions from mpstats at: <a href="https://frozen-falls-98471.herokuapp.com/statistics/submit/" target="_blank">https://frozen-falls-98471.herokuapp.com/statistics/submit/</a> . I just replaced the url in mpstats and it is working correctly.</div><div><br></div><div>Thank You</div></div></div></blockquote><div><br></div><div>I forgot to mention another super important point. You should use this time to get familiar with writing:</div><div><ul><li><b>Unit tests</b>: You already created an empty file, but it's about high time to populate it with some real tests, like preparing a very simple set of portfiles, generate json, enter them to database and check whether all the tables are exactly as we want them to be (in particular with respect to authors, categories, ...), and then some checks for subsequent port updates, ... Those tests could also run on Travis (or some other service).</li></ul></div><div>Ad:</div><div><ul><li><b>Database design</b>: prepare the design (for statistics submissions in particular). My suggestion was for the port installation statistics to store something like (submission_id, user_uuid, timestamp, os_version, ...) in one table, and something like (submission_id, port, version, is_requested, <something with variants>) to another table, make a view joining the two, and then be able to answer queries like "how many distinct users had port 'python27' installed between 2019-05-01 and 2019-05-31" with some advanced sql statements (I hope they are still supported by Django), for arbitrary dates etc. Results could of course later be cached for faster rendering. This might need some playing around.</li></ul><div>Mojca</div></div><div><br></div></div></div></div></div>