Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Writing an Analyzer for Arduino Libraries. My Take on it. #21

Closed
hmzakhalid opened this issue Feb 25, 2020 · 12 comments
Closed

Writing an Analyzer for Arduino Libraries. My Take on it. #21

hmzakhalid opened this issue Feb 25, 2020 · 12 comments
Labels

Comments

@hmzakhalid
Copy link

Hey, My Name is Hamza Khalid, I'm in my 2nd Semester of University at NUCES in Islamabad. and I've worked with and used Arduino Before to win a Science Fair. I built a line following and Object Detection Robot in 12th Grade and from then on my Passion for Robotics took a wonderful start.

I would like to write Examples of the Official Libraries for GSoC'2020 . I see there are People building Apps for the Arduino Libraries with all the examples. But I would like to write those examples so that those people can implement them in their apps.

I think There should be 2 People with the task of writing all of the Examples. While the Others can work on the App.
I also have a Design and Web Development Background so I can also Help around with that.

Thank You Everyone. Very Excited to Join the Arduino Community.

@hmzakhalid hmzakhalid changed the title Write examples for official libraries. Write examples for official libraries. My Take on it. Feb 25, 2020
@ghost
Copy link

ghost commented Feb 25, 2020

Hello there,
My name is Debraj Maji and I am currently a 2nd year undergraduate student belonging to electrical engineering discipline from Indian Institute of Technology Kharagpur. I know c++/c quite well and have some experience in writing code for Arduino(Mega) for a robotics event where I had to build a path detection model based on data collected through RFID sensors and visual input.

Would like to start contributing to the project as soon as possible.

@alranel
Copy link
Member

alranel commented Feb 26, 2020

Welcome @hmzakhalid, looking forward to see your proposal. Feel free to ask any question.

Hello @abhstract - please open your own issue in this issue tracker as we'd like to have one issue per student as a direct communication channel.

@hmzakhalid
Copy link
Author

Hey @alranel , I have a question.
there are alot of issues in https://github.com/arduino/Arduino regarding Adding and Making some Modifications in the Libraries.
I wanna ask, is there some standard procedure that you have to follow before you can make some changes?
and How would one remove a Library from there?
Thanks

@alranel
Copy link
Member

alranel commented Mar 3, 2020

@hmzakhalid can you point me to one of those issues?
In general, you'll find libraries in https://github.com/arduino-libraries
Each library has its own examples (if any) under the examples/ directory.

@hmzakhalid
Copy link
Author

@alranel There were alot of Issues at the time i posted about modifying some library and Adding a library as well. I guess they were all resolved.
But they were similar to This one arduino/Arduino#9832
I'll try to resolve this one myself and Do my first contribution to the Arduino Community

@hmzakhalid
Copy link
Author

Is there any Documentation I can follow? Have anyone Written it yet about how to contribute to the community and how to solve a certain common issues?

@per1234
Copy link
Collaborator

per1234 commented Mar 7, 2020

But they were similar to This one arduino/Arduino#9832

Those are requests for addition to the Arduino Library Manager index. The indexer is not publicly available so there is no way for you to assist with that specific type of issue. For more information, see:
https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ

Is there any Documentation I can follow?

Regarding your goal of writing examples for Arduino libraries, there is this guide:
https://www.arduino.cc/en/Reference/StyleGuide

If that's not what you're looking for, please provide more details so I can understand better.

@hmzakhalid
Copy link
Author

Submitted my first PR:
arduino-libraries/Servo#44

@hmzakhalid
Copy link
Author

Hey @per1234 @alranel , Can i change my Project? Actually I'm more interested in writing an analyzer for Arduino libraries. I've never done anything like that before and i really really wanna do it. I will learn so much new stuff and new concepts, solving different problems and it'll be wonderful to be coached by you guys.

@hmzakhalid hmzakhalid changed the title Write examples for official libraries. My Take on it. Writing an Analyzer for Arduino Libraries. My Take on it. Mar 23, 2020
@hmzakhalid
Copy link
Author

@per1234 Do i have to make my own crawler or can i use an Open Source one.. like Scrappy. I'll fetch the data through that from the Libraries and then run the Analyzer on the files.
Also i'm having trouble writing the Technical Details and Community Bonding Phases section of my Proposal. I don't know what to write there.
I'm sorry for all this, This is my first time and I'm clueless..

@per1234
Copy link
Collaborator

per1234 commented Mar 23, 2020

I'd say there is no point in reinventing the wheel if there is already a tool we can use for a component of the project. However, I am skeptical that Scrapy would be useful for this project.

The easiest solution would be to just grab the repository fields of http://downloads.arduino.cc/libraries/library_index.json.
That file contains all the libraries in the Arduino Library Manager index, including the official Arduino libraries.

I have actually already written a Python script that finds all the Arduino libraries on GitHub:
https://github.com/per1234/inoliblist
That script does use the data from http://downloads.arduino.cc/libraries/library_index.json, but it also uses the GitHub search API to find many libraries which were haven't yet been added to the Library Manager index.

Here is a Python script I wrote that checks all the libraries on the generated list for common problems:
https://github.com/per1234/inolibbuglist
The things inolibbuglist checks for are different from the ones desired from the "write an analyzer for Arduino libraries" project, but there are some parts of the code that might be useful and it might give you some ideas. I see that the C++ language is specified for this project on the ideas list, but I'm guessing that's only about the libraries being (mostly) written in C++, not a requirement that the analyzer be written in C++.

Another thing that might be worth considering is that most Arduino boards platforms come with bundled libraries (for example). These are the most used of all Arduino libraries. Those libraries are not in the Library Manager index, and are also not found by my inoliblist script. I would like to eventually run inolibbuglist on these libraries as well. Towards that goal, I have been assembling a list of all Arduino platforms, with the data folder path in the repository (the libraries will be under the libraries subfolder of the data folder):
https://github.com/per1234/ino-hardware-package-list/blob/master/ino-hardware-package-list.tsv
I think it would be very useful to have your analyzer run on those libraries too.

@hmzakhalid
Copy link
Author

I've Submitted my proposal

@alranel alranel closed this as completed Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants