Documentation and Deployment through Python Libraries
1. SWIGGY SOFTWARE DEVELOPMENT BANGALORE
EFFICIENT DOCUMENTATION AND DEPLOYMENT
THROUGH PYTHON LIBRARIES
RISHABH GARG
BITS-PILANI | GOA
PRACTICE SCHOOL
2. RISHABH GARG
BITS-PILANI | GOA
ABOUT SWIGGY
• Established in 2014 by two alumni of BITS Pilani.
Based on a hyperlocal on-demand food delivery business operation.
• Now serves 300+ cities across India
• Business Segments include Swiggy Access, Swiggy Super, Swiggy Pop,
Swiggy Daily, Swiggy Stores and Swiggy Go. Also expanded to provided
beverage services.
• Recently raised $800 million from various investors.
• Current Valuation is at $5 billion.
• Valuation now exceeds that of Zomato which provides similar services.
3. RISHABH GARG
BITS-PILANI | GOA
ABOUT PROJECT
The developer documents were required to be categorized and ported to a web view
documentation website for better search functionality of the required commands and
representation of the document hierarchy (TOC tree in Sphinx) which seemed to be
cluttered in the case of Shuttle docs.
The first step consisted of scrapping the code from the Shuttle docs using beautiful
soup python library which required login through Confluence ticket and cookies for
security purposes. After getting the HTML code of the documents, html2rest and
pandoc python libraries were used for automated containerization of html docs and
eventual conversion to RST files.
Then sphinx python library was used to create the boilerplate code and TOC structure
of the base documents, on which the hence converted RST files were linked. format.
After conversion, a shell script was written to automate the running of commands that
were used in the above process. The documents were then deployed to Amazon S3.
5. RISHABH GARG
BITS-PILANI | GOA
PROJECT DETAILS
Easier search functionality and management of services
Better documentation of services and access through web view platforms like
Sphinx
Conversion of HTML documents into RST files for rendering through Sphinx
Automation of commands used for installation of required python libraries and
conversion into RST documents.
Static deployment to Amazon S3 through Shuttle and UAT accounts
EXPECTED PROJECT OUTCOMES
6. RISHABH GARG
BITS-PILANI | GOA
PROJECT DETAILS
Since there are multiple tasks to be done for production and deployment of any
service like writing the infra in bitbucket, creating env variables etc. we can create
an app.yaml file that stores all the information related to the configuration of system
from metadata to cl setups.
We can also create business alerts which can be manually migrated and created
using coast. To conclude, Shuttle makes the deployment process easier by
committing to the codebase instead of consul.
Sphinx uses RST (Restructured Text) files for rendering content internally unlike the
conventional HTML, CSS and Vanilla JavaScript framework.
MORE ABOUT SHUTTLE AND SPHINX
7. RISHABH GARG
BITS-PILANI | GOA
PROJECT DETAILS
It has a hierarchical structure which enables
easy definition of a document tree, with
automatic links to siblings, parents and
children. Code handling can be done
automatically using Pygment highlighter.
MORE ABOUT SHUTTLE AND SPHINX
8. RISHABH GARG
BITS-PILANI | GOA
PROJECT DETAILS
A shell script is a computer program
designed to be run by the Unix shell, a
command-line interpreter. The various
dialects of shell scripts are considered to be
scripting languages. Typical operations
performed by shell scripts include file
manipulation, program execution, and
printing text.
MORE ABOUT SHELL SCRIPTS AND
AMAZON S3
9. RISHABH GARG
BITS-PILANI | GOA
PROJECT DETAILS
In this project, after conversion, a shell
script was written to automate the running
of commands that were used in the
conversion process. It consisted of a simple
.sh file that contained some basic if-else
statements and regex expressions for
checking the file types and moving them to
required TOC folders.
MORE ABOUT SHELL SCRIPTS AND
AMAZON S3
10. RISHABH GARG
BITS-PILANI | GOA
PROJECT DETAILS
Amazon S3 or Amazon Simple Storage
Service is a service offered by Amazon
Web Services that provides object storage
through a web service interface. Amazon
S3 uses the same scalable storage
infrastructure that Amazon.com uses to run
its global e-commerce network.
MORE ABOUT SHELL SCRIPTS AND
AMAZON S3
11. RISHABH GARG
BITS-PILANI | GOA
PROJECTS MADE
Markdown rendered RST
. file for service handling
03
Shell script for automation
of commands
02
Sphinx-documented
website made using
RST files
01
12. RISHABH GARG
BITS-PILANI | GOA
WORK DONE
Week 5
Used python libraries to
scrape the documentation
websites of the company.
Copied the docstrings into
markdown and converted
them to RST files
Week 3
Met with the reporting
manager and industry
mentor. Started learning
about Shuttle and Sphinx
from the material
recommended by the
mentor.
Week 4
Continued learning about
the tools scheduled a
meeting with mentor
Week 2
Learnt about Software
Engineering
Week 1
Read about the business
model of Swiggy, the
technological solutions it
provides and its newly
provided services in various
domains
Week 7<
Sent the DVO and SHUTTL_
tickets for approval on Jira to
create sandbox and Shuttle
accounts respectively for
deployment to Amazon S3.
Week 6
Built a shell script of all
the commands that are
to be required for
conversion of html docs
into RST files. Studied
about DVO and Shuttle
tickets for Amazon S3
static deployment
13. RISHABH GARG
BITS-PILANI | GOA
ACHIEVEMENTS
PROJECTS MILESTONES
WEEK 2
Learnt about Sphinx,
GitBook & DataBricks
WEEK 4
HTML converted to
markdown files and
RST files.
WEEK 6
Amazon S3
credentials received
and bucket created
WEEK 3
HTML code scrapper
through beautiful
soup python library
WEEK 5
Built the shell script
for automation of
commands.
1 7