Skip to content

Commit

Permalink
wip: Disallow empty folders and files from being imported
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobiClark committed Oct 1, 2024
1 parent ac3a7f8 commit 6da467d
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Build-and-deploy-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main
- staging
- pre-staging
- v-2019-pennsieve-agent-patch
- empty-folders-files-hotfix

jobs:
deploy-on-linux:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Build-and-deploy-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main
- staging
- pre-staging
- v-2019-pennsieve-agent-patch
- empty-folders-files-hotfix

jobs:
deploy-on-mac:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Build-and-deploy-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main
- staging
- pre-staging
- v-2019-pennsieve-agent-patch
- empty-folders-files-hotfix

jobs:
deploy-on-windows:
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": "15.2.4-beta",
"version": "15.2.7-beta",
"description": "Keep Calm and Curate",
"main": "./out/main/index.js",
"author": "SODA Team",
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 @@ -9,6 +9,6 @@ def get_api_version():



return {'version': os.getenv('API_VERSION', "15.2.4-beta")}
return {'version': os.getenv('API_VERSION', "15.2.7-beta")}


11 changes: 7 additions & 4 deletions src/renderer/src/scripts/organize-dataset/curate-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,15 +502,18 @@ window.uploadDatasetClickHandler = async (ev) => {
};

window.handleLocalDatasetImport = async (path) => {
console.log("Importing local dataset from path:", path);
const list = await getFilesAndFolders(path);
console.log("List of files and folders:", list);
const currentFileExplorerPath = window.organizeDSglobalPath.value.trim();
const buildDatasetStructure = await window.buildDatasetStructureJsonFromImportedData(
console.log("Current file explorer path:", currentFileExplorerPath);
const builtDatasetStructure = await window.buildDatasetStructureJsonFromImportedData(
list.folders,
currentFileExplorerPath,
"dataset_root/", // Use dataset_root as the root folder since we are importing the root in this case
true
);

window.sodaJSONObj["dataset-structure"] = buildDatasetStructure[0];
window.sodaJSONObj["dataset-structure"] = builtDatasetStructure[0];
window.sodaJSONObj["metadata-files"] = list.files;
const forbiddenFileNames = [];
const problematicFiles = [];
Expand Down Expand Up @@ -604,7 +607,7 @@ window.handleLocalDatasetImport = async (path) => {
window.sodaJSONObj = await window.addManifestDetailsToDatasetStructure(
window.sodaJSONObj,
list.manifestFiles,
buildDatasetStructure
builtDatasetStructure
);

return true;
Expand Down
Loading

0 comments on commit 6da467d

Please sign in to comment.