Perhaps a bit of broad question, my apologies in advance. I’m willing to accept any inputs on this matter though, so feel free to point me in a direction.
I’m developing a project in vscode, and i’ve got a project setup like this.
In order to get intellisense to work i’ve added my lib, pyrevitlib, and revitstubs to my extraPythonPaths
I need to start refactoring my code a bit, move functions around perhaps etc…
I’ve created a simple ‘@deprecated’ decorator that will log a warning when said decorated function is called. But in the end, this is not really what I want, because these warnings will only get triggered if the code is run by a user.
I want to be able to scan my project for any invocations of functions with ‘deprecated’ without having to manually run every script I’ve created. I don’t want our modellers to get annoyed/scared by deprecation warnings.
I’ve looked a bit into unittesting, and using the ‘inspect’ module in a sort of ‘global deprecation test file’, but these all start raising exceptions on imports, and some exceptions in the pyRevit files because of undefined variables. (figures, since pyrevit isn’t actually running.
I’m thinking I need to look into other ways of getting this to work…
Does anyone have any suggestions?