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

Update tdd_example #60

Merged
merged 5 commits into from
Sep 8, 2023
Merged

Update tdd_example #60

merged 5 commits into from
Sep 8, 2023

Conversation

oyvindeide
Copy link
Collaborator

@oyvindeide oyvindeide commented Sep 6, 2023

This adds a new example for the tdd workshop,

corresponding issue text:

You are an intrepid explorer, navigating a scenery of rolling hills at night. It is completely dark, and your only source of information is your handheld computer which will give you the next point on your journey. You have heard that there exists a treasure here, and you only clue is that the treasure is located in an incline where the slope between your current position and the next coordinate is above X. Your task is to navigate this landscape and locate the coordinates of the treasure.Example:
Given a list of coordinates (your test input) (x, y):
[(1, 1), (2.0, 1.8), (2.5, 2.1), (3, 2), (4.3, 7.2), (5.3, 6.2)]
we can calculate the slope along the coordinates:
[0.8, 0.6, -0.2, 4.0, -1.0]

given a threshold of 1, the coordinate we are looking for is: (4.3, 7.2)

image

Copy link
Contributor

@hnformentin hnformentin left a comment

Choose a reason for hiding this comment

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

Very good contribution!
I made some comments for consideration, if you can address them that would be awesome :-)

.github/workflows/test.yml Show resolved Hide resolved
.github/workflows/lint.yml Show resolved Hide resolved
src/tdd_workshop/read_coordinates.py Outdated Show resolved Hide resolved
src/tdd_workshop/read_coordinates.py Outdated Show resolved Hide resolved
tests/unit/conftest.py Show resolved Hide resolved
tests/unit/test_input Outdated Show resolved Hide resolved
tests/unit/test_read_coordinates.py Outdated Show resolved Hide resolved
@lars-petter-hauge
Copy link
Collaborator

lars-petter-hauge commented Sep 7, 2023

Nicely done! I had some comments/suggestions as well, it's always easy to create those :D

@lars-petter-hauge
Copy link
Collaborator

lars-petter-hauge commented Sep 7, 2023

Nice, thumbs up from me, just remember to squash the review commits before merging ;)

Øyvind Eide and others added 5 commits September 8, 2023 10:03
@oyvindeide oyvindeide merged commit fcda461 into equinor:main Sep 8, 2023
9 checks passed
@oyvindeide oyvindeide deleted the add_example branch September 8, 2023 10:32
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.

3 participants