Open tetov opened 5 years ago
To do this I would need instructions for minification. @gtalarico Could you please give me some pointers?
I think I'll figure out the Dynamo stuff to install as well as Tekla. I pretty much only use ipy and Rhino/Grasshopper myself haha.
Releases that are pinned to dll versions would be a huge improvement.
I haven't been able to invest much time in this project, and don't anticipate this will change for a foreseeable future. I am also not using this tooling myself, so it's for me to justify allocating time to it.
You are welcome to take the lead and help improve the project as a contributor.
We can add an AUTHORS.md
to list all contributors
With regards to making new ones stubs, I never integrated the process_stubspy
into the cli api.
There is an open issue for it: https://github.com/gtalarico/ironpython-stubs/issues/7
Calls to make_stubs.py
are prepared by the cli api that is defined in __main__.py
.
https://github.com/gtalarico/ironpython-stubs/blob/master/ironstubs/__main__.py#L40
As of now, to complete the process you just have to manually run:
$ ipy - X:FullFrames ironstubs/process_stubs.py
# or something like that... don't have ipy on my mac side
process_stubs.py
looks into release/stubs
to find stubs and processes them.
I used the word "minified" in a few places but I am not sure it's a good name. It actually performs two functions:
Reduces size by removing strings that are not helpful for stubs, and were frequently recurring: https://github.com/gtalarico/ironpython-stubs/blob/master/ironstubs/process_stubs.py#L118
Split large files into smaller ones. Some large stubs (1MB+) cause jedi to choke. I solved this by splitting them into multiple files and importing them into a parent one.
For an example, compare:
\stubs\Autodesk\Revit\DB\__init__.py
and
\stubs.min\Autodesk\Revit\DB\__init__.py
That's fair. I'm not sure how much I can contribute, I think you are way ahead of me. I'll try to do what I can though. These pointers together with the source should be enough to get started.
Pinning to DLL: Look up current version from upgraded installation of application in question, and state which DLL version the release were made with? Have I got that right?
Re minification, I was expecting a 1 line file from a complicated grunt-js setup ;). Minified works I think, can't figure out anything better to call it either.
AUTHORS.md
: I'd say that it would be a bit early to add me. But do go ahead if you have other's to add to it, it's a nice thing to do.
A future possibility would be to release it as a python package on PyPi like Rhino-stubs. Then you just pip2 install the package and that should add it to path. Problem is limited support for that type of stubs package (e.g. issue on jedi-repo).
Creating a GitHub release with one of the assets being a zip file with only stubs.min could be useful for users who are not familiar with Git. We could add instructions to the wiki with a link to most recent stubs.min.
If this sounds like I good idea I'd happily set it up, I'll try to do a release with newly created stubs in that case.