Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alphapeptdeep Integration #3123

Open
wants to merge 194 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
a5f1e47
PeakTotalIonCurrentArea
Apr 4, 2024
c4e7c59
Rename PythonInstaller to PythonInstallerLegacyDlg
xgwang-uw Aug 13, 2024
dc612f9
Add PythonInstaller that supports virtual environment
xgwang-uw Aug 16, 2024
d77d35e
Update to add OneOf dependency with PackageReference
xgwang-uw Aug 21, 2024
9d6cab0
Add RuntimeIdentifier win to Skyline.csproj to fix nuget restore error
xgwang-uw Aug 20, 2024
888627c
Fix scaling issue and enable locatable for PythonInstallerDlg form
xgwang-uw Aug 21, 2024
d06c394
Fix AutoScaleDimensions value in PythonInstallerDlg.resx
xgwang-uw Aug 21, 2024
3b12574
Add more verbose logging if "CheckForMissingResources" fails.
Aug 22, 2024
1e5eb21
Fix CodeInspection test by moving PythonInstaller strings from ToolsU…
Aug 22, 2024
f2d97e9
Added OneOf.dll to Product-template.wxs
chambm Aug 22, 2024
7812cb5
Fix PythonInstallerTest by consuming strings from ToolsResources
xgwang-uw Aug 26, 2024
5c487ab
Setup python virtual environment and implement building library with …
xgwang-uw Jul 11, 2024
eade5f9
Remove unused exception vars
xgwang-uw Aug 27, 2024
e0a85e1
Revert "Setup python virtual environment and implement building libra…
xgwang-uw Aug 27, 2024
15930d7
Setup python virtual environment and add empty AlphapeptdeepLibraryBu…
xgwang-uw Aug 27, 2024
dab7240
Add top level logic for BuildLibrary in AlphapeptdeepLibrarybuilder
xgwang-uw Aug 28, 2024
494b457
AlphapeptdeepLibraryBuilder - prepare input file for alphapeptdeep fr…
xgwang-uw Sep 3, 2024
622c47a
AlphapeptdeepLibraryBuilder - prepare settings.yaml file and execute …
xgwang-uw Sep 4, 2024
668f811
AlphapeptdeepLibraryBuilder - transform alphapeptdeep output spectral…
xgwang-uw Sep 5, 2024
2043f45
AlphapeptdeepLibraryBuilder - build transformed alphapeptdeep output …
xgwang-uw Sep 5, 2024
88f3295
Setup python and java environments for Carafe
xgwang-uw Sep 9, 2024
1aec5af
Update carafe UI to match existing functionalities
xgwang-uw Sep 10, 2024
9a5b1d4
Implement CarafeLibraryBuilder to make carafe work end to end in Skyline
xgwang-uw Sep 12, 2024
36c7475
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
nickshulman Nov 8, 2024
6a90908
Add "PeakIonMetrics"
nickshulman Nov 15, 2024
9c6215f
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
nickshulman Nov 15, 2024
c0ffffe
Remove TotalIonCurrentArea from TransitionGroupChromInfo
nickshulman Nov 15, 2024
562abf6
Mark PeakIonMetrics as "[Expensive]" so that they cannot be sorted or…
nickshulman Nov 15, 2024
67ddfb2
Merge branch 'master' into Skyline/work/20240403_PeakTotalIonCurrentArea
nickshulman Nov 16, 2024
7b3c790
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
nickshulman Nov 18, 2024
e793804
Merge branch 'Skyline/work/20240403_PeakTotalIonCurrentArea' of https…
nickshulman Nov 18, 2024
c125325
Add MBI_SDK.dll to ClickOnce installed files
nickshulman Nov 18, 2024
b8ea2a7
Merge branch 'master' into Skyline/work/20240403_PeakTotalIonCurrentArea
nickshulman Nov 20, 2024
d2fd31f
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
nickshulman Dec 3, 2024
bd5ab7d
Add "Injection Time" to Full Scan spectrum property sheet.
nickshulman Dec 3, 2024
402aec4
Merge branch 'Skyline/work/20240403_PeakTotalIonCurrentArea' of https…
nickshulman Dec 3, 2024
07863b8
Merge branch 'master' into Skyline/work/20240816_pythoninstaller_with…
Dec 4, 2024
9a7f641
Changed filename from DocumentHash to base64 string encoding to avoid
Dec 5, 2024
89e9cc8
Switch to a FolderBrowserDialog since user selects the Library Filena…
dshteyn Dec 5, 2024
00e0d4b
Adjust warning for skipped peptides, don't show modification name sin…
dshteyn Dec 5, 2024
dbd9f42
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
nickshulman Dec 5, 2024
7e5a065
Divide injection time by 1000 before multiplying by Intensity so that…
nickshulman Dec 5, 2024
4049ae2
Merge branch 'master' into Skyline/work/20240403_PeakTotalIonCurrentArea
nickshulman Dec 6, 2024
b16dadc
(1) Backout FolderBrowserDialog and place back SaveFileDialog (2) Whe…
dshteyn Dec 6, 2024
039fd70
Alphapeptdeep integration test to verify no duplicate accessions exis…
dshteyn Dec 6, 2024
53dd101
AlphaPeptDeep potential Warnings with modifications, these are locali…
dshteyn Dec 6, 2024
23f3ff1
AlphaPeptDeep interface corrections
dshteyn Dec 6, 2024
2682501
Updated resx with localizable strings
dshteyn Dec 6, 2024
72176c6
Adding a new function to combine the Unimod accession (aka ID) with a…
dshteyn Dec 6, 2024
e04ce1a
Test to verify unique accessions in the unimod modification list used…
dshteyn Dec 6, 2024
eeb6b82
Clarify message
dshteyn Dec 6, 2024
d3764ec
Clarify message
dshteyn Dec 6, 2024
6b438ea
Address PR comment on extraneous code
dshteyn Dec 7, 2024
845978d
Implement AlphaPeptDeepLibraryBuilder ability to read all Unimod modi…
dshteyn Dec 7, 2024
cb312c6
Address PR comment on extraneous code
dshteyn Dec 7, 2024
d39f34f
Localizable strings for Python installation message for AlphaPeptDeep
dshteyn Dec 7, 2024
c88d824
Switch to MultiButtonMsgDlg to alert need to install python.
dshteyn Dec 7, 2024
82760a1
Fix typo which caused "Spectrum Ion Count" to have the wrong value.
nickshulman Dec 9, 2024
a8e344b
Merge branch 'Skyline/work/20240403_PeakTotalIonCurrentArea' of https…
nickshulman Dec 9, 2024
4afe7cc
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
nickshulman Dec 9, 2024
2d6388d
Address TC code inspection warnings in code I added and merge master …
dshteyn Dec 10, 2024
0688888
Addressing more TC code inspection concerns
dshteyn Dec 10, 2024
afca6cf
Another TC Code Inspection warning addressed.
dshteyn Dec 10, 2024
cb061bd
Switch Unimod accession setting to use {unimod_accession}:{name} to a…
dshteyn Dec 10, 2024
2e809c8
Merge branch 'master' into 'Skyline/work/20240909_carafe_integration'
dshteyn Dec 11, 2024
6178f74
Use default Directory.CreateDirectory and quiet down ReSharper
dshteyn Dec 11, 2024
ecf8116
Quiet ReSharper Warnings by removing unnecessary using statements
dshteyn Dec 11, 2024
8c104a8
Address ReSharper inspection issues
dshteyn Dec 11, 2024
58df59a
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Dec 12, 2024
e562344
Merge branch 'Skyline/work/20240816_pythoninstaller_with_virtual_env_…
dshteyn Dec 12, 2024
ae3f388
Python installation for Carafe, dialog
dshteyn Dec 12, 2024
d3f46fc
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
nickshulman Dec 13, 2024
5eee0bf
Moving towards getting carafe to function in skyline
dshteyn Dec 13, 2024
15ce719
Got installation of python and modules working so Carafe can be used …
dshteyn Dec 13, 2024
aebc724
Change names of columns to include "LcPeak" and "Analyte"
nickshulman Dec 14, 2024
dddfd7b
Merge branch 'master' into Skyline/work/20240403_PeakTotalIonCurrentArea
nickshulman Dec 16, 2024
ddea79b
Changes for installing python for ALPHAPEPTDEEP and CARAFE. Modifica…
dshteyn Dec 17, 2024
e91b009
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Dec 18, 2024
63c1519
Merge [master] into [20240909_carafe_integration] and changes related…
dshteyn Dec 18, 2024
5c7e1a3
- skip peptides containing unsupported modifications in Carafe and Al…
dshteyn Dec 18, 2024
9affaca
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Dec 18, 2024
85201e1
- address ReSharper warnings
dshteyn Dec 18, 2024
ebe3448
Merge branch 'Skyline/work/20240909_carafe_integration' of https://gi…
dshteyn Dec 18, 2024
41fab43
Correct typo calling wrong function
dshteyn Dec 19, 2024
f847e65
Address ReSharper concerns
dshteyn Dec 19, 2024
b2c1517
Merge branch 'master' of https://github.com/ProteoWizard/pwiz into Sk…
dshteyn Dec 19, 2024
d20d558
- Create a modification index to track supported modifications by Carafe
dshteyn Dec 20, 2024
d05b4e0
- Report the name of the tool in the Immediate Window when encounteri…
dshteyn Dec 21, 2024
5579a2b
Merge branch 'master' of https://github.com/ProteoWizard/pwiz into Sk…
dshteyn Dec 21, 2024
d8de121
Merge 20240909_carafe_integration branch changes into 20240816_python…
dshteyn Dec 22, 2024
36f2650
Allow SpectrumMetadata TotalIonCurrent and InjectionTime to be null
nickshulman Dec 25, 2024
905e2e8
Merge branch 'Skyline/work/20240403_PeakTotalIonCurrentArea' of https…
nickshulman Dec 25, 2024
41e12a7
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
nickshulman Dec 25, 2024
7098c65
Add "ApexSpectrumId" because Bo asked for it.
nickshulman Dec 25, 2024
bb6e6be
Fix Flags enum in SpectrumMetadata
nickshulman Dec 25, 2024
e6a8f29
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Dec 27, 2024
1fc1702
Code refactoring for Python environment set up and optional setting o…
dshteyn Dec 28, 2024
f858c8a
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Dec 28, 2024
4333566
Code inspection correction.
dshteyn Dec 28, 2024
59cbeec
Refactor move InstallPythonVirtualEnvironment function from PythonIns…
dshteyn Dec 28, 2024
8ad214d
Changes to address TeamCity testing concerns
dshteyn Dec 28, 2024
4af80b2
Move function InstallPythonVirtualEnvironment from BuildLibraryDlg to…
dshteyn Dec 28, 2024
0f53ca9
Removed extraneous using statements identified by ReSharper
dshteyn Dec 28, 2024
2b62301
Move InstallPythonVirtualEnvironment function to its own class in Too…
dshteyn Dec 28, 2024
142b8a9
Attempt to address System.NullReferenceException reported by TeamCity…
dshteyn Dec 28, 2024
645528d
+ Improve PythonInstaller
dshteyn Jan 5, 2025
47d0d3b
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Jan 5, 2025
52b7405
Address TC code inspection issue:
dshteyn Jan 5, 2025
d42c1c5
Attempt to run PythonInstallerUI in TestFunctional without enabling W…
dshteyn Jan 6, 2025
fcaeeb0
Correct problem with Python installation for future Carafe BuildLibra…
dshteyn Jan 6, 2025
b6fb2a5
Undo last change to TestFunctional.csproj
dshteyn Jan 6, 2025
257dd1b
Disable failing TestFunctional tests for now.
dshteyn Jan 6, 2025
6564801
Merge branch 'master' into Skyline/work/20240403_PeakTotalIonCurrentArea
nickshulman Jan 6, 2025
8464baa
Merge branch 'master' into Skyline/work/20240816_pythoninstaller_with…
nickshulman Jan 6, 2025
d098e06
Improve Error messages.
dshteyn Jan 7, 2025
6327653
Remove unnecessary using statements found by ReSharper
dshteyn Jan 8, 2025
a0a1393
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Jan 8, 2025
268db8e
Merge branch 'Skyline/work/20240816_pythoninstaller_with_virtual_env_…
dshteyn Jan 8, 2025
fc2219c
Additional messages to help to the log
dshteyn Jan 8, 2025
00f5ea2
Merge branch 'master' into Skyline/work/20240403_PeakTotalIonCurrentArea
nickshulman Jan 8, 2025
c58d7aa
fix TestResultFileMetaData
Jan 9, 2025
51c18e8
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Jan 9, 2025
8ac1ad5
Changes to address issue with spaces in filenames discovered by runni…
dshteyn Jan 9, 2025
5d6f4be
TEST CODE: this is to be reverted after the test!!! Code to catch th…
dshteyn Jan 9, 2025
ad00b9d
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
Jan 9, 2025
0312949
Fix TestIgnoreSimScans
Jan 9, 2025
eec4ea0
Remove bogus "PauseTest()"
Jan 9, 2025
b083747
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Jan 10, 2025
7267a09
Fix MS tutorial test
Jan 10, 2025
98da8b9
Remove unnecessary code in the test
dshteyn Jan 10, 2025
9935a83
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Jan 10, 2025
f04d1af
Fix LC Peak Analyte Ion Count
Jan 10, 2025
892b23b
Merge remote-tracking branch 'remotes/origin/master' into Skyline/wor…
Jan 10, 2025
97ce458
Merge branch 'Skyline/work/20240403_PeakTotalIonCurrentArea' of githu…
dshteyn Jan 10, 2025
acbbe26
Apply button for Customized Reports. Need some help saving TreeState…
dshteyn Jan 13, 2025
b1bbb34
Merge branch 'master' of github.com:ProteoWizard/pwiz into Branch_Sky…
dshteyn Jan 13, 2025
70442cc
Branch for Carafe implementation, CUDA, and Apply button
dshteyn Jan 13, 2025
b0c1761
Clarify error message and direct user/developer to wiki page which ex…
dshteyn Jan 14, 2025
1f4a042
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Jan 14, 2025
433dc30
Improve comments for developers and messages displayed to users. Sim…
dshteyn Jan 15, 2025
8ce8558
Improved validation of python tasks using hash signatures. Move clea…
dshteyn Jan 17, 2025
7dfc61c
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Jan 17, 2025
266448a
Merge branch 'Skyline/work/20240816_pythoninstaller_with_virtual_env_…
dshteyn Jan 17, 2025
8a8043a
Hide console window option for SkylineProcessRunner
dshteyn Jan 17, 2025
4474db7
Disable cuda in this branch.
dshteyn Jan 18, 2025
132cd15
Back-out 'Apply' button from this branch for now, until confirmed.
dshteyn Jan 18, 2025
0e4794d
Remove unneeded code
dshteyn Jan 18, 2025
a16806c
Merge branch 'master' of github.com:ProteoWizard/pwiz into 20250113_C…
dshteyn Jan 20, 2025
1dd4c4f
GPU support for NVIDIA cards. Improve flexibility and validation of P…
dshteyn Jan 20, 2025
6749eb6
Switch for device gpu in Alphapeptdeep. Minor corrections.
dshteyn Jan 22, 2025
1b6b2cf
Merge branch 'master' of github.com:ProteoWizard/pwiz into 20250113_C…
dshteyn Jan 22, 2025
30fd835
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Jan 23, 2025
1e14b95
Improve messages, improve Python install user experience, download an…
dshteyn Jan 23, 2025
e6f0f7b
Remove unnecessary signature
dshteyn Jan 23, 2025
bc91a5c
address a bug found by team city
dshteyn Jan 23, 2025
ea7936f
attempt to fix TeamCity discovered issue.
dshteyn Jan 23, 2025
2d78935
Test should only wait for Cuda related elevation permissions message …
dshteyn Jan 23, 2025
354c901
Emulate what is possible in the UI better as suggested by Brian Pratt
dshteyn Jan 23, 2025
c2cacd5
If Nvidia card is not detected don't add Cuda/CuDNN tasks to the proc…
dshteyn Jan 23, 2025
577c877
Abort all Cuda related tasks when user answers "No" to Cuda. Assert f…
dshteyn Jan 23, 2025
b50dbbf
Merge branch 'Skyline/work/20240816_pythoninstaller_with_virtual_env_…
dshteyn Jan 23, 2025
02264a7
Merge changes
dshteyn Jan 23, 2025
da298a0
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Jan 24, 2025
6d5288c
Make names more consistent to match the original AlphaPeptDeep public…
dshteyn Jan 24, 2025
d1bef56
Rename AlphaPeptDeepLibraryBuilder.cs to AlphapeptdeepLibraryBuilder.cs
dshteyn Jan 24, 2025
4650224
Rename AlphapeptDeepBuildLibraryTest.cs to AlphapeptdeepBuildLibraryT…
dshteyn Jan 24, 2025
80d39a5
Rename AlphapeptDeepBuildLibraryTest.zip to AlphapeptdeepBuildLibrary…
dshteyn Jan 24, 2025
1df275c
Merge branch 'Skyline/work/20240816_pythoninstaller_with_virtual_env_…
dshteyn Jan 24, 2025
ac0c94c
Test using retries to read a file that might be used by another process.
dshteyn Jan 24, 2025
1c10711
Refactor and improve code in the process of fixing problem discovered…
dshteyn Jan 26, 2025
ec61351
Address some issue with failing tests.
dshteyn Jan 26, 2025
a079a87
Encourage user patience during the longest part of first-time python …
dshteyn Jan 26, 2025
d8200dd
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Jan 26, 2025
300e1b6
Decrement expected number of failures 'Skyline model code must not de…
dshteyn Jan 26, 2025
4212ebe
Implement changes to TestAlphaPeptDeepBuildLibrary and related fixes …
dshteyn Jan 28, 2025
651b777
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Jan 28, 2025
2d5eeb3
Merge branch 'master' of https://github.com/ProteoWizard/pwiz into Sk…
dshteyn Jan 29, 2025
c3da42b
Implement suggested changes
dshteyn Jan 29, 2025
fc07478
Changes in response to bpratt comments on PR3123
dshteyn Jan 31, 2025
6d928bf
Implement suggestion from bpratt to improve user experience: output f…
dshteyn Jan 31, 2025
3da2cf9
Merge branch 'master' of https://github.com/ProteoWizard/pwiz into Sk…
dshteyn Jan 31, 2025
6821259
Incorporate bpratt's suggested changes.
dshteyn Feb 4, 2025
df735a8
Merge branch 'master' of https://github.com/ProteoWizard/pwiz into Sk…
dshteyn Feb 4, 2025
7893764
Clean-up some code cruft. Allow SkylineProcessRunner to Kill a proce…
dshteyn Feb 5, 2025
a3a17c9
cruft
dshteyn Feb 5, 2025
8c259da
Merge branch 'master' of github.com:ProteoWizard/pwiz into Skyline/wo…
dshteyn Feb 5, 2025
bde691a
Make cancellations easier by preventing blocking on reader.ReadLine i…
dshteyn Feb 6, 2025
1ebc4c7
Implement Brian's suggestions to improve user experience.
dshteyn Feb 6, 2025
48e13c9
Output Alphapeptdeep result in timestamped directories to prevent col…
dshteyn Feb 6, 2025
b68b4ec
Add check of Python installation to the test after Python is installe…
dshteyn Feb 6, 2025
43258bf
Add a function in PythonInstaller to delete Tools/Python and call it …
dshteyn Feb 6, 2025
a11b547
Switch to standard SafeDeleteLongPath for consistency.
dshteyn Feb 7, 2025
0646be7
Improve the library building organization with timestamps. Create li…
dshteyn Feb 9, 2025
d6c2933
Merge branch 'master' of https://github.com/ProteoWizard/pwiz into Sk…
dshteyn Feb 9, 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
using System;
/*
* Maintainer: David Shteynberg <david.shteynberg .at. proton.me>,
* MacCoss Lab, Department of Genome Sciences, UW
Copy link
Member

Choose a reason for hiding this comment

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

"Maintainer" isn't something you'll find anywhere in the rest of the code. Just use "Author", which is Skyline-speak for "owner" or "knows more about it than anyone else, presumably". And, use your proteinms email.

*
* Copyright 2025 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
Expand Down
21 changes: 20 additions & 1 deletion pwiz_tools/Skyline/Model/Carafe/CarafeLibraryBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
using System;
/*
* Maintainer: David Shteynberg <david.shteynberg .at. proton.me>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2025 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
Expand Down
21 changes: 20 additions & 1 deletion pwiz_tools/Skyline/Model/Tools/PythonInstaller.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
using System;
/*
* Maintainer: David Shteynberg <david.shteynberg .at. proton.me>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2025 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
Expand Down
21 changes: 20 additions & 1 deletion pwiz_tools/Skyline/Test/AlphapeptdeepLibraryBuilderTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
/*
* Author and maintainer: David Shteynberg <david.shteynberg .at. proton.me>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2025 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Linq;
using pwiz.Skyline.Model.AlphaPeptDeep;
using pwiz.SkylineTestUtil;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
/*
* Author and maintainer: David Shteynberg <david.shteynberg .at. proton.me>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2025 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using Microsoft.VisualStudio.TestTools.UnitTesting;
using pwiz.Skyline.SettingsUI;
using pwiz.Skyline.Util;
using pwiz.SkylineTestUtil;
Expand Down
21 changes: 20 additions & 1 deletion pwiz_tools/Skyline/TestFunctional/CarafeBuildLibraryTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
using System;
/*
* Maintainer: David Shteynberg <david.shteynberg .at. proton.me>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2025 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using System;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using pwiz.Common.SystemUtil;
Expand Down
19 changes: 18 additions & 1 deletion pwiz_tools/Skyline/TestFunctional/PythonInstallerTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
/*
*
* Copyright 2025 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using Microsoft.VisualStudio.TestTools.UnitTesting;
using pwiz.Skyline.Model.Tools;
using pwiz.SkylineTestUtil;
using System;
Expand Down
60 changes: 37 additions & 23 deletions pwiz_tools/Skyline/TestUtil/PythonTestUtil.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
/*
* Author and maintainer: David Shteynberg <david.shteynberg .at. proton.me>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2025 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using Microsoft.VisualStudio.TestTools.UnitTesting;
using pwiz.Skyline.Alerts;
using pwiz.Skyline.Model.Tools;
using pwiz.Skyline.SettingsUI;
Expand All @@ -10,7 +29,7 @@
namespace pwiz.SkylineTestUtil
{
[TestClass]
Copy link
Member

Choose a reason for hiding this comment

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

Drop this - this isn't a test, it's code supporting tests

public class PythonTestUtil : AbstractFunctionalTestEx
public class PythonTestUtil
{
private string _pythonVersion
{
Expand Down Expand Up @@ -66,42 +85,42 @@ public void CancelPython(BuildLibraryDlg buildLibraryDlg)
{
// Test the control path where Python is not installed, and the user is prompted to deal with admin access
PythonInstaller.SimulatedInstallationState = PythonInstaller.eSimulatedInstallationState.NAIVE; // Simulates not having the needed registry settings
var installPythonDlg = ShowDialog<MultiButtonMsgDlg>(() => buildLibraryDlg.OkWizardPage()); // Expect the offer to install Python
var installPythonDlg = AbstractFunctionalTest.ShowDialog<MultiButtonMsgDlg>(() => buildLibraryDlg.OkWizardPage()); // Expect the offer to install Python
//PauseTest("install offer");
AssertEx.AreComparableStrings(ToolsUIResources.PythonInstaller_BuildPrecursorTable_Python_0_installation_is_required, installPythonDlg.Message);
CancelDialog(installPythonDlg, installPythonDlg.CancelDialog); // Cancel it immediately
AbstractFunctionalTest.CancelDialog(installPythonDlg, installPythonDlg.CancelDialog); // Cancel it immediately
//PauseTest("back to wizard");
installPythonDlg = ShowDialog<MultiButtonMsgDlg>(() => buildLibraryDlg.OkWizardPage()); // Expect the offer to install Python
installPythonDlg = AbstractFunctionalTest.ShowDialog<MultiButtonMsgDlg>(() => buildLibraryDlg.OkWizardPage()); // Expect the offer to install Python
// PauseTest("install offer again");
AssertEx.AreComparableStrings(ToolsUIResources.PythonInstaller_BuildPrecursorTable_Python_0_installation_is_required, installPythonDlg.Message);
var needAdminDlg = ShowDialog<MessageDlg>(installPythonDlg.OkDialog); // Expect to be told about needing admin access
var needAdminDlg = AbstractFunctionalTest.ShowDialog<MessageDlg>(installPythonDlg.OkDialog); // Expect to be told about needing admin access
// PauseTest("need admin msg");
AssertEx.AreComparableStrings(ToolsUIResources.PythonInstaller_Requesting_Administrator_elevation, needAdminDlg.Message);
CancelDialog(needAdminDlg, needAdminDlg.CancelDialog);
AbstractFunctionalTest.CancelDialog(needAdminDlg, needAdminDlg.CancelDialog);
// PauseTest("back to wizard");
}
public bool InstallPython(BuildLibraryDlg buildLibraryDlg)
{
PythonInstaller.SimulatedInstallationState = PythonInstaller.eSimulatedInstallationState.NONE; // Normal tests systems will have registry set suitably

bool havePythonPrerequisite = false;
RunUI(() => { havePythonPrerequisite = buildLibraryDlg.PythonRequirementMet(); });
AbstractFunctionalTest.RunUI(() => { havePythonPrerequisite = buildLibraryDlg.PythonRequirementMet(); });

if (!havePythonPrerequisite)
{
MessageDlg confirmDlg = null;
MultiButtonMsgDlg nvidiaDlg = null;
RunLongDlg<MultiButtonMsgDlg>(buildLibraryDlg.OkWizardPage, pythonDlg =>
AbstractFunctionalTest.RunLongDlg<MultiButtonMsgDlg>(buildLibraryDlg.OkWizardPage, pythonDlg =>
{
Assert.AreEqual(string.Format(
ToolsUIResources.PythonInstaller_BuildPrecursorTable_Python_0_installation_is_required,
_pythonVersion, _toolName), pythonDlg.Message);

OkDialog(pythonDlg, pythonDlg.OkDialog);
AbstractFunctionalTest.OkDialog(pythonDlg, pythonDlg.OkDialog);
if (!PythonInstallerTaskValidator.ValidateEnableLongpaths())
{
MessageDlg longPathDlg = null;
longPathDlg = WaitForOpenForm<MessageDlg>();
longPathDlg = AbstractFunctionalTest.WaitForOpenForm<MessageDlg>();
Assert.AreEqual(
string.Format(ToolsUIResources.PythonInstaller_Requesting_Administrator_elevation),
longPathDlg.Message);
Expand All @@ -114,7 +133,7 @@ public bool InstallPython(BuildLibraryDlg buildLibraryDlg)

RunLongPathsDialog(longPathDlg);

nvidiaDlg = WaitForOpenForm<MultiButtonMsgDlg>();
nvidiaDlg = AbstractFunctionalTest.WaitForOpenForm<MultiButtonMsgDlg>();

Assert.AreEqual(string.Format(ToolsUIResources.PythonInstaller_Install_Cuda_Library),
nvidiaDlg.Message);
Expand Down Expand Up @@ -145,7 +164,7 @@ public bool InstallPython(BuildLibraryDlg buildLibraryDlg)
{
Console.WriteLine(@"Info: NVIDIA GPU DETECTED on test node");

nvidiaDlg = WaitForOpenForm<MultiButtonMsgDlg>();
nvidiaDlg = AbstractFunctionalTest.WaitForOpenForm<MultiButtonMsgDlg>();
Assert.AreEqual(string.Format(ToolsUIResources.PythonInstaller_Install_Cuda_Library),
nvidiaDlg.Message);
RunNvidiaDialog(nvidiaDlg);
Expand All @@ -160,10 +179,10 @@ public bool InstallPython(BuildLibraryDlg buildLibraryDlg)
{
Console.WriteLine(@"Info: Nvidia libraries already installed");
}
confirmDlg = WaitForOpenForm<MessageDlg>(600000);
confirmDlg = AbstractFunctionalTest.WaitForOpenForm<MessageDlg>(600000);
//PauseTest("Stop to check which Dialog is open");
Assert.AreEqual(string.Format(ToolsUIResources.PythonInstaller_OkDialog_Successfully_set_up_Python_virtual_environment), confirmDlg.Message);
OkDialog(confirmDlg, confirmDlg.OkDialog);
AbstractFunctionalTest.OkDialog(confirmDlg, confirmDlg.OkDialog);
if (!confirmDlg.IsDisposed)
confirmDlg.Dispose();

Expand All @@ -185,15 +204,10 @@ public bool InstallPython(BuildLibraryDlg buildLibraryDlg)
return false;
}

protected override void DoTest()
{
throw new NotImplementedException();
}

private void RunNvidiaDialog(MultiButtonMsgDlg nvidiaDlg)
{
nvidiaDlg.ClickNo();
MessageDlg confirmDlg = WaitForOpenForm<MessageDlg>(600000);
MessageDlg confirmDlg = AbstractFunctionalTest.WaitForOpenForm<MessageDlg>(600000);
Copy link
Member

Choose a reason for hiding this comment

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

You should use the change I supplied privately:

// We aren't running with admin privilege so we have to say no to the offer to install nvidia libraries var confirmDlg = AbstractFunctionalTest.ShowDialog<MessageDlg>(nvidiaDlg.ClickNo, 600000);

As it is, you're running UI code on the test thread, which causes intermittent failures

Assert.AreEqual(string.Format(ToolsUIResources.PythonInstaller_OkDialog_Successfully_set_up_Python_virtual_environment),
confirmDlg.Message);
confirmDlg.OkDialog();
Copy link
Member

Choose a reason for hiding this comment

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

Again, you should use the change I provided privately:
AbstractFunctionalTest.OkDialog(confirmDlg, confirmDlg.OkDialog);
this achieves two things - runs UI code on the UI thread, and makes sure the dialog is completely dismissed before moving along.

Expand All @@ -204,10 +218,10 @@ private void RunNvidiaDialog(MultiButtonMsgDlg nvidiaDlg)
private void RunLongPathsDialog(MessageDlg longPathDlg)
{
Console.WriteLine(@"Info: Trying to set LongPathsEnabled registry key to 1");
OkDialog(longPathDlg, longPathDlg.OkDialog);
AbstractFunctionalTest.OkDialog(longPathDlg, longPathDlg.OkDialog);
Console.WriteLine(@"Info: Successfully set LongPathsEnabled registry key to 1");
_undoRegistry = true;
MessageDlg okDlg = WaitForOpenForm<MessageDlg>();
MessageDlg okDlg = AbstractFunctionalTest.WaitForOpenForm<MessageDlg>();
okDlg.OkDialog();
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is actually reachable code (unless running Skyline as admin, which would be unusual) but this line should be
AbstractFunctionalTest.OkDialog(okDlg, okDlg.OkDialog);

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if there isn't a way we could let a user who does have sufficient rights to set that registry key - launch a tiny app that does only that, and only works if the user clicks through the OS-provided query about it


if (!longPathDlg.IsDisposed)
Expand Down
4 changes: 2 additions & 2 deletions pwiz_tools/Skyline/TestUtil/TestFunctional.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ protected void ShowSkyline(Action act)
SkylineWindow.DocumentChangedEvent += OnDocumentChangedLogging;
}

protected static TDlg ShowDialog<TDlg>(Action act, int millis = -1) where TDlg : Form
protected internal static TDlg ShowDialog<TDlg>(Action act, int millis = -1) where TDlg : Form
{
var existingDialog = FindOpenForm<TDlg>();
if (existingDialog != null)
Expand Down Expand Up @@ -412,7 +412,7 @@ protected static void RunDlg<TDlg>([InstantHandle] Action showDlgAction,
/// <param name="showDlgAction">Action which runs on the UI thread and causes the dialog to be shown</param>
/// <param name="exerciseDlgAction">Action which runs on the test thread and interacts with the dialog</param>
/// <param name="closeDlgAction">Action which runs on the UI thread and closes the dialog</param>
protected static void RunLongDlg<TDlg>([InstantHandle] Action showDlgAction, [InstantHandle] Action<TDlg> exerciseDlgAction, Action<TDlg> closeDlgAction) where TDlg : Form
protected internal static void RunLongDlg<TDlg>([InstantHandle] Action showDlgAction, [InstantHandle] Action<TDlg> exerciseDlgAction, Action<TDlg> closeDlgAction) where TDlg : Form
{
bool showDlgActionCompleted = false;
TDlg dlg = ShowDialog<TDlg>(() =>
Expand Down
21 changes: 20 additions & 1 deletion pwiz_tools/Skyline/ToolsUI/PythonInstallerUI.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
using pwiz.Skyline.Alerts;
/*
* Author and Maintainer: David Shteynberg <david.shteynberg .at. proton.me>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2025 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using pwiz.Skyline.Alerts;
using pwiz.Skyline.Controls;
using pwiz.Skyline.Model.Tools;
using System;
Expand Down