Skip to content

Commit

Permalink
Merge branch 'develop' into issue_156_scorecard
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaBurek committed Apr 3, 2024
2 parents 2abf8cd + 72e62d7 commit d8353d6
Show file tree
Hide file tree
Showing 13 changed files with 71 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
Expand All @@ -30,12 +30,12 @@ jobs:
python -m pip install -r docs/requirements.txt
- name: Build docs
run: ./.github/jobs/build_documentation.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: documentation
path: artifact/documentation
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: documentation_warnings.log
Expand Down
24 changes: 16 additions & 8 deletions R_work/include/agg_stat_bootstrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -493,12 +493,24 @@ calc3d_OBJFAS=function(d){
return ( alcOBJFAS(d[d$object_type == '3d',]) ) ;
}



calcOBJCSI=function(d){
return ( nrow(d[ d$fcst_flag == 1 & d$matched_flag == 0, ]) /
( nrow(d[ d$simple_flag == 1 & d$matched_flag == 1, ]) + 2 *
nrow(d[ d$simple_flag == 1 & d$matched_flag == 0, ]) ) ) ;
return ( ( nrow(d[ d$simple_flag == 1 & d$matched_flag == 1, ]) / 2 ) /
( ( nrow(d[ d$simple_flag == 1 & d$matched_flag == 1, ]) / 2 ) +
nrow(d[ d$simple_flag == 1 & d$matched_flag == 0, ]) )
)
}

calcOBJACSI=function(d){
return ( ( sum(d[ d$simple_flag == 1 & d$matched_flag == 1, ]$area) / 2 ) /
( ( sum(d[ d$simple_flag == 1 & d$matched_flag == 1, ]$area) / 2 ) +
sum(d[ d$simple_flag == 1 & d$matched_flag == 0, ]$area) )
)
}



calc2d_OBJCSI=function(d){
return ( calcOBJCSI(d[d$object_type == '2d',]) ) ;
}
Expand Down Expand Up @@ -959,11 +971,7 @@ calc3d_OBJVFAS=function(d){
return ( calcOBJAFAS(d[d$object_type == '3d',]) ) ;
}

calcOBJACSI=function(d){
return ( sum( d[ d$simple_flag == 1 & d$matched_flag == 1, ]$area ) /
(sum( d[ d$simple_flag == 1 & d$matched_flag == 1, ]$area ) + 2 *
sum( d[ d$simple_flag == 1 & d$matched_flag == 0, ]$area )) ) ;
}


calc2d_OBJACSI=function(d){
return ( calcOBJACSI(d[d$object_type == '2d',]) ) ;
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
</copy>
<delete file="${build}/MANIFEST.MF"/>
<manifest file="${build}/MANIFEST.MF">
<attribute name="Specification-Version" value="6.0.0-beta3-dev"/>
<attribute name="Specification-Version" value="6.0.0-beta4-dev"/>
</manifest>

<jar jarfile="${dist}/lib/metviewer.jar" basedir="${build}" manifest="${build}/MANIFEST.MF">
Expand Down
16 changes: 16 additions & 0 deletions docs/Users_Guide/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ When applicable, release notes are followed by the GitHub issue number which
describes the bugfix, enhancement, or new feature:
https://github.com/dtcenter/METviewer/issues

Version `v6.0.0-beta3 <https://github.com/dtcenter/METviewer>`_ release notes (20240208)
----------------------------------------------------------------------------------------

.. dropdown:: New Features

.. dropdown:: Enhancements
* Add summary_curve parameter to ROC YAML (`#506 <https://github.com/dtcenter/METviewer/issues/506>`_)
* Add accessibility statement to GUI (`#508 <https://github.com/dtcenter/METviewer/issues/508>`_)

.. dropdown:: Bugfixes

.. dropdown:: Internal
* Update GitHub actions workflows to switch from node 16 to node 20 (`#510 <https://github.com/dtcenter/METviewer/issues/510>`_)



Version `v6.0.0-beta2 <https://github.com/dtcenter/METviewer>`_ release notes (20231116)
----------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.0-beta3-dev
6.0.0-beta4-dev
10 changes: 10 additions & 0 deletions java/edu/ucar/metviewer/MVPlotJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -1822,6 +1822,16 @@ public void setConSeries(String conSeries) {
}

public String getShowLegend() {
if (showLegend == null){
String templ = getPch();
int size = templ.split(",").length;
String result = "c(";
for (int i = 0; i < size; i++) {
result = result + "1,";
}
showLegend = result.substring(0, result.length() - 1) + ")";
}

return showLegend;
}

Expand Down
6 changes: 2 additions & 4 deletions java/edu/ucar/metviewer/jobManager/JobManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,7 @@ protected Map<String, Object> createInfoMap(MVPlotJob job, int intNumDepSeries)
info.put("con_series", job.getConSeries().isEmpty() ? MVUtil.printRCol(
MVUtil.rep(0, intNumDepSeries)) : job.getConSeries());

if(job.getShowLegend() != null){
info.put("show_legend",MVUtil.printRCol(MVUtil.rep(0, intNumDepSeries)));
}
info.put("show_legend",job.getShowLegend().isEmpty() ? "c()" : job.getShowLegend());
info.put("legend", job.getLegend().isEmpty() ? "c()" : job.getLegend());
info.put("y1_lim", job.getY1Lim().isEmpty() ? "c()" : job.getY1Lim());
info.put("x1_lim", job.getX1Lim().isEmpty() ? "c()" : job.getX1LimR());
Expand Down Expand Up @@ -641,7 +639,7 @@ protected Map<String, Object> addPlotConfigs(Map<String, Object> yamlInfo, MVPlo
info.put("show_signif", rListToList(job.getShowSignif()));

info.put("con_series", rListToListNumeric(job.getConSeries()));
info.put("show_legend", rListToListNumeric(job.getShowLegend()));
info.put("show_legend", rListToList(job.getShowLegend()));
info.put("plot_ci", rListToList(job.getPlotCI()));


Expand Down
5 changes: 5 additions & 0 deletions java/edu/ucar/metviewer/jobManager/RocJobManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ protected void run(MVPlotJob job) throws ParseException, ValidationException, IO
yamlInfo.put("roc_ctc", job.getRocCtc());
yamlInfo.put("add_point_thresholds", job.getAddPointThresholds() ? "True" : "False");
yamlInfo.put("reverse_connection_order", job.getReverseConnectionOrder() ? "True" : "False");
if(job.getSummaryCurve().isEmpty()){
yamlInfo.put("summary_curve", "none");
}else {
yamlInfo.put("summary_curve", job.getSummaryCurve().get(0));
}
job.setPlotTmpl(this.getPythonScript());
yamlInfo = this.addPlotConfigs(yamlInfo, job, intNumDepSeries);
rscriptStatManager.runPythonScript(job, yamlInfo);
Expand Down
2 changes: 1 addition & 1 deletion webapp/metviewer/js/metviewer_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7636,7 +7636,7 @@ function initPage() {
editable: true,
edittype: "select",
formatter: 'select',
editoptions: {value: "0:No;1:Yes"},
editoptions: {value: "1:Yes;0:No"},
sortable: false,
},
{
Expand Down
2 changes: 1 addition & 1 deletion webapp/metviewer/js/metviewer_common.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 11 additions & 5 deletions webapp/metviewer/metviewer1.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<TITLE>METviewer 6.0.0-beta3-dev</TITLE>
<TITLE>METviewer 6.0.0-beta4-dev</TITLE>
<link rel="shortcut icon" href="./favicon.ico">

<link rel="stylesheet"
Expand Down Expand Up @@ -164,6 +164,13 @@
}
.ui-dialog { z-index: 1000 !important ;}
.web-acc-st{
font-size: 9px;
color: #555;
text-decoration: none;
font-weight: normal;
white-space: nowrap;
}
</style>

Expand Down Expand Up @@ -251,10 +258,9 @@
<div id="header" style="overflow: visible; position: static ">

<div class="toolbar ui-widget" id="toolbar ">
<div style="float: left; cursor: alias;font-family: 'Arial Black',Gadget,sans-serif;"
id="release">METviewer 6.0.0-beta3-dev<span class="ui-icon ui-icon-info " style="float: right;
margin-left: .4em;"></span>

<div style="float: left; cursor: alias;font-family: 'Arial Black',Gadget,sans-serif;text-align: left;" >METviewer 6.0.0-beta4-dev
<span id="release" class="ui-icon ui-icon-info " style="float: right;margin-left: .4em;"></span>
<br><a href="https://www.ucar.edu/accessibility" class="web-acc-st">Web Accessibility Statement</a>
</div>
<nav style="float: left;padding-left: 50px;">

Expand Down
2 changes: 1 addition & 1 deletion webapp/metviewer/plotJSP/eclv.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
addFixedVar();
});
getForecastVariablesHist();
series_var_y1_indexes = [];
if (initXML != null) {
if(initXML.find("error").length > 0 ){
Expand All @@ -277,7 +278,6 @@
}
initXML = null;
} else {
series_var_y1_indexes = [];
updateSeriesVarValHist(1, []);
updateSeriesHist();
}
Expand Down
3 changes: 2 additions & 1 deletion webapp/metviewer/plotJSP/hist.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@
updateSeriesHist();
});
fixed_var_indexes.push(1);
series_var_y1_indexes = [];
if (initXML != null) {
if(initXML.find("error").length > 0 ){
alert(initXML.find("error").text())
Expand All @@ -239,7 +241,6 @@
}
initXML = null;
} else {
series_var_y1_indexes = [];
updateSeriesVarValHist(1, []);
changeFixedVarHist('rhist');
updateFixedVarValHist(1, []);
Expand Down

0 comments on commit d8353d6

Please sign in to comment.