Skip to content

Commit

Permalink
feat: Create v13.1.3 release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobiClark committed Feb 29, 2024
2 parents 9e76162 + 4c5a7de commit 08ab5dd
Show file tree
Hide file tree
Showing 22 changed files with 6,732 additions and 785 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to SODA will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## v13.1.3 - 2024-02-29

## Feature Addditions:

- Announcements have been redesigned to convey updates and fixes clearly.
- Added the ability to generate a copy of a dataset's manifest files locally within the organize datasets feature.
- Updated the UI for GM/FFM subject metadata Species, Strain, and RRID selection, and changed the API endpoint to use SciCrunch's public API to search for RRIDs.

## Bug fixes:

- Fixed an issue in the `Organize datasets` feature when creating a new Pennsieve dataset that prevented SODA from finding the dataset in some cases.
- Banner image selection popup has been patched to overlay above entire app.

## v.13.1.2 - 2024-02-15

## Bug fixes:
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "soda-for-sparc",
"procductName": "SODA for SPARC",
"version": "13.1.2",
"version": "13.1.3",
"description": "Keep Calm and Curate",
"main": "./out/main/index.js",
"author": "SODA Team",
Expand Down
9 changes: 9 additions & 0 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ ipcMain.on("orcid", (event, url) => {
});
});

ipcMain.handle("open-folder-path-select", (event, pathSelectDialogText) => {
const path = dialog.showOpenDialogSync(mainWindow, {
properties: ["openDirectory"],
title: pathSelectDialogText,
});
let returnPath = path[0] ? path[0] : null;
return returnPath;
});

// passing in the spreadsheet data to pass to a modal
// that will have a jspreadsheet for user edits
ipcMain.handle("spreadsheet", (event, spreadsheet) => {
Expand Down
3 changes: 3 additions & 0 deletions src/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ ipcMain.on("restart_app", async () => {
log.info("quitAndInstall");
autoUpdater.quitAndInstall();
});

// passing in the spreadsheet data to pass to a modal
// that will have a jspreadsheet for user edits
ipcMain.handle("spreadsheet", (event, spreadsheet) => {
Expand Down Expand Up @@ -518,6 +519,8 @@ ipcMain.handle("spreadsheet", (event, spreadsheet) => {
}
});
});

ipcMain.handle("");
const wait = async (delay) => {
return new Promise((resolve) => setTimeout(resolve, delay));
};
Expand Down
39 changes: 9 additions & 30 deletions src/main/strain.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,12 @@
import https from "https";
import { ipcMain } from "electron";

ipcMain.handle("getStrainData", async (event, rridInfo) => {
let data = await new Promise((resolve, reject) => {
https.get(rridInfo, async (res) => {
let data = "";
let dataReady = false;
if (res.statusCode === 200) {
res.setEncoding("utf8");
res.on("data", (d) => {
data += d;
});
res.on("end", () => {
dataReady = true;
});

while (!dataReady) {
// wait for 1 second
await new Promise((r) => setTimeout(r, 1000));
}

resolve(data);
} else {
reject("Could not load strain");
}
});
import axios from "axios";

ipcMain.handle("getStrainData", async (event, rrid) => {
let organismResponse = await axios.get(`https://scicrunch.org/resolver/${rrid}.json`, {
headers: {
"Content-Type": "application/json",
apiKey: "2YOfdcQRDVN6QZ1V6x3ZuIAsuypusxHD",
},
});

// let xmlSerializer = new XMLSerializer();
// let serialized = xmlSerializer.serializeToString(data)
return data;
return organismResponse.data;
});
21 changes: 17 additions & 4 deletions src/pyflask/curate/curate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3201,10 +3201,23 @@ def main_curate_function(soda_json_structure):
selected_dataset_id = ds["content"]["id"]


# whether we are generating a new dataset or merging, we want the dataset information for later steps
r = requests.get(f"{PENNSIEVE_URL}/datasets/{selected_dataset_id}", headers=create_request_headers(get_access_token()))
r.raise_for_status()
myds = r.json()
# check that dataset was created with a limited retry (for some users the dataset isn't automatically accessible)
attempts = 0
while(attempts < 3):
try:
# whether we are generating a new dataset or merging, we want the dataset information for later steps
r = requests.get(f"{PENNSIEVE_URL}/datasets/{selected_dataset_id}", headers=create_request_headers(get_access_token()))
r.raise_for_status()
myds = r.json()
break
except Exception as e:
attempts += 1
# check if final attempt
if attempts >= 2:
# raise the error to the user
raise e
time.sleep(10)


ps_upload_to_dataset(soda_json_structure, ps, myds)
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion src/pyflask/startup/minimumApiVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ def get_api_version():
"""
Returns the version of the API
"""
return {'version': os.getenv('API_VERSION', "13.1.2")}
return {'version': os.getenv('API_VERSION', "13.1.3")}
3 changes: 2 additions & 1 deletion src/renderer/src/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ button[data-id="bf_list_roles_team"] {
button[data-id="guided-select-pennsieve-dataset-to-resume"],
button[data-id="bf_list_users_pi"],
button[data-id="guided_bf_list_users_pi"],
button[data-id="guided_bf_list_users_and_teams"] {
button[data-id="guided_bf_list_users_and_teams"],
button[data-id="common-strain-rrid-dropdown"] {
border: 1px solid rgba(34, 36, 38, 0.15);
border-radius: 7px;
height: 35px;
Expand Down
Loading

0 comments on commit 08ab5dd

Please sign in to comment.