Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releasing v1.0.0 #56

Merged
merged 46 commits into from
May 10, 2024
Merged

Releasing v1.0.0 #56

merged 46 commits into from
May 10, 2024

Conversation

anchal-physics
Copy link
Collaborator

  • Now depends on IMASDD. All previous versions depend on OMAS and will be deprecated.
  • Apache 2.0 licence with notice file
  • Added documentation
  • Added tests

eldond and others added 30 commits February 5, 2024 11:40
Bugfix: fix PFR split in extended mesh
Added link for adding ssh-key to Github
PR ProjectTorreyPines/SOLPS2imas.jl#24
will change gsdesc to a keyword argument with default file. This
commit changes all use cases of solp2imas to use the default
gsdesc value instead of supplying a file. This is in support of
closing
#33
Added makefile that correctly clones repos or use git urls to generate
a functioning set of toml files so that private projects can be
accessed easily.
README with make instructions
Adding makefile for building Julia environment
- The function for adding rho doesn't act if rho is already present and valid
- Some G-files don't have rho or have all 0s, which is invalid and not useful
make r option now checks if it is called from inside a repo that is
present in .julia/dev and if present there, it clones the dependent
repos without the .jl extension.

It also runs dvc pull to ensure sample files have been pulled
makefile clones without .jl in .julia/dev and more
Adding option to specify cell subset index

Merging as ProjectTorreyPines/SOLPS2imas.jl#30 as been merged.
Updating the name of the get_grid_subset (old get_grid_subset_witg_index)
Tested this but got following error:
```
(base) gupta@F-CJXNMY7L7 SD4SOLPS.jl % julia --project test/runtests.jl
Test Summary:         | Pass  Total  Time
lightweight_utilities |    4      4  1.0s
Test Summary: | Pass  Total  Time
actuator      |    2      2  1.7s
core_profile_extension: Error During Test at /Users/gupta/Git/ProjectTorreyPines/SD4SOLPS.jl/test/runtests.jl:166
  Got exception outside of a @test
  UndefVarError: `gradient` not defined
  Stacktrace:
   [1] extrapolate_core(edge_rho::Vector{Float64}, edge_quantity::Vector{Float64}, rho_output::Vector{Float64})
     @ SD4SOLPS ~/Git/ProjectTorreyPines/SD4SOLPS.jl/src/supersize_profile.jl:58
   [2] macro expansion
     @ ~/Git/ProjectTorreyPines/SD4SOLPS.jl/test/runtests.jl:171 [inlined]
   [3] macro expansion
     @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1498 [inlined]
   [4] top-level scope
     @ ~/Git/ProjectTorreyPines/SD4SOLPS.jl/test/runtests.jl:168
   [5] include(mod::Module, _path::String)
     @ Base ./Base.jl:457
   [6] exec_options(opts::Base.JLOptions)
     @ Base ./client.jl:307
   [7] _start()
     @ Base ./client.jl:522
Test Summary:          | Error  Total  Time
core_profile_extension |     1      1  0.5s
ERROR: LoadError: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.
in expression starting at /Users/gupta/Git/ProjectTorreyPines/SD4SOLPS.jl/test/runtests.jl:165
```

For testing, following versions of the pacjages were used (these are the points where IMASDD was used instead of OMAS):
GGDUtils: ProjectTorreyPines/IMASggd.jl@b11ad15
SOLPS2IMAS: ProjectTorreyPines/SOLPS2imas.jl@f843e6a

The main issue is that OMAS.gradient() function is defined in https://github.com/ProjectTorreyPines/OMAS.jl/blob/master/src/math.jl
but no such function exists in IMASDD.
Using set_time for sample files where description is not in the
standard format.

Changes were made in the code to use ismissing in places to conform to
requirements of IMASDD.

In record_regular_mesh!(), the deepcopy of each element was replaced
with deepcopy of the entire grid subset to improve speed.

The test runtests.jl was updated to reflect the changes.

All tests pass now with following versions:

JuliaFusion/EFIT.jl@8580ca8
ProjectTorreyPines/IMASdd.jl@6a6968a
ProjectTorreyPines/IMASggd.jl@b11ad15
ProjectTorreyPines/SOLPS2imas.jl@f843e6a

Note that EFIT version that was used has not been merged with its
master branch yet at the time of this test.

In conclusion, in future, OMAS can be removed now.
Replacing OMAS with IMASDD everywhere
The final change from OMAS to IMASDD is now complete. The code has been
tested and is working. For this repo, there was no change in the
speed of the code.
Now make r will clone dependent project repos without the .jl extension
by default. The unnecessary complexity of detection of .julia/dev path
has been removed. This is to address ProjectTorreyPines/SOLPS2imas.jl#33
demo.ipynb and simple_demo.jl had become out of date because of recent
changes. Also, the demo envrionment creation was not good and used shell
scripts. This commit, uses new makefile that cleanly creates a set of
Porject.toml and Manifest.toml files that will work with demo. The
sample files are also sources from SD4SOLPS.jl/sample now.
makefile and examples updated

Simple fix, not asking for review.
For core profile extrapolation, the property needs to be evaluated at
the midplane surface. This is done by interpolating the property at the
midplane surface using the TPS interpolation method now. Earlier, it
was using KDTree method which was creating a very flat electron density
profile near the core boundary.
Using TPS interpolation to get midplane profile
* core_profiles_2d has been removed as GGDUtils.interp provides the same functionality
* The actuator_model.jl has been moved to unit_utils.jl with only unit conversion utilities. SynthDiag.compute_gas_injection provides gas actuation model directly from IMAS dd now.
* All functions have strict input and output types defined.
* All docstrings have been updated to be more informative.
* Tests have been updated and cleaned up a bit.
* Examples have been updated with simplified package addition. No make file required inside examples directory anymore.
Triggered at:

* For pushing changes to master or dev branches
* For pull requests to master or dev branches

Features:

* Uses Julia 1.9.3 (we can change or increase number of versions to be tested and supported later)
* Uses ubuntu-latest in x86 architecture
* Uses DVC to pull sample files (login to cybele using guptaa account)
* Runs test using julia's native test feature.
* Uploads generated images in test results to the artifacts.
* CodeCov needs to be setup for reporting code coverage of the tests.
* Now depends on IMASDD. All previous versions depend on OMAS and will be deprecated.
* Apache 2.0 licence with notice file
* Added documentation
* Added tests
@anchal-physics anchal-physics merged commit 1657f2f into master May 10, 2024
7 checks passed
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