Getting Shortlisted
To get shortlisted for the FOSSEE Internship 2024, you need to complete the screening task given below and demonstrate a working software. The selection will be purely based on the evaluation criteria. Also note, you are allowed to use only open source libraries/technologies and attribute them appropriately in your project based on the license.
Technical Skills
Django and REST framework
API-based design
Celery and Redis
Python 3
MySQL
React (front-end)
MxGraph Drawing library
Scilab / xCos (https://www.scilab.org/)
Highcharts (https://www.highcharts.com/)
Evaluation criteria
Usage of skills in locating the bugs
Clear design and documentation
API-based approach
Clear separation of backend and frontend
Coding style
Inclusion of Unit test cases
Reusable code
Submission Procedure
Create a GitHub respository. We recommend that you regularly push your code to git. If you are new to git, please refer to the tutorial link given below: (https://spoken-tutorial.org/tutorial-search/?search_foss=Git&search_language=English)
Once you are done with the project do the following:
Create a file, 'SUMMARY.md' and write a summary of how did you approach the problem, what steps you took to solve, any new package/technology that you used, indicate which files were changed heavily. Make a note of the SUMMARY.md URL.
Record a demo by creating either a video, screencast or animated gif of your work and include it in the SUMMARY.md file
Tag a release on GitHub. Note down the release URL.
Finally, fill in the respective Google Form to submit the URL of your SUMMARY.md and the tagged release. The tagged release URL would be similar to: https://github.com/<your username>/<your project name>/releases/tag/v1.3
In case you are also submitting any bonus tasks, please tag the release separately and fill the corresponding Google Form.
XCos on Cloud
https://xcosblocks.fossee.org/#/editor
https://drive.google.com/drive/folders/1wpXvLJdKEsoMfhD05RCt6sEDgXjjXgst?usp=drive_link
https://www.w3schools.com/xml/xsl_intro.asp
The format of XCos has changed from Scilab 5.5.2 to Scilab 6.0. The aim is to convert from XCos in either format to a format independent XML with tags as required by XCos-on-Cloud. Note that XCos is also an XML file with XCos specific tags.
The drive link above contains 3 example folders. Each example folder contains 2 XCos files and 1 XML file. Write an XSLT file to transform from XCos to XML file. What you have to preserve in this transformation:
all element ids
all values
the position x, y
the dimensions height, width
the connections between elements: source, target, parent
If any change is left over, additional JS script may be written to complete the transformation. Note that this should be done only to handle cases which cannot be handled by XSLT.
Create an XSLT file to transform from XCos to XML. It should work for both files for any one of the three examples.
Create an html form to test this. It will have two options: Upload and Download.
The Upload option will ask the user to upload an XCos file. On uploading, the Xcos file will be read and transformed to the equivalent XML string using the XSLT file.
The Download option will save this XML string as an XML file.
When the XCos files from the same folder are uploaded, the XML files downloaded should be identical.
XCos on Cloud is part of the Common Interface Project. The aim of this project is to make a common interface for all simulations across many projects with similar interfaces
Login to GitHub (create your account, if required)
Click on Fork to create a copy of this repository to your GitHub account. It may take some time to create this copy. Once completed, it will redirect to https://github.com/<your username>/Common-Interface-Project. You may also access this copy at any time through Your repositories.
Install git from your distribution or from https://git-scm.com/downloads on your system. Windows users should use the git bash terminal for the commands below.
Open a terminal, go to your git directory and clone your repository locally. The commands will look like this:
mkdir ~/git
cd ~/git
git clone https://github.com/<your username>/Common-Interface-Project
Install Node.js from https://nodejs.org/en/download/ and choose LTS version v18.x.x (v18.20.1 at the time of writing this document).
Ensure that the bin directory of node / npm is in your PATH.
Go to the directory of the project cloned and install the required python modules.
cd Common-Interface-Project # the directory where the project is cloned.
cd blocks
python3 -m venv env # or: python -m venv env
. env/bin/activate # or: env\Scripts\activate
pip install -r requirements,txt # this installs modules listed in requirements,txt.
python manage,py makemigrations
python manage,py migrate
python manage,py loaddata xcosblocks
python manage,py runserver # this starts Django
Install the required npm modules.
cd Common-Interface-Project/blocks/eda-frontend
npm install # this installs modules listed in package.json.
Install other npm modules as required. You may require more once you start coding.
Make an output page containing charts each having data.
Connect to https://xcosblocks.fossee.org/api/instructions/get to start receiving events looking like this:
event: instruction
data: addChart id=1 type=bar xMin=0 xMax=10 yMin=-30 yMax=30
event: instruction
data: addChart id=2 type=curve xMin=0 xMax=20 yMin=-10 yMax=10
event: instruction
data: addData id=1 x=2 y=6
event: instruction
data: addData id=2 x=3 y=1
event: instruction
data: reset
event: instruction
data: addChart id=1 type=curve xMin=0 xMax=10 yMin=-30 yMax=30
event: done
data: none
Note that there may be a delay between two successive events. Order of events is important. You have to receive and process one event at a time. Depending on the events received, take the following actions:
1. event: instruction
The instruction event will be of three types of data. Depending on the data received, take the following actions:
# Comments
data: addChart id=uniqueId type=chartType other-parameters # add (render) a chart to the page
data: addData id=chartId other-parameters # add (render) a point to that chart
data: reset # clear the page. remove all added charts
Once processing of the event is completed, wait for the next event.
2. event: done
Ignore the data. Close the connection.
Example of output:
# Comments
# There will be a blank page at start.
event: instruction #
data: addChart id=7 type=bar xMin=0 xMax=10 yMin=-30 yMax=30 #
# Add 1st chart to page. It will occupy the full width.
event: instruction #
data: addChart id=9 type=chart xMin=-10 xMax=10 yMin=-30 yMax=30 #
# Add 2nd chart to page. It will occupy the full width.
# It will be below the 1st chart.
event: instruction #
data: reset #
# Remove all charts from the page. Forget all previous ids.
event: instruction #
data: addChart id=3 type=bar xMin=0 xMax=10 yMin=-30 yMax=30 #
# Add 1st chart to page. It will occupy the full width.
event: instruction #
data: addChart id=7 type=chart xMin=-10 xMax=10 yMin=-30 yMax=30 #
# Add 2nd chart to page. It will occupy the full width.
# It will be below the 1st chart.
event: instruction #
data: addChart id=1 type=chart xMin=0 xMax=5 yMin=-20 yMax=20 #
# Add 3rd chart to page. It will occupy the full width.
# It will be below the 2nd chart.
event: instruction #
data: addData id=3 x=0 y=10 #
# Add point to the 1st chart.
event: instruction #
data: addData id=1 x=0 y=-5 #
# Add point to the 3rd chart.
event: instruction #
data: addData id=3 x=1 y=-5 #
# Add another point to the 1st chart.
event: instruction #
data: addData id=3 x=2 y=5 #
# Add another point to the 1st chart.
event: instruction #
data: addData id=7 x=2 y=5 #
# Add point to the 2nd chart.
event: instruction #
data: addData id=7 x=3 y=16 #
# Add another point to the 2nd chart.
event: done #
data: none #
# Close the connection here. Do not reset the page.
So, the final page will have 3 charts containing a total of 6 points.
Add 1st chart (as before).
| Chart 1 | # Add first chart of full width
Add 2nd chart in the same row.
| Chart 1 | Chart 2 | # Each chart will be 50% of page width
When 3th chart is to be added, change to 2-row layout.
| Chart 1 | Chart 2 |
| Chart 3 | # Add third chart of full width on 2nd row
Add 4th chart in the same row.
| Chart 1 | Chart 2 |
| Chart 3 | Chart 4 | # Each chart will be 50% of page width
When 5th chart is to be added, change to 3-row layout.
| Chart 1 | Chart 2 |
| Chart 3 | Chart 4 |
| Chart 5 | # Add fifth chart of full width on 3nd row
Errors can be of the following types:
Unsupported event
Unsupported instruction (for instruction event)
For addChart instruction:
id is missing or empty
id is duplicate (since last reset)
type is missing or empty
type is unsupported
mandatory parameter (based on type) is missing
For addData instruction:
id is missing or empty
id does not exist
mandatory parameter (based on type) is missing
Note: the error event must be logged and ignored. Processing of the next event must continue.