Added length unit conversions by SabariGanesh-K · Pull Request #5373 · TheAlgorithms/Python · GitHub
Skip to content

Added length unit conversions - #5373

Merged
cclauss merged 14 commits into
TheAlgorithms:masterfrom
SabariGanesh-K:master
Oct 19, 2021
Merged

cclauss merged 14 commits into
TheAlgorithms:masterfrom
SabariGanesh-K:master

Conversation

@SabariGanesh-K

Copy link
Copy Markdown
Contributor

Conversion of length units were added with respective tests being implemented and passed.
Available Units:- Metre,Kilometre,Feet,Inch,Centimeter,Yard,Foot,Mile,Millimeter

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

Conversion of length units were added with respective tests being implemented and passed.
Available Units:- Metre,Kilometre,Feet,Inch,Centimeter,Yard,Foot,Mile,Millimeter
@ghost ghost added awaiting reviews This PR is ready to be reviewed tests are failing Do not merge until tests pass labels Oct 17, 2021
@ghost ghost removed the tests are failing Do not merge until tests pass label Oct 17, 2021
@SabariGanesh-K

Copy link
Copy Markdown
Contributor Author

@SabariGanesh-K

Copy link
Copy Markdown
Contributor Author

@cclauss The tests have been passed. Let me know if I can do anymore changes/contribution !!

Comment thread conversions/length_conversions.py Outdated

@l3str4nge l3str4nge left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add one more test

@ghost ghost added awaiting changes A maintainer has requested changes to this PR and removed awaiting reviews This PR is ready to be reviewed labels Oct 18, 2021
@ghost ghost added awaiting reviews This PR is ready to be reviewed and removed awaiting changes A maintainer has requested changes to this PR labels Oct 18, 2021
Added test to evaluate whether the code handles wrong arguements passed
@ghost ghost added the tests are failing Do not merge until tests pass label Oct 18, 2021
@SabariGanesh-K

Copy link
Copy Markdown
Contributor Author

The tests are passing in my Pycharm with doctests().But why is it failing here in pre-commit ? It initially passed too before this change!! Any reason why ?

@cclauss

cclauss commented Oct 18, 2021

Copy link
Copy Markdown
Member

conversions/length_conversions.py:106:89: E501 line too long (96 > 88 characters)

@cclauss cclauss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@ghost ghost removed the awaiting reviews This PR is ready to be reviewed label Oct 18, 2021
@ghost ghost added the awaiting reviews This PR is ready to be reviewed label Oct 19, 2021
One of the test was failing and it was fixed
@ghost ghost removed the tests are failing Do not merge until tests pass label Oct 19, 2021
@SabariGanesh-K

Copy link
Copy Markdown
Contributor Author

@cclauss cclauss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks for the cleanup. I was trying to fix things in Pythonista on my iPad (imperfect ;-) )and was just switching to my MacBook when I saw that you already cleaned things up.

@ghost ghost removed the awaiting reviews This PR is ready to be reviewed label Oct 19, 2021
@cclauss
cclauss dismissed l3str4nge’s stale review October 19, 2021 05:25

The requested test was added.

@cclauss
cclauss merged commit 66c96aa into TheAlgorithms:master Oct 19, 2021
shermanhui pushed a commit to shermanhui/Python that referenced this pull request Oct 22, 2021
* Added length unit conversions

Conversion of length units were added with respective tests being implemented and passed.
Available Units:- Metre,Kilometre,Feet,Inch,Centimeter,Yard,Foot,Mile,Millimeter

* Formatted File

File was formatted to go as per repo rules

* Reformatted file

* Reformatted code once again

* Added more test 

Added test to evaluate whether the code handles wrong arguements passed

* Update length_conversions.py

* Update length_conversions.py

* Update length_conversions.py

* Update length_conversions.py

* Update length_conversions.py

* Update length_conversions.py

* Update length_conversions.py

* Fixed  Minor errors in test

One of the test was failing and it was fixed

Co-authored-by: Christian Clauss <cclauss@me.com>
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