Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

needs builder: Warning about missing needs.json #340

Closed
arwedus opened this issue Jul 28, 2021 · 2 comments
Closed

needs builder: Warning about missing needs.json #340

arwedus opened this issue Jul 28, 2021 · 2 comments
Assignees
Milestone

Comments

@arwedus
Copy link
Contributor

arwedus commented Jul 28, 2021

The sphinx-build -b needs <source_dir> <output_dir> -c <conf_dir> command issues the following warning at the end:

WARNING: Could not load needs json file <conf_dir>/needs.json

not sure if the directory is actually the directory of the conf.py or just the directory that you call sphinx-build in (those happen to be the same for me). Anyhow, I have not set needs_file, so there is no "needs.json" to load from by intention.

Maybe this is related to needs_file, but then I doubt that a warning is justiefied - I simply do not need the feature store different versions in my needs.json.

@danwos danwos added this to the 0.7.2 milestone Jul 29, 2021
@danwos
Copy link
Member

danwos commented Sep 27, 2021

Ohh yes, this message is somehow misleading.

There is a default configuration, which defines where a need.json is stored.
And this file then gets reused.
If nothing is there, you get this warning.
Typically only on the first run, as this creates the needs.json, which then is reused during the next runs.

We have two options here:

  1. Keep the message, but it's not a Warning. However, it may be relevant for some use cases, where you expect an already existing needs.json.
  2. Set no default value for need_file. So a user must explicitly set this value, if it shall be used.

I would go with 2) and check, if a file like "needs.json" exists.
If this is the case, but needs_file is not set, a small hint is written. Like: "needs.json found, but it will not be used as long as needs_file is not configured".

@arwedus
Copy link
Contributor Author

arwedus commented Nov 8, 2021

I can confirm that this warning has disappeared for a clean build. Thanks @danwos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants