3dmol / 3Dmol.js

WebGL accelerated JavaScript molecular graphics library
https://3dmol.org/
Other
794 stars 194 forks source link

Move all URLs to a separate file & improve getbin method #762

Open prajwalkulkarni opened 8 months ago

prajwalkulkarni commented 8 months ago

:dizzy: Changelog

:star: In https://3dmol.org/doc/index.html there's a viewer embedded with a download option that can be clicked continuously and an equivalent number of requests will be made, this is not efficient as it'll duplicate multiple requests. A network call on the same action should be allowed only after the previous call fails/succeeds. Throttling has been added so that no duplicate and unnecessary requests are sent.

:star: All the URIs have been moved to a new file URLs.ts. If any changes or additions are supposed to be made, it can be updated in one place instead of changing at multiple places which could also be prone to typos.

:star: Code duplicate in getBin function is removed.

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 63.15789% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 82.55%. Comparing base (4d7c346) to head (3dbd73d).

Files Patch % Lines
src/utilities.ts 58.33% 3 Missing and 2 partials :warning:
src/autoload.ts 50.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #762 +/- ## ========================================== + Coverage 82.51% 82.55% +0.03% ========================================== Files 141 142 +1 Lines 11527 11527 Branches 2133 2133 ========================================== + Hits 9512 9516 +4 + Misses 1682 1679 -3 + Partials 333 332 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

prajwalkulkarni commented 8 months ago

The code coverage test seems to be failing, and I'm not sure of the root cause. Does it mean that the existing tests are not compatible with the changes made in the MR and require updating the test(s)? How do I make sure that the code coverage tests pass? Is there any way I can check the code coverage results locally before raising a PR? Running npm run cover isn't giving the same output as codecov. Kindly help