codezonediitj / pydatastructs

A python package for data structures and algorithms
https://pydatastructs.readthedocs.io/en/stable/
Other
201 stars 267 forks source link

Included linear + binary search for 1D static arrays #454

Closed r-avenous closed 2 years ago

r-avenous commented 2 years ago

References to other Issues or PRs or Relevant literature

446

Brief description of what is fixed or changed

A search function is added. It has 2 necessary parameters(1. element to search, 2. order of the array) and one optional (3. comparator)

  1. what to search
  2. positive values (int or float allowed, anything else raises type error exception) mean ascending order, negative is descending, 0 is unsorted
  3. function as a parameter; this is for when the usual >, < do not work on the datatype of the array

Other comments

codecov[bot] commented 2 years ago

Codecov Report

Merging #454 (1a3439b) into master (f82f52d) will increase coverage by 0.015%. The diff coverage is 100.000%.

@@              Coverage Diff              @@
##            master      #454       +/-   ##
=============================================
+ Coverage   98.588%   98.603%   +0.015%     
=============================================
  Files           29        29               
  Lines         3754      3795       +41     
=============================================
+ Hits          3701      3742       +41     
  Misses          53        53               
Impacted Files Coverage Δ
pydatastructs/linear_data_structures/__init__.py 100.000% <ø> (ø)
pydatastructs/linear_data_structures/algorithms.py 99.765% <100.000%> (+0.024%) :arrow_up:

Impacted file tree graph

czgdp1807 commented 2 years ago

See this. The red lines are not covered. Add tests for covering them as well.

r-avenous commented 2 years ago

See this. The red lines are not covered. Add tests for covering them as well.

Its showing that bubble sort is not covered, but it is, I did not touch anything other than searching which I added

czgdp1807 commented 2 years ago

Its showing that bubble sort is not covered, but it is, I did not touch anything other than searching which I added

That's the red (lighter shade) of diff. If you scroll and click on Click to load diff then you will see dark red lines. These are the ones that you have to cover by adding tests.

r-avenous commented 2 years ago

Its showing that bubble sort is not covered, but it is, I did not touch anything other than searching which I added

That's the red (lighter shade) of diff. If you scroll and click on Click to load diff then you will see dark red lines. These are the ones that you have to cover by adding tests.

Ok on it. But still, bubble sort and another line of importing is in deep red, what about it?

czgdp1807 commented 2 years ago

bubble sort and another line of importing is in deep red, what about it?

Ignore. Though you can generate the same report locally if Codecov UI is confusing. See the testing section of README. Once you execute the command there, you will have to open the index.html file in html/cov in a browser.

r-avenous commented 2 years ago

bubble sort and another line of importing is in deep red, what about it?

Ignore. Though you can generate the same report locally if Codecov UI is confusing. See the testing section of README. Once you execute the command there, you will have to open the index.html file in html/cov in a browser.

Can I use Codecov? I am comfortable with it

czgdp1807 commented 2 years ago

Sure.

r-avenous commented 2 years ago

Sure.

Is there any other issue?

czgdp1807 commented 2 years ago

I will push some changes to your branch forArrays may be on Sunday. I don't think there is anything else to be done from your side.

r-avenous commented 2 years ago

I will push some changes to your branch forArrays may be on Sunday. I don't think there is anything else to be done from your side.

Please let me know if there is any error. Shall I see if I can contribute something else in the project?

czgdp1807 commented 2 years ago

Shall I see if I can contribute something else in the project?

Sure go ahead.

czgdp1807 commented 2 years ago

Thanks @skullVoid

r-avenous commented 2 years ago

Thanks @skullVoid

I didnt do much. Thank you for guiding me, this was a good experience for me as a first timer.