Skip to content

Commit 6e17a8a

Browse files
authored
Bug fixes and dependency updates. (#679)
* Updated Junit dependency * Fxed typos and cleaned house * Fixed issues #677 and #678.
1 parent 50775ec commit 6e17a8a

File tree

9 files changed

+33
-41
lines changed

9 files changed

+33
-41
lines changed

.gitignore.swp

-12 KB
Binary file not shown.

.java-version

-1
This file was deleted.

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If you need to have a copy of Squid3 that runs on a specific OS and a Java JDK o
4141

4242
***Note to Developers***
4343

44-
Squid3 can be compiled from the source code by using Gradle 7.2 running Java 8 and it will run on any of the Liberica full JDKs or JREs 8, 11, 17. If Gradle 7.2 is set to use a higher version of Java (Liberica), then Squid3 will not run on lower numbered versionbs of Java.
44+
Squid3 can be compiled from the source code by using Gradle 7.2 running Java 8, and it will run on any of the Liberica full JDKs or JREs 8, 11, 17. If Gradle 7.2 is set to use a higher version of Java (Liberica), then Squid3 will not run on lower numbered versions of Java.
4545
```text
4646
gradle clean build
4747
```
@@ -72,7 +72,7 @@ demonstration Squid3 project is available from this menu, thanks to [@NicoleRayn
7272
The project manager allows for naming the project, naming the analyst, and reviewing statistics about the loaded data as
7373
well as keeping notes about the project.
7474

75-
    All data-processing parameters are specified on the Project Manager page: whether or not to
75+
    All data-processing parameters are specified on the Project Manager page: whether to
7676
normalize counts for SBM; ratio calculation method; preferred index isotope, constraints on weighted means of reference
7777
materials; the common lead model for reference materials; and the physical constants model to be used in the project.
7878
Note on parameter models: See below for how to manage these models from the **Parameters** menu item. Changing these
@@ -84,13 +84,13 @@ store of models available to Squid3, if not already present.
8484

8585
The **Data** menu: 1) _Manage Sample Names_, 2) _Manage Spots and Reference Materials_, and 3) _Audit Raw Data_ for all data files. For Prawn data files, it also
8686
provides for saving and swapping out data files. '_Manage Sample Names_' automates with overrides the naming of
87-
samples based on delimeters or leading character counts. '_Manage Spots and Reference Materials_' supports editing
87+
samples based on delimiters or leading character counts. '_Manage Spots and Reference Materials_' supports editing
8888
spot names, filtering spots by name, and setting both the project's reference material spots and concentration
8989
reference material spots by using the same filtering feature. The reference material models are selected here as
9090
well. The context menu on the left-side list is accessed by a right-mouse click and has items for removing a spot and
9191
splitting the data file into two files. Any modifications to the data file can be saved to a new file if needed. Note
9292
that saving the project preserves the changes to the data within the project file but without changing the source
93-
data file. '_Audit masses_' provides time-based views of masses and is configuable to show mass diferences as well.
93+
data file. '_Audit masses_' provides time-based views of masses and is configurable to show mass differences as well.
9494

9595
The **Task** menu -
9696
1) '_View Current Task_' provides for the user to configure the metadata about a task including
@@ -114,7 +114,7 @@ a list of tasks with their details, which can then be edited or used directly in
114114
counts align.
115115

116116
The **Isotopes** menu: 1) '_Map Isotopes from Data to Task_' provides for mapping the isotope or mass labels provided
117-
by the data file for each mass staton to the task's isotope or mass labels. Tasks generally refer to masses using
117+
by the data file for each mass station to the task's isotope or mass labels. Tasks generally refer to masses using
118118
integers such as '204' or simple decimals such as '195.8', whereas the labels for the mass stations recorded in the data
119119
file usually have several significant digits of atomic mass, such as '195.75123'. The background mass can be specified
120120
here or in the task editor. After clicking the orange button at the bottom to copy the labels, the columns D (Data
@@ -123,12 +123,12 @@ Isotope Label) and T (Task Isotope Label) will contain the same values.
123123
**Expressions** menu -
124124
'_Manage Expressions_' has a left panel organized by expression type that provides for sorting
125125
the expressions within each list by Name, Execution order, or Target spot set - reference material, concentration
126-
reference material, and unknowns - denoted by left-hand superscripts of ```R or C, and U```. All of the built-in
126+
reference material, and unknowns - denoted by left-hand superscripts of ```R or C, and U```. All the built-in
127127
expressions have been named in a consistent fashion per issue [#164](https://github.com/CIRDLES/Squid/issues/164)
128128
discussions and have explanatory text in their 'notes' panel provided by [@sbodorkos](https://github.com/sbodorkos) . Of
129129
particular note (idea thanks to [@NicoleRayner](https://github.com/NicoleRayner) ) is that the expressions targeting
130130
reference materials only are suffixed by "\_RM". The tab for 'Unhealthy Expressions / Mismatched Targets' will appear in
131-
red ![red](https://placehold.it/15/f03c15/000000?text=+) if any are present. Squid3 supports the assignment of a sample (a group of unknowns) as the target of custom expressions - see the drop down box populated with the sample names to
131+
red ![red](https://placehold.it/15/f03c15/000000?text=+) if any are present. Squid3 supports the assignment of a sample (a group of unknowns) as the target of custom expressions - see the drop-down box populated with the sample names to
132132
the right of the unknown samples checkbox. The drop down only appears if unknowns is checked and reference material is
133133
not checked.
134134

@@ -179,23 +179,23 @@ input from [@NicoleRayner](https://github.com/NicoleRayner).
179179
1) '_About Squid3_' summarizes Squid3's purpose and identifies collaborators and financial supporters.
180180
2) '_How to cite Squid3_' provides a [link](https://ecat.ga.gov.au/geonetwork/srv/eng/catalog.search#/metadata/133870)
181181
to our latest publication.
182-
3) '_Squid3 Github Repository_' provides a link to this repository.
182+
3) '_Squid3 GitHub Repository_' provides a link to this repository.
183183
4) '_Squid3 Development
184184
Notes_' links to a [wiki](https://github.com/CIRDLES/ET_Redux/wiki/SHRIMP:-Intro) documenting the porting of Squid2.5 to
185185
Squid3.
186-
5) '_CIRDLES.org_" links [here](https://cirdles.org/), the home of the College of Charleston development team.
187-
6) '_Topsoil Github Repository_' links to [Topsoil](https://github.com/CIRDLES/Topsoil), used to provide Concordia diagrams in Squid3.
186+
5) '_CIRDLES.org_' links [here](https://cirdles.org/), the home of the College of Charleston development team.
187+
6) '_Topsoil GitHub Repository_' links to [Topsoil](https://github.com/CIRDLES/Topsoil), used to provide Concordia diagrams in Squid3.
188188

189189
**Help** menu -
190-
1) '_Video Intro to Sustainable Software Development' shows video introduction.
190+
1) 'Video Intro to Sustainable Software Development' shows video introduction.
191191
2) '_Introduction and Guide to Menu_' opens this document.
192192
3) '_Video Tutorials on YouTube_' features
193193
videos produced by [@NicoleRayner](https://github.com/NicoleRayner) and
194194
found [here](https://www.youtube.com/channel/UCC6iRpem2LkdozahaIphXTg/playlists).
195195
4) '_Video Tutorials on Google Drive_' features the same
196196
videos and
197197
found [here](https://drive.google.com/drive/folders/1PnGhJENKeN6lLJyruc8mGewiUp1DAeCX).
198-
5) '_Contribute an Issue on Github_'
198+
5) '_Contribute an Issue on GitHub_'
199199
is a shortcut to creating a new issue with key runtime environment metadata automatically supplied.
200200

201201
Thank you in advance for any suggestions you contribute. We are available for walk-throughs, etc. if needed to help

common.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ apply plugin: 'maven-publish'
77

88

99
String mavenGroupId = 'org.cirdles'
10-
String mavenVersion = '1.9.5'
10+
String mavenVersion = '1.9.6'
1111

1212
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
1313

@@ -37,7 +37,7 @@ dependencies {
3737
// https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl
3838
implementation group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.1'
3939

40-
testImplementation "junit:junit:4.13.1"
40+
testImplementation "junit:junit:4.13.2"
4141
testImplementation "org.assertj:assertj-core:3.18.1"
4242
}
4343

squidApp/pomX.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
<dependency>
9797
<groupId>junit</groupId>
9898
<artifactId>junit</artifactId>
99-
<version>4.12</version>
99+
<version>4.13.2</version>
100100
<scope>test</scope>
101101
</dependency>
102102
<dependency>

squidApp/src/main/java/org/cirdles/squid/gui/AboutSquidController.java

+4-7
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,16 @@
1717

1818
import javafx.event.ActionEvent;
1919
import javafx.fxml.FXML;
20-
import javafx.fxml.Initializable;
2120
import javafx.scene.control.Label;
2221
import org.cirdles.squid.Squid;
2322
import org.cirdles.squid.gui.utilities.BrowserControl;
2423

25-
import java.net.URL;
26-
import java.util.ResourceBundle;
27-
2824
/**
2925
* FXML Controller class for About Window
3026
*
3127
* @author James F. Bowring
3228
*/
33-
public class AboutSquidController implements Initializable {
29+
public class AboutSquidController {
3430

3531
@FXML
3632
private Label versionText;
@@ -49,8 +45,9 @@ public class AboutSquidController implements Initializable {
4945
* @param url
5046
* @param rb
5147
*/
52-
@Override
53-
public void initialize(URL url, ResourceBundle rb) {
48+
@FXML
49+
// This method is called by the FXMLLoader when initialization is complete
50+
void initialize() {
5451
versionText.setText("Squid3 v" + Squid.VERSION);
5552
buildDate.setText("Release Date: " + Squid.RELEASE_DATE);
5653
aboutDetailsLabel.setText(Squid.ABOUT_WINDOW_CONTENT.toString());

squidApp/src/main/java/org/cirdles/squid/gui/SquidUI.java

+1-7
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static void main(String[] args) {
117117
logo.append(" | \\____) || \\__/ | | \\_/ |, | || \\__/ | | \\____) |\n");
118118
logo.append(" \\______.' \\__.; | '.__.'_/[___]'.__.;__] \\______.'\n");
119119
logo.append(" |__] \n");
120-
System.out.println((logo));
120+
System.out.println(logo);
121121

122122
// detect if running from jar file
123123
if (!verbose && (ClassLoader.getSystemResource("org/cirdles/squid/gui/SquidUI.class").toExternalForm().startsWith("jar"))) {
@@ -137,12 +137,6 @@ public void write(int b) {
137137

138138
}
139139

140-
// System.out.println(System.getenv("CATALINA_HOME"));
141-
// Map<String, String> env = System.getenv();
142-
// for (String envName : env.keySet()) {
143-
// System.out.format("%s=%s%n", envName, env.get(envName));
144-
// }
145-
146140
launch(args);
147141
}
148142

squidCore/src/main/java/org/cirdles/squid/tasks/Task.java

+13-11
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import org.cirdles.squid.tasks.expressions.functions.WtdMeanACalc;
5454
import org.cirdles.squid.tasks.expressions.isotopes.ShrimpSpeciesNode;
5555
import org.cirdles.squid.tasks.expressions.operations.Operation;
56+
import org.cirdles.squid.tasks.expressions.operations.Value;
5657
import org.cirdles.squid.tasks.expressions.spots.SpotSummaryDetails;
5758
import org.cirdles.squid.tasks.expressions.variables.VariableNodeForPerSpotTaskExpressions;
5859
import org.cirdles.squid.tasks.expressions.variables.VariableNodeForSummary;
@@ -1430,18 +1431,19 @@ public void restoreRemovedExpressions() throws SquidException {
14301431
public ExpressionTreeInterface retrieveAliasedExpression(ExpressionTreeInterface expTree) {
14311432
// nov 2021 handle aliased expressions
14321433
ExpressionTreeInterface aliasedExpTree = expTree;
1433-
while (!((ExpressionTree) aliasedExpTree).getChildrenET().isEmpty()
1434-
&&
1435-
((((ExpressionTree) aliasedExpTree).getChildrenET().get(0) instanceof VariableNodeForPerSpotTaskExpressions)
1436-
||
1437-
((ExpressionTree) aliasedExpTree).getChildrenET().get(0).isSquidSwitchSCSummaryCalculation())) {
1434+
1435+
// test for alias and retrieve true expression
1436+
if (((ExpressionTree) aliasedExpTree).getChildrenET().size() == 1) {
14381437
ExpressionTreeInterface lookupExpTree = ((ExpressionTree) aliasedExpTree).getChildrenET().get(0);
1439-
if (((ExpressionTree) lookupExpTree).getUncertaintyDirective().isEmpty()
1440-
&& (((ExpressionTree) lookupExpTree).getIndex() == 0)
1441-
&& !((VariableNodeForSummary) lookupExpTree).isUsesArrayIndex()) {
1442-
aliasedExpTree = getExpressionByName(lookupExpTree.getName()).getExpressionTree();
1443-
} else {
1444-
break;
1438+
if (((lookupExpTree instanceof VariableNodeForPerSpotTaskExpressions)
1439+
||
1440+
lookupExpTree.isSquidSwitchSCSummaryCalculation())
1441+
&& (((ExpressionTree) aliasedExpTree).getOperation() instanceof Value)) {
1442+
if (((ExpressionTree) lookupExpTree).getUncertaintyDirective().isEmpty()
1443+
&& (((ExpressionTree) lookupExpTree).getIndex() == 0)
1444+
&& !((VariableNodeForSummary) lookupExpTree).isUsesArrayIndex()) {
1445+
aliasedExpTree = getExpressionByName(lookupExpTree.getName()).getExpressionTree();
1446+
}
14451447
}
14461448
}
14471449
return aliasedExpTree;
Binary file not shown.

0 commit comments

Comments
 (0)