Skip to content

[WIP] To trigger CI for how does comtypes PR affect to pywinauto#1232

Draft
junkmd wants to merge 1 commit into
pywinauto:masterfrom
junkmd:comtypes_pr_test
Draft

[WIP] To trigger CI for how does comtypes PR affect to pywinauto#1232
junkmd wants to merge 1 commit into
pywinauto:masterfrom
junkmd:comtypes_pr_test

Conversation

@junkmd

@junkmd junkmd commented Jul 31, 2022

Copy link
Copy Markdown
Contributor

My projects are using both comtypes and pywinauto.

I am now manually modifying the comtypes branch in ci/install.ps1 to test if the comtypes PR is approved.

I am searching how to automate testing when comtypes and other dependencies updating or submitting PR.

I will close this and re-submit issue/PR when figured it out.

@junkmd junkmd closed this Jul 31, 2022
@junkmd junkmd reopened this Jul 31, 2022
@junkmd junkmd changed the title To trigger CI for how does comtypes PR affects to pywinauto [WIP] To trigger CI for how does comtypes PR affects to pywinauto Jul 31, 2022
@junkmd junkmd changed the title [WIP] To trigger CI for how does comtypes PR affects to pywinauto [WIP] To trigger CI for how does comtypes PR affect to pywinauto Jul 31, 2022
@codecov

codecov Bot commented Jul 31, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.98%. Comparing base (5267340) to head (96ef521).
⚠️ Report is 65 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1232   +/-   ##
=======================================
  Coverage   87.98%   87.98%           
=======================================
  Files          60       59    -1     
  Lines       22985    22927   -58     
=======================================
- Hits        20223    20173   -50     
+ Misses       2762     2754    -8     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@junkmd
junkmd force-pushed the comtypes_pr_test branch from 923eab6 to ce23ac4 Compare July 31, 2022 07:59
@vasily-v-ryabov

Copy link
Copy Markdown
Contributor

The best idea I have is adding "pywinauto" step to comtypes AppVeyor build matrix and run pywinauto tests there. Well, 2 pywinauto steps: for Py2.7 and Py3.10 should be enough. Also I know how to reduce the full pywinauto test suite to only "uia" backend related tests which will save time for comtypes CI.

@junkmd
junkmd force-pushed the comtypes_pr_test branch 3 times, most recently from 3d9e91e to f76915e Compare August 1, 2022 16:32
@junkmd

junkmd commented Aug 2, 2022

Copy link
Copy Markdown
Contributor Author

Your proposal is attractive because it allows us to do what we want to do with less man-hours.

On the other hand, it doesn't feel right to test for pywinauto within comtypes.

It is better to use a way that can be used even if a package other than comtypes will be updated.

For example, pywin32 and six are third-party libraries that pywinauto also depends on, but I don't think that "put a install pywinauto test in their CI to make sure it works properly" proposal would be approved.

I agree that adding a non-env-dependent UIAutomationCore.dll test to comtypes, as simple as "just close an opened notepad app"(this is the code I assumed), to prevent "other dll APIs with comtypes is available, but only the UIAutomationCore.dll is not available" situation.

There are such things like dependabot and renovatebot that do something by updating dependency packages.
Or we might be able to do something with GitHub Actions.
I would like to suggest and consider using those tools.

Do you have any opinions?

@vasily-v-ryabov

Copy link
Copy Markdown
Contributor

The difference is that pywin32 and six packages have completely different maintainers and user bases. Though comtypes is not only pywinauto's dependency so in some sense you're right. I suggested the solution that is easiest for me to implement. And I've already started writing PowerShell scripts for it when I had 2 free hours.

Risk of absence of UIAutomationCore.dll is very low because it's built-in in the OS since Windows Vista. The only risk here: it might be renamed in the future Windows versions, but Microsoft do such things extremely rarely.

I'm not familiar with mentioned bots behavior yet. Maybe it makes sense. So more detailed suggestions are welcome.

@junkmd

junkmd commented Aug 6, 2022

Copy link
Copy Markdown
Contributor Author

@vasily-v-ryabov

Though comtypes is not only pywinauto's dependency

That was exactly the reason for the proposal not to test pywinauto in comtypes.

For example, I now use both comtypes and pywinauto, but used to use comtypes only for Excel operations. I was taking such developers into consideration.

Those bots are used for my application development.
The bots automatically submit PRs triggered by updating dependency packages.

Also,repository-dispatch is available in GitHub Actions Store, which seems to be able to trigger something.

If we can run automated testing (or script) triggered by these, we can do what we want without binding all comtypes developers to pywinauto.

Please wait as I am still investigating the specifics of how to do this, such as whether these bots can trigger only automated testing, or whether special tokens are needed for Actions.

@vasily-v-ryabov

vasily-v-ryabov commented Aug 6, 2022

Copy link
Copy Markdown
Contributor

I think one of the right ways would be writing comtypes unit tests for UIAutomationCore.dll which is part of OS. But it takes time, and we have big number of ready-to-use tests on top of UIAutomationCore.dll in pywinauto. In this case pywinauto plays role of test framework. Only cyclic dependency makes this way a bit wrong.

@junkmd
junkmd force-pushed the comtypes_pr_test branch 2 times, most recently from eba02aa to 81ac8a5 Compare August 20, 2022 12:52
@junkmd
junkmd force-pushed the comtypes_pr_test branch 6 times, most recently from 1b04315 to 01b8f50 Compare September 22, 2022 11:36
@junkmd
junkmd force-pushed the comtypes_pr_test branch 2 times, most recently from 997c758 to f9dc33a Compare September 25, 2022 01:30
@junkmd junkmd closed this Sep 29, 2022
@junkmd junkmd reopened this Sep 29, 2022
@junkmd
junkmd force-pushed the comtypes_pr_test branch 3 times, most recently from 5514703 to e396c80 Compare November 30, 2022 22:32
@junkmd
junkmd force-pushed the comtypes_pr_test branch 7 times, most recently from ac5b420 to f0ee305 Compare December 13, 2022 14:27
@junkmd
junkmd force-pushed the comtypes_pr_test branch 5 times, most recently from 60294c7 to 8a439d9 Compare December 21, 2022 14:37
@junkmd
junkmd force-pushed the comtypes_pr_test branch 12 times, most recently from d42b036 to 3c20656 Compare December 26, 2022 11:19
@junkmd

junkmd commented Jan 8, 2023

Copy link
Copy Markdown
Contributor Author

I have been repeatedly close and re-open this PR for Error uploading artifact to the storage: Remote server returned 503: Service Unavailable.

I think the annoying ping has send to community members. My apologies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants