Check out my blog or follow me on Twitter for more updates.
Proposal | Project Details | Blogs | Links
- Project Details
- Objectives
- Objectives Accomplished
- Work
- Activity Reports
- Mentors and Team
- Acknowledgment
- Additional Info
- Student Developer Info
PROJECT DETAILSβ
The aim of the project is to build login and access for users. Augur is a software suite for collecting and measuring structured data about free and open-source software (FOSS) communities. We do this by gathering data about project repositories and normalizing that into our data model to provide useful metrics about your projectβs health. augur_view is the hosted version of augur with HTML frontend, written with Bootstrap and served by Flask. The branch I am contributing to is augur-new. The project will help the users to login using CLI and API. The project aims at creating login feature for users. This is implemented as CLI subcommands and through an API. Using these, user will be added to the database. With login functionality, the user experience will be improved. The project focused to add and improve access and authorisation functionalities for hosted version of augur (augur_view). As a future development, the new version of Augur- augur-new, will make it possible to install a single instance for CHAOSS Community members to leverage for initial experimentation with CHAOSS metrics.
OBJECTIVES β
# | Status | Objectives |
---|---|---|
1 | βοΈ | Develop login functionalities so that admins and users can access augur. Populate the tables with information from the user. |
2 | βοΈ | Connect the login to the augur_data.chaoss_user table instead of the sqllite3 database. |
3 | βοΈ | Implement the endpoints necessary for account creation and authentication on the backend. |
4 | βοΈ | Work on the CLI components for creating admin and user accounts. |
- βοΈ Augur enpoints to be deployed from augur-new. Install augur-new and test the schema creation with SQLAlchemy, and see if it at least creates a schema with all the data integrity protections we engineered into it.
OBJECTIVES ACCOMPLISHED β
augur user add
The augur user add CLI group is for adding user to Augur's database.
* All commands are invoked like:
augur user add <username> <email> <firstname> <lastname>
augur user add <username> <email> <firstname> <lastname> --admin
Worked on setting up the environment for augur-new. Gone through the Augur Database Schemas
Approach:
- I was supposed to create API endpoints for integration of login with backend. The API would generate token --> hit HTTPS --> validate user (example for validate).
- This would ultimately use Postgres. So connect to Postgres instead of sqlite.
- Frontend should talk to backend API <--> database.
- User to repo to schema to have 4 endpoints: add, remove, update and validate (passing in hashkey (SSL))
- The updated file structure as per augur-new required me to install augur-new.
User schema
Create User
Allows to create user with unique username and email, password, firstname, lastname
Approach:- Use engine to connect to db
- arguments required are username, password, email, firstname, lastname.
- check if the compulsory arguments are not None (error 400)
- hash password
- add user to db
- Imp point: username and email need to be unique!
Validate User
Allows to validate user with given username and password
Approach:- Use engine to connect to db
- Input username and password.
- Hash password, check password
- ``if not pass_hash == password:
return jsonify({"status": "invalid password"})``
Remove User
Allows to remove user with given username
Approach:- Use engine to connect to db
- Input username and password.
- check user exists
- validate user
- if validated, session.delete(user), session.commit(), 200
Update User
- Allows to update username, password, email as arguments: new_username, new_password, new_email
- Either one or all of the above attributes can be provided as arguments to the API.
- NOTE: Only valid username and password will allow updation of new values.
- For example to update username command invoked like:
http://127.0.0.1:5000/api/unstable/user/create?username=<username>&password=<password>&new_username=<new_username>
WORK β
During these three months I have completed all the essential objectives which includes
# | Objectives | PR/Commit/Link | Associated Deliverables | Status |
---|---|---|---|---|
1 | Installation of augur_view | PR Link | Completed | |
2 | Add user subcommand with username functionality | Link | Completed | |
3 | Add user with email | Link | Add user with unique email and username command | Completed |
4 | Add Password hashing for the user | Link | Password hashing added | Completed |
5 | augur user add subcommand | PR Link | CLI components for creating admin and user accounts. add_user method takes username as argument as adds it to the table user. | Completed |
6 | Added Create user endpoint | Link | API endpoint for creating user as per user schema (does not use ORM) | Completed |
7 | Added Validate user endpoint | Link | API endpoint for validating user email, username and password(does not use ORM) | Completed |
8 | Added remove user endpoint | Link | API endpoint for deleting user from database(does not use ORM) | Completed |
9 | Added update user endpoint | Link | API endpoint for updating user details like email, username and password.(does not use ORM) | Completed |
10 | User create endpoint ORM | Link | API endpoint for creating user using ORM | Completed |
11 | User validate endpoint ORM | Link | API endpoint for validating user using ORM | Completed |
12 | User remove endpoint ORM | Link | API endpoint for remove user using ORM | Completed |
13 | User update endpoint ORM | Link | API endpoint for updating user using ORM | Completed |
14 | Augur user API | PR Link | Completed | |
15 | Augur user CLI as per new schema | PR Link | Completed |
ACTIVITY REPORTS β
- Community Bonding Phase (May 21, 2021 - June 12, 2021) - Report
- Coding Period
- Week 1 (June 13, 2022 - June 20, 2022) - Blog
- Week 2 (June 21, 2022 - June 26, 2022) - Blog
- Week 3 (June 27, 2022 - July 3, 2022) - Blog
- Week 4 (July 4, 2022 - July 10, 2022) - Blog
- Week 5 (July 11, 2022 - July 17, 2022) - Blog
- Week 6 (July 18, 2022 - July 24, 2022) - Blog
- Week 7 (July 25, 2022 - July 31, 2022) - Blog
- Week 8 (1 August, 2022 - August 7, 2022) - Blog
- Week 9 (August 8, 2022 - August 14, 2022) - Blog
- Week 10 (August 15, 2022 - August 21, 2022) - Blog
- Week 11 (August 22, 2022 - August 28, 2022) - Blog
- Week 12 (August 29, 2022 - August 4, 2022) - Blog
- Final Report
Mentors and Team β
Acknowledgment β
I would like to thank my mentors Sean Goggins, John Kieran & Andrew Brain for helping and guiding me throughout the GSoC Journey :) Thanks to other mentees and mentors for collaboration. I am thankful to Google Summer Of Code for providing me with an opportunity to work with CHAOSS.
Additional Info β
This repository will be regularly updated with blogs and meetings summaries during the project.
Student Developer Info: β
- Linkedin: Priya Srivastava
- Github: @Priya730
- Twitter: @shivikapriya
- Blog: @shivikapriya
- Mail: shivikapriya730@gmail.com