Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
df0b32e
- added support for downloading data from waters_connect with a URL l…
chambm Sep 25, 2024
9894f5e
Merge branch 'master' into Skyline/work/20240918_Waters_Connect
chambm Dec 12, 2024
6fe5164
* restored OpenDataSourceDialog changes after merge
chambm Dec 12, 2024
637a82b
WC: Export Method: Select Template on WC Mostly done
danjasuw Jan 15, 2025
38cf598
Add
danjasuw Jan 15, 2025
4d98290
latest updates
danjasuw Mar 2, 2025
ad79d70
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen Mar 6, 2025
ab142a0
Intermediate commit to merge from master. Save dialog is working.
rita-gwen Apr 17, 2025
5daf3f9
Missed a file in the last commit
rita-gwen Apr 17, 2025
34a4c63
Merge from master. ProteoWiz does not build.
rita-gwen Apr 17, 2025
c844149
Missed from the last commit
rita-gwen Apr 17, 2025
cbc0aab
- added support for downloading data from waters_connect with a URL l…
chambm Sep 25, 2024
6547203
EditRemoteAccountDlg: set wizard pages tab when user selects Waters C…
danjasuw Jan 17, 2025
a27eeea
* added global cache for sample metadata so multiple injections for t…
chambm Apr 10, 2025
4050fd3
* moved RemoteApi, MsDataFilePath, DataSourceUtil, and SampleHelp to …
chambm Apr 16, 2025
f30adc8
* switched to IHttpClientFactory to create HttpClients for UNIFI and …
chambm Apr 30, 2025
ab3b9be
* fixed CommonMsData RuntimeIdentifiers
chambm Apr 30, 2025
9d8e3ad
* attempt to fix a couple build issues
chambm May 1, 2025
2445ab8
Multiple TODO items:
rita-gwen May 8, 2025
d41ca76
Save the template URL into settings
rita-gwen May 12, 2025
4ab75e8
Mock HTTP testing framework added.
rita-gwen May 19, 2025
d9ab192
Added DsvStreamReader class
rita-gwen May 19, 2025
ba363fc
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen May 19, 2025
0a3424c
Show tooltip for the WC template file textbox
rita-gwen May 19, 2025
73cf8f2
Merge branch 'Skyline/work/20240918_Waters_Connect_ExportMethod' of h…
rita-gwen May 19, 2025
42a11a1
Merge from initial WC branch
rita-gwen May 20, 2025
2c6288f
MockHttpHandler added.
rita-gwen Jun 6, 2025
d5edaa8
Multiple changes:
rita-gwen Jun 11, 2025
8b14052
Refactoring of the WatersConnect file dialogs.
rita-gwen Jun 18, 2025
3555d72
Caching the authentication token and method upload mock added.
rita-gwen Jun 18, 2025
f932ca2
Mock testing disabled
rita-gwen Jun 19, 2025
208ea88
Fix for the negative RT and AutoDwell property is set to true.
rita-gwen Jun 23, 2025
e4687a5
Big merge from master
rita-gwen Jun 25, 2025
703e20f
Fix for the test problem on GitHub
rita-gwen Jun 25, 2025
43b1590
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen Jul 9, 2025
3bd646e
- added mock handler for the authentication request
rita-gwen Jul 11, 2025
c704cb2
Merge branch 'Skyline/work/20240918_Waters_Connect_ExportMethod' of h…
rita-gwen Jul 15, 2025
c745493
- Updated image resources
rita-gwen Jul 15, 2025
3a54b83
Code inspection fixed
rita-gwen Jul 15, 2025
26c1a40
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen Jul 21, 2025
b10f1a0
Code inspection fixes
rita-gwen Aug 5, 2025
3963773
Merge branch 'Skyline/work/20240918_Waters_Connect_ExportMethod' of h…
rita-gwen Aug 5, 2025
51ea3ec
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen Aug 5, 2025
2b0d83b
- Let Waters Connect decide option added
rita-gwen Aug 11, 2025
a08c96c
Merge artifacts
rita-gwen Aug 12, 2025
b4c6ad8
Multiple changes:
rita-gwen Aug 12, 2025
e829803
Merge branch 'Skyline/work/20240918_Waters_Connect_ExportMethod' of h…
rita-gwen Aug 12, 2025
4d3d206
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen Aug 12, 2025
2f0bd62
Failing tests fix.
rita-gwen Aug 12, 2025
fd5e0e4
Code instpection fix.
rita-gwen Aug 12, 2025
5956b74
Remote account alias is added
rita-gwen Aug 25, 2025
0c90188
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen Aug 26, 2025
7f96e6a
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen Sep 2, 2025
f827598
Hiding local file system icons when the dialog is used with a remote …
rita-gwen Sep 2, 2025
7340e57
Merge branch 'Skyline/work/20240918_Waters_Connect_ExportMethod' of h…
rita-gwen Sep 2, 2025
e8e72f0
Add/Edit account item added. Fixed upOneLevel button behavior.
rita-gwen Sep 9, 2025
af41473
- missing multiple methods option fixed
rita-gwen Sep 16, 2025
dd5e940
Manual merge from master. Some conflicts with the earlier waters samp…
rita-gwen Sep 16, 2025
ca71ad9
Test failure fix
rita-gwen Sep 17, 2025
d9f1d82
Fixes for the missing folder ID and multiple quant transitions
rita-gwen Sep 17, 2025
5c21f9d
Multiple changes:
rita-gwen Sep 20, 2025
a22659b
Fix for JSON parsing error on empty folder
rita-gwen Sep 22, 2025
a0cd139
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen Sep 22, 2025
fd7c4f0
Multiple changes
rita-gwen Sep 25, 2025
06cc088
Merge branch 'Skyline/work/20240918_Waters_Connect_ExportMethod' of h…
rita-gwen Sep 29, 2025
97e9b6b
Fix for the spaces in the folder name
rita-gwen Sep 30, 2025
44c2593
Manual merge from master
rita-gwen Oct 1, 2025
1cceac6
Merge fix
rita-gwen Oct 1, 2025
2e23001
Fix null reference in the retention time parsing
rita-gwen Oct 1, 2025
f3dc595
Multiple changes:
rita-gwen Oct 2, 2025
5dcd678
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen Oct 2, 2025
7ce1c79
Set defaults for the WC account in the account edit dialog
rita-gwen Oct 2, 2025
1d7d2de
Fix for the file name conflict with multiple methods upload
rita-gwen Oct 3, 2025
e8cf63a
Merge branch 'Skyline/work/20240918_Waters_Connect_ExportMethod' of h…
rita-gwen Oct 3, 2025
9eb1bce
waters_connect radio button wording and code inspection failures.
rita-gwen Oct 3, 2025
8cbcb29
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen Oct 4, 2025
c0a2bc6
Merge branch 'master' into Skyline/work/20240918_Waters_Connect_Expor…
rita-gwen Oct 5, 2025
9ce4605
Account edit dialog formatting and default values fixes.
rita-gwen Oct 8, 2025
8b5c599
Merge branch 'Skyline/work/20240918_Waters_Connect_ExportMethod' of h…
rita-gwen Oct 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions pwiz_tools/Shared/CommonMsData/CommonMsData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@
<Reference Include="IdentityModel">
<HintPath>..\Lib\IdentityModel.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\pwiz_tools\Shared\Lib\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json">
<HintPath>..\Lib\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -119,6 +118,7 @@
<Compile Include="RemoteApi\Unifi\UnifiSession.cs" />
<Compile Include="RemoteApi\Unifi\UnifiUrl.cs" />
<Compile Include="RemoteApi\WatersConnect\WatersConnectAccount.cs" />
<Compile Include="RemoteApi\WatersConnect\WatersConnectAcquisitionMethodUrl.cs" />
<Compile Include="RemoteApi\WatersConnect\WatersConnectFileObject.cs" />
<Compile Include="RemoteApi\WatersConnect\WatersConnectFolderObject.cs" />
<Compile Include="RemoteApi\WatersConnect\WatersConnectObject.cs" />
Expand All @@ -128,19 +128,25 @@
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="RemoteApi\WatersConnect\WatersConnectSession.cs" />
<Compile Include="RemoteApi\WatersConnect\WatersConnectSessionAcquisitionMethod.cs" />
<Compile Include="RemoteApi\WatersConnect\WatersConnectUrl.cs" />
<Compile Include="CommonMsDataResources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>CommonMsDataResources.resx</DependentUpon>
</Compile>
<Compile Include="RemoteApi\WatersConnect\WatersConnectWatersConnectAcquisitionMethodObjectMethodObject.cs" />
<Compile Include="SampleHelp.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommonUtil\CommonUtil.csproj">
<Project>{13bf2ffb-50a1-4ab1-83a4-5733e36905ce}</Project>
<Name>CommonUtil</Name>
</ProjectReference>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{a5527be9-4a62-458f-ae47-f0f9204a5cf9}</Project>
<Name>Common</Name>
</ProjectReference>
<ProjectReference Include="..\ProteowizardWrapper\ProteowizardWrapper.csproj">
<Project>{dacee7d5-5a6a-4001-9602-fab1a9a2de59}</Project>
<Name>ProteowizardWrapper</Name>
Expand Down
9 changes: 8 additions & 1 deletion pwiz_tools/Shared/CommonMsData/DataSourceUtil.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Original author: Vagisha Sharma <vsharma .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
Expand Down Expand Up @@ -63,6 +63,8 @@ public static class DataSourceUtil
public const string FOLDER_TYPE = "File Folder";
public const string SAMPLE_SET_TYPE = "Sample Set";
public const string UNKNOWN_TYPE = "unknown";
public const string EDIT_ACCOUNT = "edit account";
public const string TYPE_WATERS_ACQUISITION_METHOD = "Waters Acquisition Method";
// ReSharper restore LocalizableElement

public static bool IsDataSource(string path)
Expand Down Expand Up @@ -183,6 +185,11 @@ public static bool IsFolderType(string type)
return Equals(type, FOLDER_TYPE);
}

public static bool IsEditAccount(string type)
{
return Equals(type, EDIT_ACCOUNT);
}

public static bool IsSampleSetType(string type)
{
return Equals(type, SAMPLE_SET_TYPE);
Expand Down
2 changes: 1 addition & 1 deletion pwiz_tools/Shared/CommonMsData/MsDataFilePath.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Original author: Nick Shulman <nicksh .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
Expand Down
19 changes: 18 additions & 1 deletion pwiz_tools/Shared/CommonMsData/RemoteApi/RemoteAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,27 @@ private enum ATTR
{
username,
password,
server_url
server_url,
alias
}

public abstract RemoteSession CreateSession();
public abstract RemoteUrl GetRootUrl();

private string _accountAlias;
public string AccountAlias {
get
{
if (string.IsNullOrEmpty(_accountAlias))
return ServerUrl;
return _accountAlias;
}
set
{
_accountAlias = value;
}
}
public bool HasAlias => !string.IsNullOrEmpty(_accountAlias);
public bool CanHandleUrl(RemoteUrl remoteUrl)
{
if (remoteUrl.AccountType != AccountType)
Expand Down Expand Up @@ -105,12 +120,14 @@ protected virtual void ReadXElement(XElement xElement)
}

ServerUrl = (string) xElement.Attribute(ATTR.server_url.ToString());
AccountAlias = (string)xElement.Attribute(ATTR.alias.ToString()) ?? string.Empty;
}

public virtual void WriteXml(XmlWriter writer)
{
writer.WriteAttributeIfString2(ATTR.server_url, ServerUrl);
writer.WriteAttributeIfString2(ATTR.username, Username);
writer.WriteAttributeIfString2(ATTR.alias, AccountAlias);
if (!string.IsNullOrEmpty(Password))
{
writer.WriteAttributeString2(ATTR.password, CommonTextUtil.EncryptString(Password));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public override string Name

public override RemoteAccount GetEmptyAccount()
{
return new WatersConnectAccount(@"https://devconnect.waters.com:48444", null, null);
return WatersConnectAccount.DEFAULT;
}
}
}
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,10 @@
<value>waters_connect</value>
<comment>Lower case is intentional branding.</comment>
</data>
<data name="Unifi_GroupBox_Label" xml:space="preserve">
<value>Advanced Unifi settings</value>
</data>
<data name="Waters_Connect_GroupBox_Label" xml:space="preserve">
<value>Advanced waters_connect settings</value>
</data>
</root>
12 changes: 11 additions & 1 deletion pwiz_tools/Shared/CommonMsData/RemoteApi/RemoteItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,23 @@

namespace pwiz.CommonMsData.RemoteApi
{
public enum AccessType
{
unknown,
no_access,
read,
read_write
}
public class RemoteItem
{
public RemoteItem(MsDataFileUri msDataFileUri, string label, string type, DateTime? lastModified, long fileSizeBytes, bool hasChildren = false)
public RemoteItem(MsDataFileUri msDataFileUri, string label, string type, DateTime? lastModified, long fileSizeBytes, bool hasChildren = false, AccessType access = AccessType.unknown)
{
MsDataFileUri = msDataFileUri;
Label = label;
Type = type;
LastModified = lastModified;
FileSize = (ulong) fileSizeBytes;
Access = access;
HasChildren = hasChildren;
}

Expand All @@ -37,6 +45,8 @@ public RemoteItem(MsDataFileUri msDataFileUri, string label, string type, DateTi
public string Type { get; private set; }
public DateTime? LastModified { get; private set; }
public ulong FileSize { get; private set; }
public object Data { get; private set; }
public AccessType Access { get; private set; }
public bool HasChildren { get; }
}
}
25 changes: 23 additions & 2 deletions pwiz_tools/Shared/CommonMsData/RemoteApi/RemoteSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,20 @@ protected void RetryFetch<T>(Uri requestUri, Func<Uri, T> fetcher)

if (_fetchRequests.Contains(key))
{
return;
if (_responses.TryGetValue(key, out var response))
{
if (response.Exception == null)
{
// Already have the response data.
return;
}
else
_responses.Remove(key);
}
else
return; // The request is already in progress.
}
_responses.Remove(key);
_fetchRequests.Remove(key);
AsyncFetch(requestUri, fetcher, out _);
}

Expand Down Expand Up @@ -221,6 +232,11 @@ protected bool TryGetData<T>(Uri requestUri, out T data)
data = default(T);
return false;
}
if (remoteResponse.Exception != null)
{
data = default(T);
return false;
}
data = (T) remoteResponse.Data;
return true;
}
Expand Down Expand Up @@ -282,4 +298,9 @@ public override int GetHashCode()
}
}
}

public class ProgressableStreamContents
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this, remove

{

}
}
40 changes: 39 additions & 1 deletion pwiz_tools/Shared/CommonMsData/RemoteApi/RemoteUrl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public interface IRemoteAccountStorage
public abstract class RemoteUrl : MsDataFileUri
{
public static readonly RemoteUrl EMPTY = new Empty();
private enum Attr
public enum Attr
{
centroid_ms1, // Legacy
centroid_ms2, // Legacy
Expand All @@ -50,6 +50,7 @@ private enum Attr
username,
modified_time,
}
public const string PATH_SEPARATOR = "/";

public abstract RemoteAccountType AccountType { get; }

Expand Down Expand Up @@ -96,6 +97,31 @@ public override MsDataFileUri ChangeLockMassParameters(LockMassParameters lockMa
public string Username { get; private set; }
public DateTime? ModifiedTime { get; private set; }

public bool BelongsToAccount(RemoteAccount account)
{
if (account == null)
{
return false;
}
if (account.AccountType != AccountType)
{
return false;
}
return account.ServerUrl == ServerUrl && account.Username == Username;
}
public bool SameAccountAs(RemoteUrl url)
{
if (url == null)
{
return false;
}
if (url.AccountType != AccountType)
{
return false;
}
return url.ServerUrl == ServerUrl && url.Username == Username;
}

public RemoteUrl ChangeModifiedTime(DateTime? modifiedTime)
{
return ChangeProp(ImClone(this), im => im.ModifiedTime = modifiedTime);
Expand Down Expand Up @@ -168,6 +194,12 @@ public override string ToString()
return AccountType.Name + @":" + GetParameters();
}

public virtual string FormattedString()
{
var nameValuePairs = GetParameters();
return string.Join("\n", nameValuePairs.GetEnumerable().Select(pair => pair.Key + ":\t" + pair.Value));
}

public override int GetSampleIndex()
{
return -1;
Expand Down Expand Up @@ -196,6 +228,12 @@ public virtual RemoteUrl ChangePathParts(IEnumerable<string> parts)
im => im.EncodedPath = parts == null ? null : string.Join(@"/", parts.Select(Uri.EscapeDataString)));
}

public RemoteUrl ChangePathPartsOnly(IEnumerable<string> parts)
{
return ChangeProp(ImClone(this),
im => im.EncodedPath = parts == null ? null : string.Join(@"/", parts.Select(Uri.EscapeDataString)));
}

public IEnumerable<string> GetPathParts()
{
if (EncodedPath == null)
Expand Down
Loading