Git Product home page Git Product logo

Comments (3)

Peque avatar Peque commented on August 14, 2024 2

@sehnem Thanks for your answer.

If I understood sphinxcontrib-versioning's behavior correctly, then it would not install the package version for which it is generating the documentation? In example: when it switches from 2.0.0 to 1.0.0 to generate the old docs, it would not actually install version 1.0.0 of the package before doing so?

If so, then I think it is a risky approach and could be worse than just having a non-expected value in the |version| number.

For example, a project that executes Python code that uses the package within the documentation. Imagine Matplotlib's documentation, where the output figures are auto-generated from the docs: if the correct version of Matplotlib is not installed before generating the docs then the output could be different, wrong or generation could even fail.

@sehnem What do you think? Could I be missing something or misunderstanding the current behavior? To be honest, I have not dig into sphinxcontrib-versioning's source code.

from sphinxcontrib-versioning.

sehnem avatar sehnem commented on August 14, 2024 1

Hi,

I'm having the same problem, but I think i know of what causes it.

In the steps to reproduce the problem you install the package, then you generate the documentation. Look how you pick the version for the documentation in your conf.py:

import osbrain

release = osbrain.__version__

This way you will always pick the version of the installed version.

In the conf.py from this package the version is picked from the setup file.

release = version = __import__('setup').VERSION

I think that changing it will solve the problem for you.

In my case I am using automatic versioning, so the versions are generated after the creation of the tag and I'm not able to take this approach. If someone knows what could I do, the package is https://gitlab.com/sehnem/pynmet.

from sphinxcontrib-versioning.

sehnem avatar sehnem commented on August 14, 2024

@Peque

I have not worked a lot with this package, but I think that you cannot generate the documentation for each versions os the package since it builds all the documentation at once. If it is possible @Raythor approach should work, and it also would fix my problem.

I think that if it is not possible yet, implementing it would be useful for many applications. But maybe someone knows a way to make it work with different versions.

from sphinxcontrib-versioning.

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.