diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4c73f39506..358d03cd22 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -107,13 +107,17 @@ jobs: # - we push the cache (cache_to) after development builds of the # main branch only # - we never use the cache on production builds + # + # The image is exported in the OCI format ('image-manifest=true') + # to avoid a "failed to solve: not found" error when pushing to the + # github container registry. enable_cache_from = not env['PRODUCTION'] and not env['NO_CACHE'] enable_cache_to = not env['PRODUCTION'] and ( main_branch_sha == env['IMAGE_TAG'] == env['SHA']) print(f"{enable_cache_from = }\n{enable_cache_to = }\n") def cache_arg(enabled: bool, image: str, extra=""): - return [f"type=registry,ref={env['DOCKER_REPOSITORY']}/{image}:cache{extra}" + return [f"type=registry,image-manifest=true,ref={env['DOCKER_REPOSITORY']}/{image}:cache{extra}" ] if enabled else [] # extract the list of images to be built from the docker-compose config diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 0000000000..f10babc9b4 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,57 @@ +In alphabetic order: + +Alexandre Abadie, Anthony Baire, Elise Bannier, Emmanuel Barbier, Christian Barillot, Marjolaine Bodin, Olivier Commowick, Isabelle Corouge, Yao Chi, Pierre-Henri Dauvergne, Jean-Côme Douteau, Michel Dojat, Quentin Duché, Alae Es-Saki, Inès Fakhfakh, Adrien Férial, Bernard Gibaud, Justine Guillaumont, Malo Gaubert, Wefa Hakem, Guewen Hubert, Michael Kain, Khalil Kessa, Romain Lahaxe, Julien Lamy, Julien Louis, Simon Loury, Camille Maumet, Arthur Masson, Youenn Merel, Olivier Montignon, Aneta Morawin, Farid Ouhmich, Alexandre Pron, Guillaume Renard, Mathieu Simon, Arnaud Touboulic, Laurent Vallet, Nicolas Wiest Daessle. + +Inclusion of authors of research articles dealing with Shanoir [[1], [2]](https://www.zotero.org/google-docs/?Uc9jGd), [Inria BIL ](https://team.inria.fr/bilv2/fr/software/) (shanoir, shanoir-ng, qtshanoir, shanoirtk, shanoir-uploader, shanoir-uploader-ofsep) as well as all contributors to the Github code repositories shanoir-ng, shanoir-downloader, shanoir-deploy on January 7 th 2025, sorted by surname in alphabetical order. + +[1] C. Barillot et al., “Shanoir: Applying the Software as a Service Distribution Model to Manage Brain Imaging Research Repositories,” Front. ICT, vol. 3, Dec. 2016, doi: 10.3389/fict.2016.00025. + +[2] M. Kain et al., “Small Animal Shanoir (SAS) A Cloud-Based Solution for Managing Preclinical MR Brain Imaging Studies,” Front. Neuroinformatics, vol. 14, p. 20, May 2020, doi: 10.3389/fninf.2020.00020. + +Contributions detailed following [https://allcontributors.org/docs/en/emoji-key](https://allcontributors.org/docs/en/emoji-key) +All possible contributions ordered: + +🔊 ♿️ 🐛 📝 💼 💻 🖋 🔣 📖 🎨 💡 📋 💵 🔍 🤔 🚇 🚧 🧑‍🏫 📦 🔌 📆 📣 💬 🔬 👀 🛡️ 🔧 🌍 ⚠️ ✅ 📢 📓 📹 + +|Contributor | Contribution(s) | +|----------------------|----------------------------------------------------------------------------------------------------- | +|Alexandre Abadie | | +|Anthony Baire | ♿️ 🐛 💻 📖 🤔 🚇 🚧 🧑‍🏫 📦 🔌 💬 👀 🛡️ 🔧 ⚠️ ✅ | +|Elise Bannier | ♿️ 🐛 🖋 🔣 📖 💵 🔍 🤔 📆 📣 🔧 ✅ 📓 | +|Emmanuel Barbier | | +|Christian Barillot | | +|Marjolaine Bodin | | +|Olivier Commowick | | +|Isabelle Corouge | | +|Yao Chi | | +|Pierre-Henri Dauvergne| ♿️ 🐛 💻 📖 📋 🚧 🧑‍🏫 🔌 💬 👀 ⚠️ ✅ 📓 | +|Jean Côme Douteau | ♿️ 🐛 📝 💻 🖋 📖 📋 🤔 🚇 🚧 🧑‍🏫 📦 🔌 📣 💬 👀 🛡️ 🔧 ⚠️ ✅ 📢 📓 | +|Michel Dojat | | +|Quentin Duché | 🐛 💻 📖 💡 🤔 🧑‍🏫 👀 🔧 📢 📓 | +|Alae Es-Saki | | +|Inès Fakhfakh | | +|Adrien Férial | | +|Bernard Gibaud | | +|Justine Guillaumont | | +|Malo Gaubert | 🐛 💻 📖 💡 🤔 🧑‍🏫 👀 🔧 📢 📓 | +|Wefa Hakem | | +|Guewen Hubert | ♿️ 🐛 💻 📖 📋 🚧 🧑‍🏫 🔌 💬 👀 ⚠️ ✅ 📓 | +|Michael Kain | ♿️ 🐛 📝 💻 🖋 🔣 📖 🎨 💡 📋 🔍 🤔 🚇 🚧 🧑‍🏫 📦 🔌 📆 📣 💬 🔬 👀 🛡️ 🔧 ⚠️ ✅ 📢 📓 | +|Khalil Kessa | | +|Romain Lahaxe | | +|Julien Lamy | | +|Julien Louis | ♿️ 🐛 💻 🖋 📖 🎨 💡 📋 🤔 🚇 🚧 🧑‍🏫 📦 💬 👀 🛡️ 🔧 ⚠️ ✅ 📢 📓 | +|Simon Loury | | +|Camille Maumet | ♿️ 🐛 🖋 🔣 📖 📋 🤔 🔌 📆 📣 💬 👀 🛡️ 🔧 📢 📓 | +|Arthur Masson | | +|Youenn Merel | ♿️ 🐛 💻 🖋 📖 💡 📋 🤔 🚇 🚧 🧑‍🏫 📦 🔌 💬 👀 🛡️ 🔧 ⚠️ ✅ 📢 📓 📹 | +|Olivier Montignon | | +|Aneta Morawin | | +|Farid Ouhmich | | +|Alexandre Pron | ♿️ 🐛 💻 📖 🔌 ⚠️ ✅ 📓 | +|Guillaume Renard | | +|Mathieu Simon | | +|Arnaud Touboulic | | +|Laurent Vallet | ♿️ 🐛 💻 🖋 📖 💡 📋 🤔 🚧 🧑‍🏫 📦 🔌 💬 👀 🔧 ⚠️ 📓| +|Nicolas Wiest Daessle | | + diff --git a/FUNDINGS.md b/FUNDINGS.md new file mode 100644 index 0000000000..d0cd625868 --- /dev/null +++ b/FUNDINGS.md @@ -0,0 +1,8 @@ +# Fundings + +This page lists the funding that has contributed to the development of Shanoir and its software ecosystem. +| Funding | +|: ----------------------------------------------------:| +| _Technological development program_ of Inria | +| Brittany region council | +| _Investments for the Future program_: ANR-11-INBS-006 | diff --git a/shanoir-ng-back/pom.xml b/shanoir-ng-back/pom.xml index 2966734662..bc5ae4fd23 100644 --- a/shanoir-ng-back/pom.xml +++ b/shanoir-ng-back/pom.xml @@ -21,7 +21,7 @@ along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html org.springframework.boot spring-boot-starter-parent - 3.2.2 + 3.4.0 diff --git a/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/service/EegImporterService.java b/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/service/EegImporterService.java index de03339894..10e43d057e 100644 --- a/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/service/EegImporterService.java +++ b/shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/service/EegImporterService.java @@ -33,6 +33,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Objects; @Service public class EegImporterService { @@ -67,7 +68,12 @@ public class EegImporterService { public void createEegDataset(final EegImportJob importJob) throws IOException { Long userId = KeycloakUtil.getTokenUserId(); - ShanoirEvent event = new ShanoirEvent(ShanoirEventType.IMPORT_DATASET_EVENT, importJob.getExaminationId().toString(), userId, "Starting import...", ShanoirEvent.IN_PROGRESS, 0f, importJob.getStudyId()); + ShanoirEvent event; + if(Objects.isNull(importJob.getShanoirEvent())){ + event = new ShanoirEvent(ShanoirEventType.IMPORT_DATASET_EVENT, importJob.getExaminationId().toString(), userId, "Starting import...", ShanoirEvent.IN_PROGRESS, 0f, importJob.getStudyId()); + } else { + event = importJob.getShanoirEvent(); + } eventService.publishEvent(event); if (importJob == null || importJob.getDatasets() == null || importJob.getDatasets().isEmpty()) { diff --git a/shanoir-ng-datasets/src/main/java/org/shanoir/ng/solr/service/SolrServiceImpl.java b/shanoir-ng-datasets/src/main/java/org/shanoir/ng/solr/service/SolrServiceImpl.java index 96cf8a2a0f..9928f09e27 100644 --- a/shanoir-ng-datasets/src/main/java/org/shanoir/ng/solr/service/SolrServiceImpl.java +++ b/shanoir-ng-datasets/src/main/java/org/shanoir/ng/solr/service/SolrServiceImpl.java @@ -95,16 +95,6 @@ public class SolrServiceImpl implements SolrService { @Autowired private ShanoirEventService eventService; - //This attribute is a bean of the class itself. - //Its goal is to avoid transactional self-invocation issue, - //which appears when a transactional method calls another transactional method, - //and both are defined in the same class. - //When the issue occurs, Spring might have difficulties to manage the transactions, - //which is not the case anymore when methods are called with various beans of the class. - @Lazy - @Autowired - private SolrServiceImpl solrServiceImpl; - private static final Logger LOG = LoggerFactory.getLogger(SolrServiceImpl.class); public void addToIndex (final ShanoirSolrDocument document) throws SolrServerException, IOException { @@ -130,16 +120,18 @@ public void deleteAll() throws SolrServerException, IOException { @Override @Async + @Transactional + public void indexAll() { List documents = new ArrayList<>(); Map> tags = new HashMap<>(); ShanoirEvent event; try { - event = solrServiceImpl.beginIndexationProcess(); - solrServiceImpl.cleanOldIndex(event); - solrServiceImpl.fetchDatasToIndex(event, documents, tags); - solrServiceImpl.indexDatas(event, documents, tags); + event = beginIndexationProcess(); + cleanOldIndex(event); + fetchDatasToIndex(event, documents, tags); + indexDatas(event, documents, tags); } catch (SolrServerException | IOException ignored) { } } @@ -151,7 +143,7 @@ protected void indexDatas(ShanoirEvent event, List documents, M for (List partition : ListUtils.partition(documents, 100000)) { indexedData += partition.size(); event.setProgress((float) Math.floor(30F + ((indexedData / (float) totalData) * 70F)) / 100F); - solrServiceImpl.indexDataPartition(event, partition, tags, indexedData); + indexDataPartition(event, partition, tags, indexedData); } } catch (Exception e) { LOG.error("Error indexing datasets into Solr.", e); @@ -159,7 +151,6 @@ protected void indexDatas(ShanoirEvent event, List documents, M } } - @Transactional protected void indexDataPartition(ShanoirEvent event, List documents, Map> tags, int indexedSize) throws SolrServerException, IOException { indexDocumentsInSolr(documents, tags); if(Objects.equals(1f, event.getProgress())){ @@ -169,7 +160,6 @@ protected void indexDataPartition(ShanoirEvent event, List docu } } - @Transactional protected void fetchDatasToIndex(ShanoirEvent event, List documents, Map> tags) { try { documents.addAll(shanoirMetadataRepository.findAllAsSolrDoc()); @@ -183,7 +173,6 @@ protected void fetchDatasToIndex(ShanoirEvent event, List docum } } - @Transactional protected void cleanOldIndex(ShanoirEvent event) throws SolrServerException, IOException { try { deleteAll(); diff --git a/shanoir-ng-front/src/app/import/clinical-context/clinical-context.component.css b/shanoir-ng-front/src/app/import/clinical-context/clinical-context.component.css index 58b0506ca6..e66434fdd0 100644 --- a/shanoir-ng-front/src/app/import/clinical-context/clinical-context.component.css +++ b/shanoir-ng-front/src/app/import/clinical-context/clinical-context.component.css @@ -20,4 +20,12 @@ a { text-decoration: underline; } .ct-warn i { color: orangered; } .global-loading { color: var(--color-b); } -.global-loading i { font-size: 30px; color: var(--color-b-light2); } \ No newline at end of file +.global-loading i { font-size: 30px; color: var(--color-b-light2); } + +.new-subject { margin-left: 20px !important; } +.new-subject:active, +.new-subject:enabled:hover { cursor: pointer; } +.secondary { font-size: 8px; margin-right: 7px; margin-left: 2px; } + +.subject-select { width: 185px; } +.examination-select { width: 154px; } \ No newline at end of file diff --git a/shanoir-ng-front/src/app/import/clinical-context/clinical-context.component.html b/shanoir-ng-front/src/app/import/clinical-context/clinical-context.component.html index 96cf7a489d..f5c908ccee 100644 --- a/shanoir-ng-front/src/app/import/clinical-context/clinical-context.component.html +++ b/shanoir-ng-front/src/app/import/clinical-context/clinical-context.component.html @@ -143,14 +143,18 @@
  • - +
  • @@ -209,10 +213,16 @@
  • - + +
  • diff --git a/shanoir-ng-front/src/app/shared/mass-download/download-setup-alt/download-setup-alt.component.css b/shanoir-ng-front/src/app/shared/mass-download/download-setup-alt/download-setup-alt.component.css index 2df0cac129..92f55caeec 100644 --- a/shanoir-ng-front/src/app/shared/mass-download/download-setup-alt/download-setup-alt.component.css +++ b/shanoir-ng-front/src/app/shared/mass-download/download-setup-alt/download-setup-alt.component.css @@ -9,4 +9,6 @@ input[type="number"] { width: 52px; } .msg { max-width: 600px; color: blue; line-height: 20px; text-align: left; background-color: lightsteelblue; padding: 10px 20px; border-radius: 2px; } .msg i { font-size: 20px; color: blue; opacity: 0.5; } -.msg a { cursor: pointer; } \ No newline at end of file +.msg a { cursor: pointer; } + +.loading { margin-top: 15px; } \ No newline at end of file diff --git a/shanoir-ng-front/src/app/shared/mass-download/download-setup-alt/download-setup-alt.component.html b/shanoir-ng-front/src/app/shared/mass-download/download-setup-alt/download-setup-alt.component.html index 0782bcd0cc..0cda96dc97 100644 --- a/shanoir-ng-front/src/app/shared/mass-download/download-setup-alt/download-setup-alt.component.html +++ b/shanoir-ng-front/src/app/shared/mass-download/download-setup-alt/download-setup-alt.component.html @@ -21,10 +21,10 @@

    Download Datasets

    See the list of compatible browsers : https://developer.mozilla.org/en-US/docs/Web/API/Window/showDirectoryPicker#browser_compatibility -
    +
    Retrieving download informations...
    -
      +
      1. @@ -40,7 +40,7 @@

        Download Datasets