Skip to content

Commit

Permalink
Merge branch 'release_24.1' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Jun 13, 2024
2 parents 1dcb564 + ab533b6 commit 77dbd47
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 83 deletions.
9 changes: 2 additions & 7 deletions client/src/components/DatasetInformation/DatasetDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const userStore = useUserStore();
const { currentUser } = storeToRefs(userStore);
const loading = ref(false);
const jobLoading = ref(true);
const jobTimeOut = ref<any>(null);
const jobDetails = ref<JobDetails>();
const dataset = ref<HDADetailed | null>(null);
Expand All @@ -57,8 +56,6 @@ async function getDatasetDetails() {
}
async function loadJobDetails() {
jobLoading.value = true;
try {
const { data } = await fetchJobDetails({ job_id: dataset.value?.creating_job as string, full: true });
Expand All @@ -73,8 +70,6 @@ async function loadJobDetails() {
const error = e as AxiosError<{ err_msg?: string }>;
jobLoadingError.value = error.response?.data?.err_msg || "Unable to fetch available dataset details.";
} finally {
jobLoading.value = false;
}
}
Expand Down Expand Up @@ -102,7 +97,7 @@ onUnmounted(() => {
{{ datasetLoadingError }}
</BAlert>
<div v-else-if="dataset">
<div v-if="dataset.creating_job && !jobLoading" class="details">
<div v-if="dataset.creating_job" class="details">
<DatasetInformation :dataset="dataset" />

<JobParameters dataset_type="hda" :dataset-id="datasetId" />
Expand All @@ -124,7 +119,7 @@ onUnmounted(() => {

<JobDestinationParams v-if="currentUser?.is_admin" :job-id="dataset.creating_job" />
<JobDependencies v-if="jobDetails.dependencies" :dependencies="jobDetails.dependencies" />
<JobDependencies v-if="jobDetails?.dependencies" :dependencies="jobDetails.dependencies" />
<div v-if="dataset.peek">
<h2 class="h-md">Dataset Peek</h2>
Expand Down
24 changes: 12 additions & 12 deletions client/src/components/FilesDialog/FilesDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@ function load(record?: SelectionItem) {
}
if (shouldUseItemsProvider()) {
itemsProvider.value = provideItems;
itemsProvider.value = (ctx) => provideItems(ctx, currentDirectory.value?.url);
optionsShow.value = true;
showTime.value = true;
showDetails.value = false;
return;
}
browseRemoteFiles(currentDirectory.value?.url, false, props.requireWritable)
Expand All @@ -295,31 +299,27 @@ function load(record?: SelectionItem) {
* If it does, we will use the items provider to fetch items.
*/
function shouldUseItemsProvider(): boolean {
const fileSource = filesSources.getFileSourceById(currentDirectory.value?.id!);
if (!currentDirectory.value) {
return false;
}
const fileSource = filesSources.getFileSourceByUri(currentDirectory.value.url);
const supportsPagination = fileSource?.supports?.pagination;
return Boolean(supportsPagination);
}
/**
* Fetches items from the server using server-side pagination and filtering.
**/
async function provideItems(ctx: ItemsProviderContext): Promise<SelectionItem[]> {
async function provideItems(ctx: ItemsProviderContext, url?: string): Promise<SelectionItem[]> {
isBusy.value = true;
try {
if (!currentDirectory.value) {
if (!url) {
return [];
}
const limit = ctx.perPage;
const offset = (ctx.currentPage - 1) * ctx.perPage;
const query = ctx.filter;
const response = await browseRemoteFiles(
currentDirectory.value?.url,
false,
props.requireWritable,
limit,
offset,
query
);
const response = await browseRemoteFiles(url, false, props.requireWritable, limit, offset, query);
const result = response.entries.map(entryToRecord);
totalItems.value = response.totalMatches;
items.value = result;
Expand Down
25 changes: 20 additions & 5 deletions client/src/components/Workflow/Editor/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
@onUpgrade="onUpgrade" />
</div>
</div>
<div ref="right-panel" class="unified-panel-body workflow-right p-2">
<div ref="rightPanelElement" class="unified-panel-body workflow-right p-2">
<div v-if="!initialLoading">
<FormTool
v-if="hasActiveNodeTool"
Expand Down Expand Up @@ -184,7 +184,7 @@ import { useMagicKeys, whenever } from "@vueuse/core";
import { logicAnd, logicNot, logicOr } from "@vueuse/math";
import { Toast } from "composables/toast";
import { storeToRefs } from "pinia";
import Vue, { computed, nextTick, onUnmounted, ref, unref } from "vue";
import Vue, { computed, nextTick, onUnmounted, ref, unref, watch } from "vue";
import { getUntypedWorkflowParameters } from "@/components/Workflow/Editor/modules/parameters";
import { ConfirmDialog } from "@/composables/confirmDialog";
Expand Down Expand Up @@ -366,6 +366,22 @@ export default {
setTagsHandler.set(tags.value, newTags);
}
watch(
() => stateStore.activeNodeId,
() => {
scrollToTop();
}
);
const rightPanelElement = ref(null);
function scrollToTop() {
rightPanelElement.value?.scrollTo({
top: 0,
behavior: "instant",
});
}
const { comments } = storeToRefs(commentStore);
const { getStepIndex, steps } = storeToRefs(stepStore);
const { activeNodeId } = storeToRefs(stateStore);
Expand Down Expand Up @@ -427,6 +443,8 @@ export default {
setAnnotation,
tags,
setTags,
rightPanelElement,
scrollToTop,
connectionStore,
hasChanges,
hasInvalidConnections,
Expand Down Expand Up @@ -914,9 +932,6 @@ export default {
this.setCreator(creator);
}
},
onActiveNode(nodeId) {
this.$refs["right-panel"].scrollTop = 0;
},
onInsertedStateMessages(insertedStateMessages) {
this.insertedStateMessages = insertedStateMessages;
this.hideModal();
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/config/sample/object_store_conf.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ auth:
# an access token suitable for data access (allowing calls to the Oneprovider REST API).
access_token: ...
connection:
# the domain of the Onezone service (e.g. "demo.onedata.org"), or its IP address for
# the domain of the Onezone service (e.g. datahub.egi.eu), or its IP address for
# devel instances (see above).
onezone_domain: demo.onedata.org
onezone_domain: datahub.egi.eu
# Allows connection to Onedata servers that do not present trusted SSL certificates.
# SHOULD NOT be used unless you really know what you are doing.
disable_tls_certificate_validation: false
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/config/sample/object_store_conf.xml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
an access token suitable for data access (allowing calls to the Oneprovider REST API).
//connection/@onezone_domain -
the domain of the Onezone service (e.g. "demo.onedata.org"), or its IP address for
the domain of the Onezone service (e.g. datahub.egi.eu), or its IP address for
devel instances (see above).
//connection/@disable_tls_certificate_validation -
Expand All @@ -182,7 +182,7 @@
<!--
<object_store type="onedata">
<auth access_token="..." />
<connection onezone_domain="demo.onedata.org" disable_tls_certificate_validation="False"/>
<connection onezone_domain="datahub.egi.eu" disable_tls_certificate_validation="False"/>
<space name="demo-space" path="galaxy-data" />
<cache path="database/object_store_cache" size="1000" cache_updated_data="True" />
<extra_dir type="job_work" path="database/job_working_directory_onedata"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ preferences:
description: Your Onedata account
inputs:
- name: onezone_domain
label: Domain of the Onezone service (e.g. "demo.onedata.org")
label: Domain of the Onezone service (e.g. datahub.egi.eu)
type: text
required: False
- name: access_token
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/dependencies/conditional-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fs.googledrivefs # type: googledrive
fs-gcsfs # type: googlecloudstorage
# fs-gcsfs doesn't pin google-cloud-storage, and old versions log noisy exceptions and break test discovery
google-cloud-storage>=2.8.0 # type: googlecloudstorage
fs.onedatarestfs # type: onedata, depends on onedatafilerestclient
fs.onedatarestfs==21.2.5.1 # type: onedata, depends on onedatafilerestclient
fs-basespace # type: basespace
fs-azureblob # type: azure

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/dependencies/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ myst-parser==3.0.1 ; python_version >= "3.8" and python_version < "3.13"
nh3==0.2.17 ; python_version >= "3.8" and python_version < "3.13"
numpy==1.24.4 ; python_version >= "3.8" and python_version < "3.9"
numpy==1.26.4 ; python_version >= "3.9" and python_version < "3.13"
onedatafilerestclient==21.2.5rc1 ; python_version >= "3.8" and python_version < "3.13"
onedatafilerestclient==21.2.5.1 ; python_version >= "3.8" and python_version < "3.13"
outcome==1.3.0.post0 ; python_version >= "3.8" and python_version < "3.13"
packaging==24.0 ; python_version >= "3.8" and python_version < "3.13"
pathspec==0.12.1 ; python_version >= "3.8" and python_version < "3.13"
Expand Down
17 changes: 1 addition & 16 deletions lib/galaxy/files/sources/_pyfilesystem2.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,7 @@ def _list(
raise MessageException(f"Problem listing file source path {path}. Reason: {e}") from e

def _get_total_matches_count(self, fs: FS, path: str, filter: Optional[List[str]] = None) -> int:
# For some reason, using "*" as glob does not return all files and directories, only files.
# So we need to count files and directories "*/" separately.
# Also, some filesystems do not properly support directories count (like Google Cloud Storage),
# so we need to catch TypeError exceptions and fallback to 0.
files_glob_pattern = f"{path}/{filter[0] if filter else '*'}"
try:
files_count = fs.glob(files_glob_pattern).count().files
except TypeError:
files_count = 0

directory_glob_pattern = f"{files_glob_pattern}/"
try:
directories_count = fs.glob(directory_glob_pattern).count().directories
except TypeError:
directories_count = 0
return files_count + directories_count
return sum(1 for _ in fs.filterdir(path, namespaces=["basic"], files=filter, dirs=filter))

def _to_page(self, limit: Optional[int] = None, offset: Optional[int] = None) -> Optional[Tuple[int, int]]:
if limit is None and offset is None:
Expand Down
Loading

0 comments on commit 77dbd47

Please sign in to comment.