Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

161255361 comment on an article #23

Closed
wants to merge 23 commits into from

Conversation

KITHU
Copy link
Contributor

@KITHU KITHU commented Nov 8, 2018

What does this PR do?

  • Implements feature to add comments to an article*

Description of Task to be completed?

  1. Post a comment on an article
  2. Get all comments available to a particular article
  3. Edit a comment
  4. Get a specific comment
  5. Delete a comment

How should this be manually tested?

  1. git clone repo here
  2. create a .env file see .env.example
  3. cd ah-codeofduty
  4. python manage.py migrate
  5. python manage.py runserver

Any background context you want to provide?

  • Only authenticated users should be able to comments on articles.
  • Successive comments should be threaded
  • Timestamped comments.

Endpoints

  1. GET api/articles/slug/comment/
  2. POST api/articles/slug/comment/
  3. GET api/articles/slug/comment/article_id/
  4. POST api/articles/slug/comment/article_id/
  5. PUT api/articles/slug/comment/article_id/
  6. DELETE api/articles/slug/comment/article_id/

What are the relevant pivotal tracker stories?

Screenshots (if appropriate)

screen shot 2018-11-08 at 16 09 27

Questions:

KE-C02QF4HNFVH3 and others added 19 commits November 5, 2018 10:48
- Add new folder in apps articles/
[Feature #161255358]
- Add new folder in apps articles/
[Feature #161255358]
- Add new folder in apps articles/
[Feature #161255358]
- Add new folder in apps articles/
[Feature #161255358]
- Add models for articles
- Add seriaizers for articles
- Add views for articles
- Add url routes for articles
[Feature #161255358]
- User can create an article
- User can fetch all articles
- User can fetch a single article
- User can update their article
- User can delete their article
- Add tests for all the CRUD functions
[Feature #161255358]
- Add new folder in apps articles/
[Feature #161255358]
- Add new folder in apps articles/
[Feature #161255358]
- Add models for articles
- Add seriaizers for articles
- Add views for articles
- Add url routes for articles
[Feature #161255358]
- User can create an article
- User can fetch all articles
- User can fetch a single article
- User can update their article
- User can delete their article
- Add tests for all the CRUD functions
[Feature #161255358]
- Rebase from develop and merge conflicts
[Feature #161255358]
- Merge conflicts from origin
[Feature #161255358]
- Merge conflicts from origin
[Feature #161255358]
- add .env variables
- add 2 endpoints api/users/reset-password an api/users/forget-password
- ensure reset link is sent to user's email
- ensure user can reset password using that link
- add .env.example
[Feature #161255355]

* Feature(Reset Password): Add Reset Password Endpoint
dquote> - Update APIView to CreateAPIView
dquote> - update requuirements.txt
dquote> [Feature #161255355]

* Feature(Reset Password): Add Reset Password Endpoint
dquote> - Update APIView to CreateAPIView
dquote> - update requuirements.txt
dquote> [Feature #161255355]

* Feature(Reset password): Update requirements.txt
- add django-rest-swagger to requirements.txt
[Feature #161255355]

* Feauture(Reset Password): Add Reset Password Endpoint
- add .env variables
- add 2 endpoints api/users/reset-password an api/users/forget-password
- ensure reset link is sent to user's email
- ensure user can reset password using that link
- add .env.example
[Feature #161255355]

* Feature(Reset Password): Add Reset Password Endpoint
dquote> - Update APIView to CreateAPIView
dquote> - update requuirements.txt
dquote> [Feature #161255355]

* Feature(Reset Password): Add Reset Password Endpoint
dquote> - Update APIView to CreateAPIView
dquote> - update requuirements.txt
dquote> [Feature #161255355]

* Feature(Reset password): Update requirements.txt
- add django-rest-swagger to requirements.txt
[Feature #161255355]

*  Feature(Reset Password): Add template forms
- Add html template forms for forgot password and reset password
- Add get methods to route to the templates
- Use EmailMultiAlternatives in place of send_mail to send html content
[Feature #161255355]

* Feature(Reset Password): Fix merge conflict
- Add library imports to fix merge conflict
[Feature #161255355]

* Feature(Reset Password): Use JWT token for encoding
- Use jwt token in addition to default_token_generator to reset password
[Feature #161255355]

* Feature(Reset Password): Add unittests for reset password
- Add unittests for forgot password
- Add unittests for reset password
- Tests cover both sad and happy events

[Feature #161255355]

* Feature(Reset Password): Update requirements.txt
- Update requirements.txt
[Feature #161255355]

* Feature(Reset Password): Update templates
- Adjust css and html on email template
[Feature #161255355]

* Feature(Reset Password): Update test_reset_password.py
- Remove redundant imports
[Feature #161255355]

* Feauture(Reset Password): Add Reset Password Endpoint
- add .env variables
- add 2 endpoints api/users/reset-password an api/users/forget-password
- ensure reset link is sent to user's email
- ensure user can reset password using that link
- add .env.example
[Feature #161255355]

* Feature(Reset Password): Add Reset Password Endpoint
dquote> - Update APIView to CreateAPIView
dquote> - update requuirements.txt
dquote> [Feature #161255355]

* Feature(Reset Password): Add Reset Password Endpoint
dquote> - Update APIView to CreateAPIView
dquote> - update requuirements.txt
dquote> [Feature #161255355]

* Feature(Reset password): Update requirements.txt
- add django-rest-swagger to requirements.txt
[Feature #161255355]

* Feauture(Reset Password): Add Reset Password Endpoint
- add .env variables
- add 2 endpoints api/users/reset-password an api/users/forget-password
- ensure reset link is sent to user's email
- ensure user can reset password using that link
- add .env.example
[Feature #161255355]

* Feature(Reset Password): Add Reset Password Endpoint
dquote> - Update APIView to CreateAPIView
dquote> - update requuirements.txt
dquote> [Feature #161255355]

* Feature(Reset Password): Add Reset Password Endpoint
dquote> - Update APIView to CreateAPIView
dquote> - update requuirements.txt
dquote> [Feature #161255355]

* Feature(Reset password): Update requirements.txt
- add django-rest-swagger to requirements.txt
[Feature #161255355]

*  Feature(Reset Password): Add template forms
- Add html template forms for forgot password and reset password
- Add get methods to route to the templates
- Use EmailMultiAlternatives in place of send_mail to send html content
[Feature #161255355]

* Feature(Reset Password): Use JWT token for encoding
- Use jwt token in addition to default_token_generator to reset password
[Feature #161255355]

* Feature(Reset Password): Add unittests for reset password
- Add unittests for forgot password
- Add unittests for reset password
- Tests cover both sad and happy events

[Feature #161255355]

* Feature(Reset Password): Update templates
- Adjust css and html on email template
[Feature #161255355]

* Feature(Reset Password): Update test_reset_password.py
- Remove redundant imports
[Feature #161255355]

* Feature(Reset password): User Reset Password via email
- remove redundant imports in tests
- remove unnecessary comments
[Feature #161255355]

* Feature(Reset password): Add unittests
- Add test for email verification after signup
[Feature #161255355]
- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- GET, PUT and PATCH view for profile
- Add admin.py with credentials
- Profile relations migrations
- Update serializer

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- update .gitignore

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles
- Refactor failing test assertion error
- remove admin.py

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- View all profiles

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Update profile data

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- GET, PUT and PATCH view for profile
- Add admin.py with credentials
- Profile relations migrations
- Update serializer

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- update .gitignore

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- View all profiles

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Fetch all profiles

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Test User profile

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- GET, PUT and PATCH view for profile
- Add admin.py with credentials
- Profile relations migrations
- Update serializer

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles
- Refactor failing test assertion error
- remove admin.py

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- View all profiles

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Fetch all profiles

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Test User profile

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- GET, PUT and PATCH view for profile
- Add admin.py with credentials
- Profile relations migrations
- Update serializer

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- update .gitignore

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles
- Refactor failing test assertion error
- remove admin.py

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- View all profiles

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Update profile data

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles
- Refactor failing test assertion error
- remove admin.py

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- GET, PUT and PATCH view for profile
- Add admin.py with credentials
- Profile relations migrations
- Update serializer

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- View all profiles

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Update profile data

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Model for user profile

- User relation migrations
- Serializer to user profile inputs

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- GET, PUT and PATCH view for profile
- Add admin.py with credentials
- Profile relations migrations
- Update serializer

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles
- Refactor failing test assertion error
- remove admin.py

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Update profile data

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Test User profile

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]

Feature(User Profile):Users should be able to create their profiles

- Refactor test

[Feature #161255357]
    - Model for comments
    - Serialiser for comments
    - views for comments

    [Feature #161255361]
    - write test for comments

    [Feature ##161255361]
@coveralls
Copy link

coveralls commented Nov 8, 2018

Pull Request Test Coverage Report for Build 216

  • 194 of 199 (97.49%) changed or added relevant lines in 10 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.7%) to 94.034%

Changes Missing Coverage Covered Lines Changed/Added Lines %
authors/apps/articles/models.py 10 11 90.91%
authors/apps/articles/views.py 70 74 94.59%
Files with Coverage Reduction New Missed Lines %
authors/apps/articles/models.py 1 93.33%
Totals Coverage Status
Change from base Build 200: 0.7%
Covered Lines: 930
Relevant Lines: 989

💛 - Coveralls

Copy link
Contributor

@maxwellgithinji maxwellgithinji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@maxwellgithinji maxwellgithinji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@3N61N33R 3N61N33R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@KITHU KITHU closed this Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants