Commit Graph

82 Commits

Author SHA1 Message Date
Chris Hennes
fed3eadd3d Addon Manager: Add GUI tests for branch change dialog
Further protect utils gui code during testing so the same utils file can be used
for CLI and GUI tests.
2025-02-07 08:52:49 -06:00
Chris Hennes
bd0d0e011e Addon Manager: improve git branch changing 2025-02-07 08:52:49 -06:00
Chris Hennes
045fec3103 Merge pull request #19394 from FreeCAD/pre-commit-ci-update-config
Update Black to 25.1.0 so that it is in sync with the CI. Updates code to correspond to new Black standards, mostly changing the Addon Manager to eliminate spaces around docstrings.
2025-02-07 08:52:20 -06:00
Chris Hennes
995c7a8736 Addon Manager: Use pip utility function
Also attempts to fix some bugs when dep installation fails.
2025-02-04 14:10:49 -06:00
Chris Hennes
b7cfb36665 Addon Manager: Create utility function to get pip 2025-02-04 14:10:49 -06:00
pre-commit-ci[bot]
17e17cccb5 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-03 22:51:14 +00:00
Tim
0db1a2e034 [AddonManager] Fix construct_git_url return urls with '.git'. (#19242)
* [AddonManager] Fix construct_git_url return urls with '.git'.
2025-01-26 06:45:14 -06:00
Chris Hennes
8a95d0e6e8 Addon Manager: refactor process_string_to_datetime (#18492)
* Addon Manager: Refactor utilities tests to remove filesystem use

* Addon Manager: Move process_date_string_to_python_datetime to utilities

Also add unit tests and modify the exception type

* Addon Manager: Add tests for other date separators

* Addon Manager: Refactor to reduce duplication

* Addon Manager: add explanation of why the function exists

* Addon Manager: use exception chaining

* Addon Manager: Remove unused test files
2024-12-23 18:01:02 +01:00
Chris Hennes
da473a54f0 Addon Manager: PythonDeps Cleanup and Testing 2024-12-16 17:51:29 +01:00
Chris Hennes
795af3f8d0 Addon Manager: Correct run_interruptable_subprocess
communicate() has to be called after a final kill() to get the output
2024-12-16 17:51:29 +01:00
Chris Hennes
057bdda46b Addon Manager: Bug fixes and license cleanup 2024-02-11 17:19:23 -06:00
Chris Hennes
5f2df54811 Addon Manager: Refactor overall top bar 2024-02-11 17:19:22 -06:00
Chris Hennes
09d7e1132d Addon Manager: Add support for codeberg.org repos 2024-02-01 14:24:47 +01:00
Ladislav Michl
1b3781c2fb Addon Manager: Qt6 fixes 2024-01-24 11:24:07 -06:00
Pesc0
20a4d40f0b addon manager: use get_python_exe from utils file 2023-11-17 02:00:25 +01:00
Adrian Insaurralde Avalos
dcddc3dc64 AddonManager: handle the case of symlinked addon when uninstalling
see #11045
2023-10-16 22:50:31 -05:00
Chris Hennes
dc834f2ae6 Addon Manager: Fix #9828, hang on no internet 2023-07-13 14:15:29 -05:00
Chris Hennes
aae9334b7f Addon Manager: Minor error handling cleanup 2023-05-21 15:50:29 -05:00
Chris Hennes
028c379238 Addon Manager: Black and lint 2023-03-31 13:46:13 -05:00
luzpaz
f2e77a903b Fix misc. grammar and whitespace 2023-03-13 15:01:05 +01:00
Chris Hennes
0b241f78f4 Addon Manager: Refactor Metadata
Create a Python-native metadata class. Includes unit tests, and some PyLint cleanup.
2023-03-10 14:25:50 -06:00
Chris Hennes
c7620a88e3 Addon Manager: Linter cleanup of utilities 2023-02-24 21:58:55 -06:00
Chris Hennes
028101d869 Addon Manager: Fix bug in dependency installer 2023-02-21 13:33:20 -06:00
Chris Hennes
0a8037a27d Addon Manager: pylint cleanup of devmode 2023-02-21 12:11:35 -06:00
Chris Hennes
4106ba71c4 Addon Manager: Add SPDX license ID to all files 2023-02-20 15:39:47 -06:00
Chris Hennes
d8df5e03e0 Addon Manager: Update license headers 2023-01-28 13:07:29 -07:00
Chris Hennes
6c1d9701eb Addon Manager: Set parent for most modals 2023-01-13 12:13:17 -06:00
Chris Hennes
a7b4a6deba Addon Manager: Fix bug in ZIP isntallation 2023-01-09 19:35:18 -06:00
Chris Hennes
b432a78a01 Addon Manager: Update to Python 3.8 2022-12-17 20:05:32 -06:00
Chris Hennes
611e13305b Addon Manager: Refactor installation code
Improve testability of installation code by refactoring it to completely
separate the GUI and non-GUI code, and to provide more robust support
for non-GUI access to some type of Addon Manager activity.
2022-12-17 17:49:13 -06:00
Chris Hennes
c28da00c15 Addon Manager: Qt6 migration part 1, use PySide
Migrate all uses of "import PySide 2" to use "import PySide" so that the
FreeCAD-provided wrappers can switch between Qt versions.
2022-11-06 13:19:36 +01:00
Chris Hennes
48307b91f5 Addon Manager: use versioned Python package dirs 2022-11-05 11:45:02 -05:00
Chris Hennes
b253f5acce Addon Manager: Use Vermin to detect min Python 2022-09-26 11:04:42 -05:00
Chris Hennes
9492849f4a Addon Manager: Pylint cleanup of utilities 2022-08-25 09:50:12 -05:00
Chris Hennes
2286635e49 Addon Manager: Refactoring and pylint cleanup 2022-08-21 14:32:15 -05:00
Chris Hennes
2e51954b2b Addon Manager: Worker refactor (round 1) 2022-08-09 10:23:26 -05:00
Chris Hennes
ec1fbb5d69 Addon Manager: Utilities pylint cleanup 2022-07-27 11:52:57 -05:00
Chris Hennes
4b1b6fff59 Addon Manager: Fix get_zip_url for non-github URLs 2022-07-27 11:46:30 -05:00
Chris Hennes
514118192a Addon Manager: Cleanup 2022-07-27 10:49:00 -05:00
Chris Hennes
044b7ed744 Addon Manager: Add dialog to manage Python deps 2022-07-27 09:59:25 -05:00
Chris Hennes
17aed10f6f Addon Manager: Renaming and cleanup 2022-02-27 22:50:54 -06:00
0penBrain
4db58c2c6e AddonManager: improve dark mode heuristic 2022-02-27 18:44:58 -06:00
Chris Hennes
27a7c60802 Addon Manager: Minor improvements to utilities 2022-02-25 20:41:03 -06:00
Chris Hennes
038d9cfb2f Addon Manager: Improve darkmode check 2022-02-24 12:05:08 -06:00
Chris Hennes
964ff6428b Addon Manager: Improve macro metadata extraction 2022-02-18 17:10:52 -06:00
Chris Hennes
994071c43b Addon Manager: Switch to QWebEngineView for README
Rather than manually parsing the output from the repo's host, the Addon Manager
now uses an embedded QWebEngineView to display the README data. This makes the
display more repo-location agnostic (rather than trying to parse the specific
code from GitHub, Gitlab, etc.). Special handling of known hosts is still
provided to improve the display of the page, but it is not required. Clicking a
link on the page still loads in a new system browser window, with the exception
of links to the FreeCAD wiki, which are loaded in the same browser. This is
expected to be used primarily to access traslated pages for Macros, so no
advanced web-browsing features are displayed (e.g. back buttons, history
access, etc.).
2022-02-02 23:42:29 -06:00
Chris Hennes
c62dc32739 Addon Manager: Translation cleanup
pylupdate does not extract translations when f-strings are used for the
translated text, so all f-strings are migrated to calls to format().
Several other minor translation issues are also addressed.

NOTE: This code has been run through the Black reformatter, which adds
trailing commas in many places that the stock Qt 5.x pylupdate does not
recognize. This code must be processed with the corrected pylupdate to
generate the correct translations.
2022-01-27 23:11:31 -06:00
Chris Hennes
e9d6a2c4a4 Addon Manager: Create NetworkManager class
To enable single-login authenticated proxy use, and simplified multi-threaded
network accesses, this commit adds a new wrapper around a QNetworkAccessManager
and includes a global instantiation of the class intended to exist for the
lifetime of the program. This instance can be used to enqueue any number of
network requests, which the manager will send out to the networking subsystem
in an appropriate manner.
2022-01-25 13:30:58 -06:00
Chris Hennes
8d96cadb69 Addon manager: install dependencies (#5376)
Addon Manager: Dependency Installation

The Addon Manager can now attempt to use pip directly to install
required packages as specified in either metadata.txt or
requirements.txt files provided by AddOns. The packages are installed
into FreeCAD.getUserAppDataDir()/AdditionalPythonPackages directory.
Only simplified requirements.txt data is supported: any version
information is stripped out, and only packages are supported (that is,
no pip arguments, included files, etc.). Further, packages are checked
against a list of allowed packages prior to being suggested for
installation. Addon authors should submit a PR to the FreeCAD repo
adding their requirements to the allowed list, for packages that are not
already on the list (this is a malware-prevention mechanism).
2022-01-21 10:19:21 -06:00
Chris Hennes
910baff0d0 Addon Manager: Remove progress object from git pull 2022-01-10 10:45:23 -06:00