question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues when conf.py invokes git

See original GitHub issue

I have been trying to use sphinx-multiversion but I am running into what seems like a blocking issue because my conf.py calls git internally. Basically, similar to https://protips.readthedocs.io/git-tag-version.html, we use git describe to get the version of the docs we should be building.

However, given what sphinx-multiversion does to copy a tree into /tmp, that fails as the tree copy isn’t a real git repo and the conf.py git commands fail.

Any suggestions on how to address this?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Holzhauscommented, Aug 6, 2020

I’ll try to come up with a PoC PR that will use git clone. By default it will use shallow clone, but that will be configurable.

1reaction
dolfinuscommented, Jul 30, 2020

Hello.

I’ve just faced with the same issue while building docs within docker container.

There is a conf.py script which fetches list of tags and passes it to Read The Docs template. If I run sphinx-multiversion on locak machine, ir works perfectly, but in case of docker container it fail due to lack of .git folder in tmp dir.

My suggestion is to provide additional script arguments for managing the way of making repo copies:

  1. If argument is not provided, behavior remains unchanged - script uses git archive. Large repositories are happy because .git dir is not copied.
  2. If arguments is provided, git clone is used. If someone is facing just the same issue with accessing .git folder, he/she will just pass this arguments and conf.py will start working as expected.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Expanded configuration mechanisms · Issue #147 - GitHub
They are grouped by concept. So within the package I have a subpackage called build , and a module for python , a...
Read more >
Python not working in the command line of git bash
Now using my gitbash shell I can browse to a directory with a python script in it and just type python theScriptName.py and...
Read more >
git-config Documentation - Git
git -config - Get and set repository or global options ... Sets the protocol version to be used when invoking the "fsmonitor" hook....
Read more >
Setup and Building - Python Developer's Guide
Configure your name and email and create an SSH key as this will allow you to interact with GitHub without typing a username...
Read more >
Getting started with the API - python-gitlab v3.12.0
python -gitlab will therefore raise a RedirectionError when it encounters a redirect which it believes will cause such an error, to avoid confusion...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found