Giter VIP home page Giter VIP logo

Comments (4)

kwinkunks avatar kwinkunks commented on September 20, 2024

I have semi-fixed this in develop http://bruges.readthedocs.io/en/develop/ — so it will be fixed in the next point release.

The problem is that sphinx seems to only accept the implicit module paths, e.g. bruges.reflection.reflection.shuey(). I think this is ugly and confusing. The __init__.py files provide the preferred API, e.g. bruges.reflection.shuey(). But I can't figure out how to get sphinx to use those. Advice welcome!

I guess there are a few ways to deal with this:

  • Stop trying to impose an API and just use the implicit paths (but some of them are long and ugly).
  • Get rid of the subpackages (i.e. folder in bruges/bruges) and just put all the subpaths into submodules... but this would make some of those files quite long.
  • Get rid of the whole concept of subpackages/submodules and just make bruges completely flat (more like numpy).

I guess I could take a closer look at how scipy or sklearn are organized, since that's basically the kind of namespace / structure we were going for.

from bruges.

leouieda avatar leouieda commented on September 20, 2024

@kwinkunks the flat API of numpy is all done in the __init__.py. It's better and avoids breaking things when you move stuff around inside the project. I regreted not doing this from the start in Fatiando.

But it should work. I have it working for GMT/Python. I'll take a look and see if I can get it to work. You develop against a develop branch instead of master, right?

from bruges.

leouieda avatar leouieda commented on September 20, 2024

Would you be interested in building the docs and deploying to Github pages from Travis? I can set this up if you want. A bit more work but you have total control over the deploy.

from bruges.

leouieda avatar leouieda commented on September 20, 2024

OK, I got it working. It was a change in sphinx. They removed documenting imported members by default: sphinx-doc/sphinx#3235 I had come across this before but completely forgot. The problem is that you have to build the docs in two steps. First run sphinx-autogen and then sphinx-build. autogen as an --imported-members option to generate the correct pages. I included this in the Makefile.

I don't know how this works in Read The Docs but it should work. There must be a way to customize the rtd build.

from bruges.

Related Issues (20)

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.