propelml / propel

Differential Programming in JavaScript.
http://propelml.org/
Apache License 2.0
2.71k stars 104 forks source link

Show interfaces in docs #493

Closed dangerdak closed 6 years ago

dangerdak commented 6 years ago

Params wasn’t showing up as gendoc.ts wasnt visiting interfaces (#469 ).

To show the interfaces in the docs I added visitClass in the ts.isInterfaceDeclaration check but to do this I had to change type signatures for visitClass, classElementName and visitProp - not sure if this is a bad way to do things :grimacing: I also added ts.isMethodSignature and ts.isPropertySignature checks to the visitClass function. ... Maybe there’s some nicer way to organise all this?

This caused some interfaces from deps/ to show up (eg Array and Promise) so I filtered out nodes which contain the excludes from tsconfig.json in their declarations file paths.

ConvOpts appears duplicated in the docs as it’s defined in both src/types.ts and src/layers.ts

And I’m not sure why the MinimizeResult interface is showing up in the docs despite not being exported - is this expected?

ry commented 6 years ago

It looks good! Thank you!

Regarding ConvOpts - there's actually two versions of it - which is poor design on my part. I will rename one of soon.

Regarding MinimizeResult - because sgd() is exported and sgd() depends on MinimizeResult, it is part of the public interface.

Regarding test failure. It should be fixed after rebasing.

dangerdak commented 6 years ago

Thanks for the explanations :) I rebased but that just moved the test failure along - it does pass locally and on appveyor though so it seems a bit odd that just travis thinks the generated docs have length 0. I double checked that I've rebased the latest changes and tried using the same node version as travis, and still it passes locally... not sure what else to try tbh!

ry commented 6 years ago

@dangerdak The problem is that travis builds in "/home/travis/build/propelml/propel/" and "build" is one of the excluded : )

Here's a patch I was using to debug it: https://gist.github.com/ry/4e5dc194debf3ff6d286fb82394f1789

dangerdak commented 6 years ago

aah, thank you :)

dangerdak commented 6 years ago

@ry it's passing the tests at last :relieved: - PTAL