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.

needs_external_needs: Support local needs.json

See original GitHub issue

There is a (well-hidden) option in intersphinx to load the objects.in file from a local directory or one or more mirrors. I’m looking for a way to load an external needs.json file from a local directory.

This could be solved by adding an optional setting like “json_path”, which just loads a file instead of attempting HTTP download.

Use Case:

Given two projects, A and B, which are built locally, the following can be used to generate an external-needs mapping:

|- project_A/
|  |- build
|  |  |- needs.json
|  |  |- html/
|  |- src/
|  |  |- conf.py
|- project_B/
|  |- build/
|  |  |- needs.json
|  |  |- html/
|  |- src/
|  |  |- conf.py

project_B/src/conf.py:

needs_external_needs = [{json_path = "../../project_A/build/needs.json" ...}]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
arweduscommented, Jul 28, 2021

Again: It works for me. IF you spell it file:///...

I actually wanted to create a local-build-only inter-sphinx inter-needs example project soon. It’s something you could link in the docs if you like. There are some tricks required to get it working 😉

0reactions
arweduscommented, Nov 8, 2021

@twodrops @danwos, sorry, I was out of office in October!

The json_path option works fine but the relative base path feature I requested in this comment is not yet there. I will create a new issue for it and I hope you can somehow add it to 0.7.3 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 6 - Load JSON from local
The simplest solution: import "myJSON" from "./myJson". Important update! I found, that this method stops working in newest Angular versions ...
Read more >
How to Read a JSON File in JavaScript
When fetching data from external sources or servers, you need to make sure that the data returned is in JSON format.
Read more >
Working with JSON - Learn web development | MDN
In this article, we've given you a simple guide to using JSON in your programs, including how to create and parse JSON, and...
Read more >
Loading JSON data from Cloud Storage | BigQuery
Shows how to load JSON files from Cloud Storage into a new table, or append to, or overwrite a table. Shows how to...
Read more >
Create A REST API With JSON Server | by Sebastian
Running The Server. Let's start JSON server by executing the following command: $ json-server --watch db.json. As a parameter we need ...
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