hiddenSymmetries / simsopt

Simons Stellarator Optimizer Code
https://simsopt.readthedocs.io
MIT License
83 stars 43 forks source link

added a QUASR-downloader #425

Open smiet opened 1 month ago

smiet commented 1 month ago

It would be amazing to have all of the QUASR configurations accessible with just one command.

I implemented a simple interface using the 'requests' library, that downloads any QUASR field.

I tried to make it so that it picks a random configuration, but apparently not all integers between 0 and 300,000 correspond to an entry in the database. @andrewgiuliani is there a list of which entries exist, so that a robust random picker can be returned? Or even better, the user could directly query the database for a list of constraints (NFP, A, iota, coil length, etc) and get a random config that fits their needs.

Something like this must be already implemented on the website, one would only have to adapt this to python. I am happy to do this but would need more info on the database itself. Would this be of interest @andrewgiuliani?

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 4.00000% with 24 lines in your changes missing coverage. Please review.

Project coverage is 91.80%. Comparing base (5b1cb70) to head (e5545ac). Report is 218 commits behind head on master.

:exclamation: Current head e5545ac differs from pull request most recent head 181f7ca

Please upload reports for the commit 181f7ca to get more accurate results.

Files Patch % Lines
src/simsopt/configs/zoo.py 4.00% 24 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #425 +/- ## ========================================== + Coverage 91.43% 91.80% +0.37% ========================================== Files 73 75 +2 Lines 12701 13477 +776 ========================================== + Hits 11613 12373 +760 - Misses 1088 1104 +16 ``` | [Flag](https://app.codecov.io/gh/hiddenSymmetries/simsopt/pull/425/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hiddenSymmetries) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/hiddenSymmetries/simsopt/pull/425/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hiddenSymmetries) | `91.80% <4.00%> (+0.37%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hiddenSymmetries#carryforward-flags-in-the-pull-request-comment) to find out more.

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