cubes icon indicating copy to clipboard operation
cubes copied to clipboard

Type Annotations (Python 3.6)

Open Stiivi opened this issue 9 years ago • 7 comments

Add type annotations and remove all unnecessary type ambiguity.

This is backward incompatible change and will make Cubes depend on Python ≧3.6. Lower versions of python will not be supported.

Annotate:

  • [x] Workspace
  • [x] Stores
  • [ ] Metadata
    • [x] Dimension
    • [x] Cube
    • [x] Attributes
    • [ ] Providers
    • [ ] Base
  • [ ] Query
    • [x] Browser
    • [x] Cell
    • [x] Result
    • [x] Drilldown
    • [ ] Computation
    • [ ] Statutils
  • [ ] SQL query builder
    • [x] Browser
    • [ ] Expressions
    • [x] Functions
    • [ ] Logging
    • [x] Mapper
    • [x] Query
    • [x] Store
    • [ ] Utils
  • [x] Mapper
  • [x] Errors
  • [x] Logging
  • [x] Calendar
  • [x] Datastructures
  • [x] Namespace
  • [ ] Formatters
  • [ ] Ext
  • [ ] Slicer tool
  • [ ] Auth
  • [ ] Common

Tech debt

The following list is being updated as annotations are added.

  • [ ] There is temporary _ValueType, _CalculatorFunction, _RecordType type in statutils.py
  • [ ] HierarchyPath needs to be revisited (see also #409)
  • [ ] _OrderType and _OrderArgType (see also #395)

Stiivi avatar Mar 10 '17 00:03 Stiivi

Good to see that :+1:

mattyangk avatar Mar 10 '17 18:03 mattyangk

On the client side I had to rewrite the cubes.js lib in typescript just to get static type checking. Good to have it here, too. 👍🏼

martianboy avatar Mar 11 '17 06:03 martianboy

@martianboy Is that cube.js in typescript open-sourceable?

Stiivi avatar Mar 11 '17 06:03 Stiivi

@Stiivi Yes. It needs a bit of polishing and removing a few dependencies. Will publish it in a day or two.

martianboy avatar Mar 11 '17 07:03 martianboy

Collection of non-intuitive types discovered during this process.

Stiivi avatar Mar 13 '17 17:03 Stiivi

This change is needed in MyPy Typeshed to progress further with annotations of SQL browser.

More typeshed updates to come for the query builder.

Stiivi avatar Mar 19 '17 06:03 Stiivi

Removed server from the list of needed packages as it now lives in it's own repo: https://github.com/DataBrewery/slicer-flask.

See separated issue: DataBrewery/slicer-flask#1

Stiivi avatar Mar 25 '17 22:03 Stiivi