Git Product home page Git Product logo

spotfire-python-stubs's Introduction

Spotfire Python Stubs

Tool to generate stubs for the Spotfire dlls These stubs are intended to be used by the autocomplete engine of editors like Atom, Sublime, and Visual Studio Code.

Why Spotfire Python Stubs?

The Spotfire editor for IronPython is primitive and doesn't include all the features expected of a modern IDE. While this tool doesn't attempt to solve the entire problem (e.g. debugging), it does help make the act of writing the Python code simpler. The stubs generated by this tool can be used alongside lightweight IDEs such as Atom, Sublime and Visual Studio Code to support autocomplete while writing code.

Using the Stubs

Pre-built stubs for different Spotfire versions, along with instructions on how to configure various editors can be found on Tibco's community site at https://community.tibco.com/wiki/how-use-external-editor-edit-ironpython-scripts-autocomplete-and-syntax-checking

Generating Stubs

Pre-requisites:

  • Spotfire, including all packages that you want to support autocomplete
  • IronPython - ideally 2.7 matching spotfire

You'll need to locate the Spotfire 'modules' folder, which is normally a hidden folder within your Spotfire installation. Spotfire installs all the packages associated with the running distribution within the modules folder - so you should see lots of folders suffixed with version numbers. Stubs generation relies on having a single version of each module - behaviour with multiple versions isn't predictable (you'll likely get stubs, but the may be for the older version).

This tool works with a Spotfire 'portable' install with a single version of each module stored within the modules folder - it may also work with a regular Spotfire install as long as there is only one version of each module.

Once you locate your modules folder, make sure that the IronPython folder is on the path and execute these commands (if IronPython isn't on the path you may find that entering the full path for IPY also works - this hasn't been tested).

cd <this directory> ipy -m stubs --spotfire="c:\spotfire\modules"

Credits

This project is a fork of the repository owned by Gui Talarico at https://github.com/gtalarico/ironpython-stubs, which is in turn a fork of the repository started by Gary Edwards on Gitlab. Thanks to Gui and Gary for their work getting the basics working - I've simply added wrapper code to handle traversing Spotfire's folders.

It uses PyCharm's Generator3 to create the stubs.

spotfire-python-stubs's People

Contributors

gtalarico avatar garyedwards avatar pete-thompson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.