About Project [10] Contribute action functionality #56
Replies: 5 comments 12 replies
-
Hi @Rahuljagwani, I see contribute as more of a script (along the lines of build, debug, and run). So, a contribute and contribute.bat. "containing a flask server" - FRI Is the Flask server we already have. So I see it is an addition of contribute method, among the rest which is already there. Then connecting the concore script in the backend to the contribute button in concore editor is the same approach as how you have already implemented the other methods. A few caveats: To handle that, we can include a bot account, and commits can be made with the "Author Name" specified in the Study/graphml creation as a comment in the PR, but with the bot as the user. But we need to secure the credentials of the bot too. Otherwise, a malicious user may use the bot account to spam the repository. We can make some certain valid assumptions. This is the research side of the project. You can think about it (and eventually include the solution in the project proposal draft for further comments). You really don't need to know the answer to everything as well. This is a project that will need a good amount of brainstorming during the community bonding period. There are also factors to consider on duplicate detection and how a repeated commit on the same study is considered in the centralized repository. There are also actually no right/wrong answers to this project at this point. This is part of concore. But also addresses an interesting common problem. |
Beta Was this translation helpful? Give feedback.
-
Hi @pradeeban, I did research about what was conveyed 2 days ago and tried to roughly implement the same. I have developed some working python script in this regard, which is helping in generating a study based PR. I have used the GitHub-tokens to implement the same. In this implementation user neither needs GitHub account nor git installed in system. The only major problem for now which remains is about encrypting the GitHub-token as it can be misused by any user who is downloading the source code. To test it:
Make sure the Server starts.
The functionality of updating directories which is mentioned in project idea is also working. |
Beta Was this translation helpful? Give feedback.
-
Hi @pradeeban,
I would like you to enlighten me on above. |
Beta Was this translation helpful? Give feedback.
-
Hi @pradeeban, I hope you're doing well. I've been exploring the Concore project with an interest in contributing. I have experience in Python, Java, and C++, and I'm eager to learn more about the Concore idea and its codebase. I have a couple of questions regarding the project's libraries: I noticed that the concoredocker.hpp file appears to be empty. Could you please provide some insight into why this file is empty or if there are any plans for its implementation? |
Beta Was this translation helpful? Give feedback.
-
Hey @Rahuljagwani , I'm trying to understand the Concore codebase and relationship between all the Python files and their respective functions. Since you've already contributed to it, could you please guide me through this? Additionally, there is a contribute.py file. Is there any documentation available for it?" |
Beta Was this translation helpful? Give feedback.
-
@pradeeban
I am proposing a rough implementation regarding Project 10.
Feel free to correct me or add any extra points. Any suggestions and feedbacks will be appreciated.
Implementation:
Back-end:
First of all a main python file contribute.py will have to be made containing a flask server with various methods taking api calls from frontend and performing various checks. Few methods can be:
• Config()
• Add()
• Commit()
• Push()
• GeneratePR()
Etc.
From each method calls have to be made to particular batch files in order to execute git and gh commands on terminal.
Test.py containing hard coded api calls to test contribute.py
Batch files: .bat files related to each function which has to be called to use cli with customized input and output.
Front-end:
On clicking Contribute in concore-editor a modal will appear which will first take necessary inputs regarding authorization in github and performing necessary checks. It will work in such a way that contribute action can be aborted any time by user. Proper messages will be displayed to user at necessary intervals.
Api calls will be called after passing various checks at certain points and various arguments will be taken by in order to pass them to backend to perform the desired functions.
The following flowchart represents a rough flow about approach which can be taken in order to achieve the project.
Here, it is assumed that user has already created a study/directory and saved it in the local system. In step which is green in flow chart, user has to move that directory in concore folder which he has cloned.
Beta Was this translation helpful? Give feedback.
All reactions