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

Tip message for config file when already using it #5909

Closed
humitos opened this issue Jul 11, 2019 · 5 comments
Closed

Tip message for config file when already using it #5909

humitos opened this issue Jul 11, 2019 · 5 comments
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code

Comments

@humitos
Copy link
Member

humitos commented Jul 11, 2019

When the build fails, we are showing a message saying that using a .readthedocs.yml is the recommended way, even if the user is already using our config file.

Screenshot_2019-07-11_10-48-08

@humitos humitos added Improvement Minor improvement to code Accepted Accepted issue on our roadmap labels Jul 11, 2019
@stsewd
Copy link
Member

stsewd commented Jul 11, 2019

Hmm, I think this is a bug, because the build didn't reach the save config step, the config is empty. So rtd thinks it doesn't have a configuration file. Not sure how we can fix this, maybe only show the tip if the build success?

@humitos
Copy link
Member Author

humitos commented Aug 3, 2019

Can we save the config into the Build after parsing it but before validating it?

@Urth
Copy link

Urth commented Jul 9, 2021

Also note that the tip recommends .readthedocs.yml which is the deprecated form, it should read .readthedocs.yaml instead as noted in https://docs.readthedocs.io/en/stable/config-file/v2.html
Read the Docs supports configuring your documentation builds with a YAML file. The configuration file must be in the root directory of your project and be named .readthedocs.yaml.

@agjohnson
Copy link
Contributor

I'd like to move this logic out of templates entirely, it's hard to keep in sync with what we do at the model or build process level. We have recently discussed wanting more suggestions -- ie "Pin docutils!" -- and it would help to have a generic way to pass a suggestion or list of suggestions to the templates for display manipulation.

Perhaps similar to #3399 it would be fan-fucking-tastic if the build process was able to emit warnings/suggestions as we come across each during the build process. This does complicate modeling around errors/warnings on builds though, so might be a long term goal.

An fine middle step between these two is to simply do this at the build detail view level. That is, iterate over all of the suggestions we might emit and evaluate whether the suggestion is valid for a build, adding valid suggestion(s) to the template context. This way we can keep the conditional logic maintained closer to application code, and still abstract the concept of suggestions away from template display.

This is a good backend change that someone could take on to help with new templates beta.

@humitos
Copy link
Member Author

humitos commented Oct 31, 2023

I read this issue and I'm taking into consideration what we have discussed here. I'm preparing a document with my thoughts that we can polish together once I push it.

In general, we will be able to create (error, warning, tip) notifications from inside the build process and they will be attached to the Build object itself. After that, the front end will decide how/where to show them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

4 participants