cgarling / StarFormationHistories.jl

Fitting astrophysical star formation histories via CMD modelling.
MIT License
3 stars 0 forks source link

Implement helper function to process artificial star tests #37

Closed cgarling closed 3 months ago

cgarling commented 3 months ago

Been copy-pasting some code around for a while that calculates binned statistics on artificial star tests. This PR implements the process_ASTs method that accomplishes this.

I wanted to support DataFrames.DataFrame and TypedTables.Table but couldn't figure out a single implementation that would work on both. They iterate differently and I couldn't figure out a common mechanism to share the code.

I decided to have separate implementations using package extensions. There is no default implementation for this method so it requires users to load one of the above packages before using it. I don't like how much code reuse there is between the two versions but right now I don't have a solution.

As this uses package extensions, the method requires Julia 1.9 or greater. I could look at some backporting methods like https://github.com/cjdoris/PackageExtensionCompat.jl but right now I don't care and am just not running the method's tests on older Julia versions.

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 96.96970% with 2 lines in your changes missing coverage. Please review.

Project coverage is 78.17%. Comparing base (a93aecf) to head (2dd8f45).

Files Patch % Lines
ext/DataFramesExt.jl 96.96% 1 Missing :warning:
ext/TypedTablesExt.jl 96.96% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #37 +/- ## ========================================== + Coverage 77.19% 78.17% +0.98% ========================================== Files 17 19 +2 Lines 1298 1361 +63 ========================================== + Hits 1002 1064 +62 - Misses 296 297 +1 ```

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