Skip to content

Commit ed3f058

Browse files
committed
Merge branch 'develop' of https://github.com/pyrevitlabs/pyRevit into claude/loader-feature-comparison-lYDdu
2 parents e011cbd + e16430e commit ed3f058

File tree

53 files changed

+1903
-857
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1903
-857
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ jobs:
135135

136136
- name: Sign files with Trusted Signing (DLLs and EXEs)
137137
if: (github.repository == env.MainRepo)
138-
uses: azure/trusted-signing-action@v1.0.0
138+
uses: azure/trusted-signing-action@v1.1.0
139139
with:
140140
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
141141
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
@@ -145,7 +145,7 @@ jobs:
145145
certificate-profile-name: ${{ secrets.AZURE_CERT_PROFILE_NAME }}
146146

147147
files-folder: bin/
148-
files-folder-filter: pyrevit*.exe,pyrevit*.dll, pyRevit*.dll
148+
files-folder-filter: pyrevit*.exe,pyrevit*.dll,pyRevit*.dll
149149
files-folder-recurse: true
150150
file-digest: SHA256
151151
timestamp-rfc3161: http://timestamp.acs.microsoft.com
@@ -157,7 +157,7 @@ jobs:
157157
158158
- name: Sign files with Trusted Signing (installers)
159159
if: (github.repository == env.MainRepo)
160-
uses: azure/trusted-signing-action@v1.0.0
160+
uses: azure/trusted-signing-action@v1.1.0
161161
with:
162162
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
163163
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
@@ -174,7 +174,7 @@ jobs:
174174
timestamp-digest: SHA256
175175

176176
- name: Upload Installers
177-
uses: actions/upload-artifact@v6
177+
uses: actions/upload-artifact@v7
178178
with:
179179
name: pyrevit-installers
180180
path: |

Pipfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ verify_ssl = true
55

66
[dev-packages]
77
mypy = "*"
8-
pylint = "==4.0.4"
8+
pylint = "==4.0.5"
99

1010
[packages]
1111
docopt = "*"
1212
requests = "*"
1313
pygount = "*"
1414
pyyaml = ">=5.4"
1515
black = "*"
16-
setuptools = "==80.10.2"
16+
setuptools = "==82.0.0"
1717
mkdocs = "*"
1818
mkdocstrings = "*"
1919
mkdocstrings-python = "*"

Pipfile.lock

Lines changed: 238 additions & 322 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/pyRevitLabs.PyRevit.Runtime/EventHandling.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,11 @@ private static void ActivateUpdaterListener() {
278278
if (updaterListener == null) {
279279
updaterListener = new UpdaterListener();
280280
UpdaterRegistry.RegisterUpdater(updaterListener);
281-
UpdaterRegistry.AddTrigger(
282-
updaterListener.GetUpdaterId(),
283-
new ElementCategoryFilter(BuiltInCategory.INVALID, inverted: true),
284-
Element.GetChangeTypeAny());
281+
var updaterId = updaterListener.GetUpdaterId();
282+
var categoryFilter = new ElementCategoryFilter(BuiltInCategory.INVALID, inverted: true);
283+
UpdaterRegistry.AddTrigger(updaterId, categoryFilter, Element.GetChangeTypeAny());
284+
UpdaterRegistry.AddTrigger(updaterId, categoryFilter, Element.GetChangeTypeElementAddition());
285+
UpdaterRegistry.AddTrigger(updaterId, categoryFilter, Element.GetChangeTypeElementDeletion());
285286
}
286287
}
287288

dev/pyRevitLabs/pyRevitCLIAutoComplete/pyrevit-autocomplete.go

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ func main() {
3434
"env": complete.Command{
3535
Sub: complete.Commands{},
3636
Flags: complete.Flags{
37+
<<<<<<< HEAD
38+
=======
39+
"--json": complete.PredictNothing,
40+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
3741
"--help": complete.PredictNothing,
3842
"--log": complete.PredictNothing,
3943
"--json": complete.PredictNothing,
@@ -48,10 +52,19 @@ func main() {
4852
"clone": complete.Command{
4953
Sub: complete.Commands{},
5054
Flags: complete.Flags{
55+
<<<<<<< HEAD
5156
"--password": complete.PredictNothing,
5257
"--dest": complete.PredictNothing,
5358
"--token": complete.PredictNothing,
5459
"--help": complete.PredictNothing,
60+
=======
61+
"--token": complete.PredictNothing,
62+
"--dest": complete.PredictNothing,
63+
"--help": complete.PredictNothing,
64+
"--log": complete.PredictNothing,
65+
"--password": complete.PredictNothing,
66+
"--image": complete.PredictNothing,
67+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
5568
"--branch": complete.PredictNothing,
5669
"--log": complete.PredictNothing,
5770
"--image": complete.PredictNothing,
@@ -126,9 +139,15 @@ func main() {
126139
"update": complete.Command{
127140
Sub: complete.Commands{},
128141
Flags: complete.Flags{
142+
<<<<<<< HEAD
129143
"--password": complete.PredictNothing,
130144
"--log": complete.PredictNothing,
131145
"--token": complete.PredictNothing,
146+
=======
147+
"--token": complete.PredictNothing,
148+
"--log": complete.PredictNothing,
149+
"--password": complete.PredictNothing,
150+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
132151
},
133152
},
134153
"deployments": complete.Command{
@@ -149,17 +168,29 @@ func main() {
149168
"default": complete.Command{
150169
Sub: complete.Commands{},
151170
Flags: complete.Flags{
171+
<<<<<<< HEAD
152172
"--allusers": complete.PredictNothing,
153173
"--attached": complete.PredictNothing,
154174
"--installed": complete.PredictNothing,
175+
=======
176+
"--installed": complete.PredictNothing,
177+
"--attached": complete.PredictNothing,
178+
"--allusers": complete.PredictNothing,
179+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
155180
},
156181
},
157182
},
158183
Flags: complete.Flags{
184+
<<<<<<< HEAD
159185
"--allusers": complete.PredictNothing,
160186
"--attached": complete.PredictNothing,
161187
"--help": complete.PredictNothing,
188+
=======
189+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
162190
"--installed": complete.PredictNothing,
191+
"--attached": complete.PredictNothing,
192+
"--help": complete.PredictNothing,
193+
"--allusers": complete.PredictNothing,
163194
},
164195
},
165196
"attached": complete.Command{
@@ -186,28 +217,50 @@ func main() {
186217
"ui": complete.Command{
187218
Sub: complete.Commands{},
188219
Flags: complete.Flags{
220+
<<<<<<< HEAD
189221
"--password": complete.PredictNothing,
190222
"--log": complete.PredictNothing,
191223
"--dest": complete.PredictNothing,
192224
"--token": complete.PredictNothing,
225+
=======
226+
"--token": complete.PredictNothing,
227+
"--password": complete.PredictNothing,
228+
"--log": complete.PredictNothing,
229+
"--dest": complete.PredictNothing,
230+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
193231
},
194232
},
195233
"lib": complete.Command{
196234
Sub: complete.Commands{},
197235
Flags: complete.Flags{
236+
<<<<<<< HEAD
198237
"--password": complete.PredictNothing,
199238
"--log": complete.PredictNothing,
200239
"--dest": complete.PredictNothing,
201240
"--token": complete.PredictNothing,
241+
=======
242+
"--token": complete.PredictNothing,
243+
"--password": complete.PredictNothing,
244+
"--log": complete.PredictNothing,
245+
"--dest": complete.PredictNothing,
246+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
202247
},
203248
},
204249
},
205250
Flags: complete.Flags{
251+
<<<<<<< HEAD
206252
"--password": complete.PredictNothing,
207253
"--dest": complete.PredictNothing,
208254
"--token": complete.PredictNothing,
209255
"--help": complete.PredictNothing,
210256
"--log": complete.PredictNothing,
257+
=======
258+
"--token": complete.PredictNothing,
259+
"--dest": complete.PredictNothing,
260+
"--help": complete.PredictNothing,
261+
"--log": complete.PredictNothing,
262+
"--password": complete.PredictNothing,
263+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
211264
},
212265
},
213266
"extensions": complete.Command{
@@ -298,9 +351,15 @@ func main() {
298351
"update": complete.Command{
299352
Sub: complete.Commands{},
300353
Flags: complete.Flags{
354+
<<<<<<< HEAD
301355
"--password": complete.PredictNothing,
302356
"--log": complete.PredictNothing,
303357
"--token": complete.PredictNothing,
358+
=======
359+
"--token": complete.PredictNothing,
360+
"--log": complete.PredictNothing,
361+
"--password": complete.PredictNothing,
362+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
304363
},
305364
},
306365
},
@@ -373,9 +432,15 @@ func main() {
373432
},
374433
},
375434
Flags: complete.Flags{
435+
<<<<<<< HEAD
376436
"--supported": complete.PredictNothing,
377437
"--help": complete.PredictNothing,
378438
"--installed": complete.PredictNothing,
439+
=======
440+
"--installed": complete.PredictNothing,
441+
"--help": complete.PredictNothing,
442+
"--supported": complete.PredictNothing,
443+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
379444
},
380445
},
381446
"run": complete.Command{
@@ -389,9 +454,16 @@ func main() {
389454
"--models": complete.PredictNothing,
390455
"--help": complete.PredictNothing,
391456
"--revit": complete.PredictNothing,
457+
<<<<<<< HEAD
392458
"--allowdialogs": complete.PredictNothing,
393459
"--purge": complete.PredictNothing,
394460
"--import": complete.PredictNothing,
461+
=======
462+
"--import": complete.PredictNothing,
463+
"--help": complete.PredictNothing,
464+
"--purge": complete.PredictNothing,
465+
"--allowdialogs": complete.PredictNothing,
466+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
395467
},
396468
},
397469
"caches": complete.Command{
@@ -853,11 +925,19 @@ func main() {
853925
},
854926
},
855927
Flags: complete.Flags{
928+
<<<<<<< HEAD
856929
"--version": complete.PredictNothing,
857930
"--verbose": complete.PredictNothing,
858931
"--help": complete.PredictNothing,
859932
"--usage": complete.PredictNothing,
860933
"--debug": complete.PredictNothing,
934+
=======
935+
"--debug": complete.PredictNothing,
936+
"--help": complete.PredictNothing,
937+
"--usage": complete.PredictNothing,
938+
"--version": complete.PredictNothing,
939+
"--verbose": complete.PredictNothing,
940+
>>>>>>> e16430e8aeb8682d32a482634cd7a30273655e28
861941
},
862942
}
863943
complete.New("pyrevit", pyrevit).Run()

dev/pyRevitLoader/pyRevitAssemblyBuilder/SessionManager/ExtensionManagerService.cs

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using System.Linq;
44
using pyRevitExtensionParser;
5-
using static pyRevitExtensionParser.ExtensionParser;
5+
// using static pyRevitExtensionParser.ExtensionParser; // not currently used - all calls use fully qualified ExtensionParser.*
66

77
namespace pyRevitAssemblyBuilder.SessionManager
88
{
@@ -11,14 +11,36 @@ namespace pyRevitAssemblyBuilder.SessionManager
1111
/// </summary>
1212
public class ExtensionManagerService : IExtensionManagerService
1313
{
14+
private readonly int _revitYear;
15+
// Logger is retained for potential direct use in this class (e.g. ClearParserCaches, future methods).
16+
// Note: ExtensionParser logger is set by ServiceFactory before this service is constructed —
17+
// do NOT call ExtensionParser.SetLogger() here as that would reset it.
18+
private readonly ILogger _logger;
1419
private List<ParsedExtension>? _cachedExtensions;
1520

21+
/// <summary>
22+
/// Initialises the service with the running Revit version year for version-compatibility filtering.
23+
/// </summary>
24+
/// <param name="revitYear">
25+
/// The four-digit Revit release year (e.g. 2024). Pass 0 to disable version filtering.
26+
/// </param>
27+
/// <param name="logger">The logger instance.</param>
28+
public ExtensionManagerService(int revitYear = 0, ILogger? logger = null)
29+
{
30+
_revitYear = revitYear;
31+
_logger = logger ?? new LoggingHelper(null);
32+
}
33+
1634
/// <summary>
1735
/// Gets all parsed extensions (cached).
1836
/// </summary>
1937
private List<ParsedExtension> GetAllExtensionsCached()
2038
{
21-
return _cachedExtensions ??= ExtensionParser.ParseInstalledExtensions().ToList();
39+
if (_cachedExtensions != null)
40+
return _cachedExtensions;
41+
42+
_cachedExtensions = ExtensionParser.ParseInstalledExtensions(_revitYear).ToList();
43+
return _cachedExtensions;
2244
}
2345

2446
/// <summary>
@@ -28,7 +50,7 @@ public void ClearCache()
2850
{
2951
_cachedExtensions = null;
3052
}
31-
53+
3254
/// <summary>
3355
/// Clears all parser caches including the static caches in ExtensionParser.
3456
/// This ensures newly installed or enabled extensions are discovered on reload.
@@ -56,7 +78,7 @@ public IEnumerable<ParsedExtension> GetInstalledExtensions()
5678
public IEnumerable<ParsedExtension> GetInstalledUIExtensions()
5779
{
5880
return GetAllExtensionsCached()
59-
.Where(ext => ext.Config?.Disabled != true &&
81+
.Where(ext => ext.Config?.Disabled != true &&
6082
ext.Directory.EndsWith(ExtensionConstants.UI_EXTENSION_SUFFIX, System.StringComparison.OrdinalIgnoreCase));
6183
}
6284

@@ -67,8 +89,8 @@ public IEnumerable<ParsedExtension> GetInstalledUIExtensions()
6789
public IEnumerable<ParsedExtension> GetInstalledLibraryExtensions()
6890
{
6991
return GetAllExtensionsCached()
70-
.Where(ext => ext.Config?.Disabled != true &&
92+
.Where(ext => ext.Config?.Disabled != true &&
7193
ext.Directory.EndsWith(ExtensionConstants.LIBRARY_EXTENSION_SUFFIX, System.StringComparison.OrdinalIgnoreCase));
7294
}
7395
}
74-
}
96+
}

0 commit comments

Comments
 (0)