ubsuny / CP1-24-HW3

Homework 3 template for CP1-24
1 stars 16 forks source link

Circuit parallel #30

Closed dhamalakamal closed 1 month ago

dhamalakamal commented 1 month ago

This calculates the net resistance of the circuit where the resistances are connected in parallel. This pull request includes the theoritical description in markdown file and coding part in python file.

avgagliardo commented 1 month ago

please make a project milestone for your algorithm, we are still missing a bunch.

laserlab commented 1 month ago

The code runs perfectly smoothly, the docstrings and comments are very descriptive, the algorithms are very functional and the code is written very well but there’s a couple things that need to be addressed.

  • The assignment task does say that each defined function needs to be its own module so I would suggest splitting the calculate_parallel_resistance and input_resistances_and_calculate functions into its own module to fix this.
  • The PR is missing the unit test, please add this.
  • Something small but I would just change the “enter resistance” message to “enter resistance in ohms” (line 27)

As for the linting issues:

  • Fix the trailing whitespaces in lines 12, 15, 28, 31, 38, 41.
  • Line 40 is 2 characters too long.
  • Missing docstring at the top.
  • Uncapitalize the file name “Circuit_Parallel”.
  • Function on line 35 is missing a docstring.

Other than that, great job!

Good review! Agreed.

dhamalakamal commented 1 month ago

This is an error message that occured. (Pylint: All jobs have failed.) May be it is due to Indentation errors, trailing whitespace, non-PEP8 compliant names. But, I couldnot find all errors. What might be the solution?

laserlab commented 1 month ago

This is an error message that occured. (Pylint: All jobs have failed.) May be it is due to Indentation errors, trailing whitespace, non-PEP8 compliant names. But, I couldnot find all errors. What might be the solution?

circuit_parallel.py:4:0: C0301: Line too long (106/100) (line-too-long) circuit_parallel.py:30:0: C0301: Line too long (101/100) (line-too-long) circuit_parallel.py:43:0: C0301: Line too long (102/100) (line-too-long) circuit_parallel.py:35:0: W0105: String statement has no effect (pointless-string-statement) circuit_parallel.py:39:0: C0116: Missing function or method docstring (missing-function-docstring)


Your code has been rated at 6.88/10

laserlab commented 1 month ago

merged with linting issues and missing docstrings

laserlab commented 1 month ago

merged with linting issues and missing docstrings