<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Saicharan reddy on Medium]]></title>
        <description><![CDATA[Stories by Saicharan reddy on Medium]]></description>
        <link>https://medium.com/@saicharan.reddy1?source=rss-74670f1621a7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*dkAy4NIdTqnCq3st7_rrrw.png</url>
            <title>Stories by Saicharan reddy on Medium</title>
            <link>https://medium.com/@saicharan.reddy1?source=rss-74670f1621a7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 06:12:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@saicharan.reddy1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Google Summer of Code 2020: Week 6— Data Collection Worker Testing/Testing Improvements]]></title>
            <link>https://medium.com/@saicharan.reddy1/google-summer-of-code-2020-week-6-data-collection-worker-testing-testing-improvements-e0c96d368f3a?source=rss-74670f1621a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0c96d368f3a</guid>
            <category><![CDATA[chaoss]]></category>
            <category><![CDATA[workers]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Saicharan reddy]]></dc:creator>
            <pubDate>Mon, 13 Jul 2020 16:43:25 GMT</pubDate>
            <atom:updated>2020-07-13T16:45:06.657Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dxXh6fERfLy8zYeo-5t5rg.png" /></figure><p>Delving into the first week of the 2nd coding period, There were several helper functions and worker-essential modules which required testing in its entirety. Unit tests &amp; Integration tests are valuable for each and every part of the project. Ergo, I’ve occupied myself into writing several unit tests &amp; integration tests for the modules including configuration drive methods, native queue implementations and worker tests.</p><p>Code coverage is an integral part &amp; is strongly attached to integration/unit testing. Not only do we have to test for the passing cases, we also need to write tests which check for the expected error when it fails. By achieving this, the testability coverage or in proper terms, code coverage goes to 100%</p><p>For example, consider the following tests for various modules:</p><p><a href="https://github.com/mrsaicharan1/augur/blob/ee103febbb3499183807a7ef3cbe6dca8e2657e8/tests/test_helpers.py#L22">mrsaicharan1/augur</a></p><p>With respect to the above link, consider the `test_read_config_no_exception` &amp; `test_read_config_exception` testing functions. We can see that each function is a separate test for the same function. Why you might ask?</p><p>Two Words. Code Coverage and Overall Testability. If the function read_config only possessed a test for a proper config read, leaving out the exception cases, this would lead many bugs &amp; errors in later stages of development. Therefore, writing tests which test for the entire function is of utmost importance.</p><p>Related PRs: <a href="https://github.com/chaoss/augur/pull/823">https://github.com/chaoss/augur/pull/823</a></p><p>The following week, I’d be uploading another blog with respect to the worker tests &amp; how the currently implemented gitlab worker morphs with the current ecosystem</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0c96d368f3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Summer of Code 2020: Week 4— Gitlab Data Collection Workers]]></title>
            <link>https://medium.com/@saicharan.reddy1/google-summer-of-code-2020-week-4-gitlab-data-collection-workers-d6d3bac4c845?source=rss-74670f1621a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6d3bac4c845</guid>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[chaoss]]></category>
            <category><![CDATA[augur]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Saicharan reddy]]></dc:creator>
            <pubDate>Wed, 01 Jul 2020 02:06:26 GMT</pubDate>
            <atom:updated>2020-07-01T02:06:26.610Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ICPRMuBjvPoDUoVJ_t5CdQ.jpeg" /></figure><p>During the last week of Phase-1, I finished up with the second phase of the Gitlab Issue Worker. This includes capturing data related to the issues events &amp; comments and storing them into our models seamlessly using pagination. The models which were filled are as follows:</p><ol><li>issues_events</li><li>issues_comments</li></ol><p>A few bugs pertinent to the way we send GET requests to the Gitlab API lingered. This was also fixed by properly passing the Gitlab private token as headers. For issue events, there may be a plethora of entries. Thereby, pagination is a good technique to process the <em>issue_event</em> items in batches and store it into our models.</p><p>Talking about issues_comments, we utilise the same technique of pagination as mentioned earlier. Additionally, we do not care about comment updates and hence, we do not use an update map while traversing.</p><p>Finally, I also tested the Gitlab worker in its totality which collects data alluding to issues and related models(issue assignees, issue labels etc..) and pushed it into the models seamlessly.</p><p>For the second period of GSoC, I’ve chalked out a blueprint of the testing modules I’d be working on. More about it in my next blog!</p><p>Related PRs</p><p><a href="https://github.com/chaoss/augur/pull/790/">https://github.com/chaoss/augur/pull/790/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6d3bac4c845" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Summer of Code 2020: Week 3— Gitlab Data Collection Workers]]></title>
            <link>https://medium.com/@saicharan.reddy1/google-summer-of-code-2020-week-3-gitlab-data-collection-workers-d76ac218195d?source=rss-74670f1621a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d76ac218195d</guid>
            <dc:creator><![CDATA[Saicharan reddy]]></dc:creator>
            <pubDate>Mon, 22 Jun 2020 09:41:06 GMT</pubDate>
            <atom:updated>2020-06-22T09:41:06.415Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*Ve2MQvEVlttR_TQi8pwnaQ.png" /></figure><p>Throughout the course of the previous week, I finished up with the final base worker refactoring to comply with Gitlab’s data model. Additionally I also completed the first phase of the Gitlab Issue Worker. This includes capturing data related to the issues, assignees &amp; labels and storing them into our models seamlessly using pagination. Due to the recent change in the logging mechanism throughout the Augur app, several changes were also made to the issue worker to adapt to the new environment.</p><p>The models which were filled are as follows:</p><ol><li>issues model</li><li>issues_assignees</li><li>issues_labels</li></ol><p>Among the aforementioned models, only one of them requires pagination, namely the issues models because for a certain gitlab project, there can be a considerably large number of issues — ranging from 1–100,000. Capturing these issues all at once is a herculean task. Therefore,by harnessing the power of pagination, batches of issues (100–500) can be processed and stored which also takes care of the API response time constraint &amp; server load.</p><p>The other models, issues_assignees &amp; issues_labels are fairly limited as a particular issue usually doesnt exceed 10 assignees/labels! Ergo, the justification.</p><p>In the following week, I’ll be vivid about the remaining models &amp; final testing for the Gitlab Issues Worker</p><p>Pertinent PRs</p><p><a href="https://github.com/chaoss/augur/pull/746">https://github.com/chaoss/augur/pull/746</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d76ac218195d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Summer of Code 2020: Week 2— Gitlab Data Collection Workers]]></title>
            <link>https://medium.com/@saicharan.reddy1/google-summer-of-code-2020-week-2-gitlab-data-collection-workers-ca8774fd89bf?source=rss-74670f1621a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca8774fd89bf</guid>
            <category><![CDATA[chaoss]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[gitlab]]></category>
            <dc:creator><![CDATA[Saicharan reddy]]></dc:creator>
            <pubDate>Sun, 14 Jun 2020 03:39:35 GMT</pubDate>
            <atom:updated>2020-06-14T03:39:35.777Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YjOtv5OOEP744YTdzBxWsw.png" /></figure><p>Throughout the course of the second week into Google Summer of Code, I’ve incorporated the necessary changes required in the base worker classes pertaining to pagination, rate limit updation &amp; finding the Gitlab id present in our models through a username. This required extensive study into the Gitlab API, its responses &amp; mapping to our models. I’ve also completed the first part of the gitlab issue collection process i.e Gitlab API issue collection &amp; storage into the issues model of augur.</p><p>Also, we discussed about the need for a fine line between Github &amp; Gitlab data collection processes. This led us to the alteration of the pre-existing DB schema by adding new columns related to “platform”. For example, we added the platform column to the worker_oauth table to segregate the multiple access tokens being used by the gitlab data collection workers.</p><p>In addition to the above, I added a new gitlab rate limit update function which was a bit different from the way rate limiting info is grabbed and passed onto the workers_oauth table. Along with Abhinav who’s also in the Gitlab Worker team, we were able to complete the worker base refactoring which resulted in a gitlab compatible environment.</p><p>In the next blog post, we’ll briefly talk about the next step of the issues worker &amp; preliminary blueprint of the integration &amp; unit testing of augur.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca8774fd89bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Summer of Code 2020 — Chaoss Community Bonding & Week 1 — Gitlab Data Collection Workers]]></title>
            <link>https://medium.com/@saicharan.reddy1/google-summer-of-code-2020-chaoss-community-bonding-week-1-gitlab-data-collection-workers-535848370800?source=rss-74670f1621a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/535848370800</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[augur]]></category>
            <category><![CDATA[chaoss]]></category>
            <dc:creator><![CDATA[Saicharan reddy]]></dc:creator>
            <pubDate>Sat, 06 Jun 2020 17:49:17 GMT</pubDate>
            <atom:updated>2020-06-06T17:49:17.932Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*s4hqrpxdpNvgXKqW8Dfmaw.png" /></figure><h3>Google Summer of Code 2020 — Chaoss Community Bonding &amp; Week 1 — Gitlab Data Collection Workers</h3><p>It was the summer of 2020 and I was selected for the Google Summer of Code(GSoC) Program yet again with the CHOASS organization(GSoC 2019 with FOSSASIA). The project alluding to this year’s GSoC was the implementation of a Gitlab Data Collection Worker along with the Improvement of the overall testing architecture.</p><p>Throughout the duration of the community bonding period, I explored the Augur API, workers, metrics &amp; existing tests. In addition to that, I also browsed through the Gitlab API docs, the structure of the requests &amp; responses among other aspects. This aided me in gaining a more prolific view of the workflow which was required.</p><p>To top it off, we also had a few zoom calls with the community &amp; the Augur team to discuss our approach, get us started with the template workers &amp; to set some milestones for us.</p><p>As soon as the first coding period took off, I integrated configuration support for the Gitlab API so that the installation included the prompt for Gitlab API keys. In addition, I also updated the core function which performs the issue collection, data formatting &amp; storage of the new/to-be updated datapoints into our data model. This was a prerequisite for the issues worker as it was only compatible with the Github API prior to that.</p><p>Next to that, we started implementing the Gitlab data worker &amp; implemented the issue collection &amp; data model updation/insertion process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=535848370800" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integration of AliPay Payment Gateway using Stripe Sources — Ember.JS & Flask]]></title>
            <link>https://medium.com/@saicharan.reddy1/integration-of-alipay-payment-gateway-using-stripe-sources-ember-js-flask-3e6d6a50aa4f?source=rss-74670f1621a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e6d6a50aa4f</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[alipay]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Saicharan reddy]]></dc:creator>
            <pubDate>Wed, 08 Apr 2020 05:31:57 GMT</pubDate>
            <atom:updated>2020-04-08T05:34:25.963Z</atom:updated>
            <content:encoded><![CDATA[<h3>Integration of AliPay Payment Gateway using Stripe Sources — Ember.JS &amp; Flask</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dDQe2s7NJ0TfM5Y9xQ0kqw.png" /></figure><p>This blog post explains the process of how <a href="https://stripe.com/docs/sources">Stripe Sources </a>has been leveraged to integrate AliPay to extend the payment options in China. Stripe provides a plethora of payment options configurable with <a href="https://stripe.com/docs/api#sources">Sources</a>.</p><p>Source objects allow you to accept a variety of payment methods with a single API. A source represents a customer’s payment instrument and can be used with the Stripe API to create payments. Sources can be charged directly, or attached to customers for later reuse.</p><p>Alipay is a<a href="https://stripe.com/docs/sources#pull-or-push-of-funds"> push</a>-based,<a href="https://stripe.com/docs/sources#single-use-or-reusable"> single-use</a> and<a href="https://stripe.com/docs/sources#synchronous-or-asynchronous-confirmation"> synchronous</a> method of payment. This means that your customer takes action to authorize the push of funds through a<a href="https://stripe.com/docs/sources#flow-for-customer-action"> redirect</a>. There is immediate confirmation about the success or failure of a payment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ctWqIsWWTCVvYiUPa8oP7Q.png" /><figcaption><em>The workflow of Alipay on the backend</em></figcaption></figure><p>During the payment process, a Source API object is created and your customer is redirected to AliPay for authorization.</p><p>Payment Flow</p><ol><li>Create a Source Object with the parameters <em>currency, redirect_url and amount</em>.</li><li>Create a page for the <em>completion of customer authorization</em> by specifying the redirect_url.</li><li>Change the source status from <em>pending</em> to <em>chargeable.</em></li><li>Confirm the payment by redirecting to the confirmation page and process the refund for any unsuccessful payments(if deducted)</li></ol><p>Initially, we define a class named AliPayPaymentsManager which handles the configuration of API keys and has methods to create source objects and make them chargeable.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f74c727886aa6be8d0c3f3c1247716c3/href">https://medium.com/media/f74c727886aa6be8d0c3f3c1247716c3/href</a></iframe><p>The challenge of charging the source &amp; redirection</p><p>After creating the source object, we need to make the source object chargeable. For this purpose, the user must be redirected to the external AliPay payment gateway page where the source object is authorized and its status is changed to chargeable. The main challenge to overcome here was the method in which the redirect link was attached to the object. The parameter<em> _external </em>is really crucial for this process as Flask would only recognize the URL as an external URL if this parameter is passed to <em>url_for.</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/69cfbf4f65fa6f2a312f156f6a6f6866/href">https://medium.com/media/69cfbf4f65fa6f2a312f156f6a6f6866/href</a></iframe><p>After the source object is created, the status changes to pending. To charge the user, the source object must become chargeable. For this, we need to redirect the user to an external page where the payment can be authorized and the source object can become chargeable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vojdcp8JUvRKuINaTFjQbQ.png" /><figcaption><em>External Authorization Page for AliPay</em></figcaption></figure><p>After authorizing the payment, we redirect to the URL given in return_redirect_uri which is configured with the source object which tries to charge the source object as it is now chargeable. After this, a POST request is sent to the <em>return_redirect_uri </em>route which handles success and failure cases</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a43b0339cbb0107cae32f431b6bfa179/href">https://medium.com/media/a43b0339cbb0107cae32f431b6bfa179/href</a></iframe><p>Resources:</p><ul><li><a href="https://stripe.com/docs/sources">AliPay using Sources</a></li><li><a href="https://stripe.com/docs/api/charges/object">Charge Response API</a></li><li><a href="http://flask.pocoo.org/">Flask Documentation</a></li></ul><p>Related work and code repo:</p><ul><li><a href="https://github.com/fossasia/open-event-frontend">Front-End Repository</a></li><li><a href="https://github.com/fossasia/open-event-server">API Server Repository</a></li><li><a href="https://github.com/fossasia/open-event-frontend/pull/3024">API keys and AliPay Configuration</a></li><li><a href="https://github.com/fossasia/open-event-server/pull/5960">Source Creation &amp; Charge Payment</a></li><li><a href="https://github.com/fossasia/open-event-frontend/pull/3047">Backend Connect with Loader Service</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e6d6a50aa4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating an SMTP subroutine as a Fallback Function in Python — Emails]]></title>
            <link>https://medium.com/@saicharan.reddy1/creating-smtp-as-a-fallback-function-to-ensure-emails-work-python-807e8f7fe743?source=rss-74670f1621a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/807e8f7fe743</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[mail]]></category>
            <category><![CDATA[smtp]]></category>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Saicharan reddy]]></dc:creator>
            <pubDate>Wed, 01 Apr 2020 05:43:20 GMT</pubDate>
            <atom:updated>2020-04-01T06:05:37.863Z</atom:updated>
            <content:encoded><![CDATA[<h3>Creating an SMTP subroutine as a Fallback Function in Python — Emails</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4vitUq6UWvbkKhFLtmYm-g.jpeg" /></figure><p>This blog post explains the solution to scenarios pertaining to the failure/ unavailability of Sendgrid service when an attempt is made to send emails in Eventyay. <a href="https://eventyay.com/">Eventyay</a> is the outstanding Open Event management solution using standardized event formats developed at FOSSASIA.</p><p>Currently, the Open Event Project utilizes 2 protocols namely, <a href="https://sendgrid.com/">SendGrid </a>and <a href="https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol">SMTP</a>. Previously, they could only be configured individually. If either protocol failed, there was no provision for a backup and the task to send the email would fail.</p><p>Therefore, there was a necessity to develop a feature where the SMTP protocol, which is usually more reliable than 3rd party services, could act as a backup when the SendGrid server is unavailable or the allotted quota has been exceeded.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/667bc0d966acf306645df433d46552f6/href">https://medium.com/media/667bc0d966acf306645df433d46552f6/href</a></iframe><p>The main principle which was followed to implement this feature was to prevent sending emails when SMTP is not configured. Ergo, a function was implemented to check if the host, username, password, encryption, and port was present in the model before proceeding. If this was configured properly, we move on to determining the protocol which was enabled. For this, we have 2 separate celery tasks, one for SMTP and the other for Sendgrid.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c61edae5fa29696522bd4323305e51af/href">https://medium.com/media/c61edae5fa29696522bd4323305e51af/href</a></iframe><p>Consider the function associated with the SendGrid task. The logic which sends the emails along with the payload is present in a try/catch block. When an exception occurs while attempting to send the email, it is caught via the requests library and checks for the HTTP code. If the code is determined as 429, this implies that there were <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429">TOO_MANY_REQUESTS</a> going through or otherwise in SendGrid lingo, it means that you’ve exceeded your quota. In this case, we will not stop sending the email, rather, we would alternate to a backup solution of sending it via the SMTP protocol. In this way, we can ensure that emails would work without any kind of hassle.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/09e29e14f8ab1d7da11b46ad26b9e45e/href">https://medium.com/media/09e29e14f8ab1d7da11b46ad26b9e45e/href</a></iframe><p>Resources:</p><ul><li><a href="https://sendgrid.com/docs/for-developers/sending-email/v3-python-code-example/">Sendgrid-Python reference</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429">429 HTTP documentation</a></li><li><a href="https://github.com/marrow/mailer">Marrow Mailer — SMTP</a></li></ul><p>Related work and code repo:</p><ul><li><a href="https://github.com/fossasia/open-event-frontend">Front-End Repository</a></li><li><a href="https://github.com/fossasia/open-event-server">API Server Repository</a></li><li><a href="https://github.com/fossasia/open-event-server/commit/c10a3fcc5072b95e4cd50307cc8f30750632f1bc">Code for SMTP fallback system</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=807e8f7fe743" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>