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

Batool_design_browser_history #49

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

BatoolKad
Copy link
Collaborator

@BatoolKad BatoolKad commented Jan 19, 2024

  • PR's title includes the challenge's name and language
  • PR has short and clear description of the challenge
  • PR has appropriate labels and milestones for easy identification
  • PR it is assigned to the owner
  • reviewers are assigned
  • the PR contributes only one focused change
  • the branch is up to date with main/master
  • the code works when pulled and run locally
  • all conflicts are resolved (if any)
  • It is linked to an issue in the appropriate column of the project board
  • feedback is addressed (if any, and if it is appropriate feedback.)

README Documentation

  • The solution is documented in /src/README.md
  • The markdown source is formatted
  • Spelling and grammar is correct in all text
  • The markdown looks correct when you preview the file
  • All links and images work
  • The README documents the solution's behavior, strategy(ies) and implementation(s)
  • There are use cases in code blocks to illustrate the function's behavior

Python Files

  • There is a module header
  • There is a module docstring
  • File names are in snake_case
  • Test files are named test_<module_name>.py

Function Docstring

  • Behavior description
  • Parameter description
  • Return value description
  • Include any assumptions
  • Include 3 or more (passing!) doctests
  • Include 1-2 use cases (if necessary)

Function Implementation

  • The solution is not is not copied from djeada
  • The code is auto-formatted
  • The code has no (reasonable) linting mistakes
  • Variables are named with snake_case
  • The function has a clear and helpful name
  • The file's name matches the function name
  • The code follows the strategy as simply as possible
  • Variable names are clear and helpful
  • Comments explain the strategy (if necessary)
  • There are type annotations
  • (challenge) The code includes defensive assertions

Unit Test Suite

  • The test class has a helpful name in PascalCase
  • The test class has a docstring
  • Each unit test has
    • A helpful name
    • A clear docstring
    • Only one assertion
  • All tests pass
  • There are tests for defensive assertions
  • There are tests for boundary cases
  • Test suite includes black-box and glass-box tests

Copy link
Collaborator

@abed42 abed42 left a comment

Choose a reason for hiding this comment

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

@BatoolKad almost ready to merge, just please fix the typo in the readme.

@@ -1,8 +1,12 @@
import unittest

from src.deletions_to_make_valid_parentheses import (
Copy link
Collaborator

Choose a reason for hiding this comment

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

did you try to include this directory in the PYTHONPATH environment ? there are some solutions here : stackoverflow

@@ -0,0 +1,81 @@

---
##BrowserHistory Class
Copy link
Collaborator

Choose a reason for hiding this comment

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

minor issue. This title isn't showing up formatted because you need space between the hashtags and the title. like : ## BrowserHistory Class instead of ##BrowserHistory Class

Copy link
Collaborator

Choose a reason for hiding this comment

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

other than that LGTM ( === looks good to me)

self.index = min(len(self.urls_history)-1, self.index + step)

## return the new webpage url
return self.urls_history[self.index]
Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Brain Teasers Python challenge challenges solved using python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python Challenge: Brain teasers > Design browser history
2 participants