Skip to content

Design around multiple configurations in one file #4705

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

Closed
stsewd opened this issue Oct 2, 2018 · 8 comments · Fixed by #4800
Closed

Design around multiple configurations in one file #4705

stsewd opened this issue Oct 2, 2018 · 8 comments · Fixed by #4800

Comments

@stsewd
Copy link
Member

stsewd commented Oct 2, 2018

Related code https://github.com/rtfd/readthedocs.org/blob/a98441717ea50b19fe6bb0f1ea52df092dbc8190/readthedocs/config/config.py#L988-L988

I'm not sure what use case has. Maybe a monorepo? But still, rtd doesn't support that workflow (more the one doc per project).

@stsewd stsewd added the Needed: design decision A core team decision is required label Oct 2, 2018
@agjohnson
Copy link
Contributor

I'm +1 on getting rid of the logic that searches for a readthedocs.yml file. I think we should only support one top-level config file, all of the other UX patterns are weird.

  • Config in some other directory: why not just put it top level?
  • Multiple configs: which one are we supposed to use?
  • Config in submodule or something: why would you want to use it?

@stsewd
Copy link
Member Author

stsewd commented Oct 2, 2018

Oops, I think I put the wrong title here, for multiple configurations files the issue is #4669. This is for a configuration file with multiple configurations (yaml support having a top level dict)

@stsewd stsewd changed the title Design around multiple config files Design around multiple configurations in one file Oct 2, 2018
@humitos
Copy link
Member

humitos commented Oct 16, 2018

@stsewd I found this issue a bit confusing. Can you expand on the purpose of it and what it's needed to do/decide here?

@stsewd
Copy link
Member Author

stsewd commented Oct 16, 2018

Our code is designed to support several configurations in one yaml file (yaml allows to have more than one top dict), but in reality we only use the first one, so we have some dead code here, and maybe we aren't going to use it (v2 uses only one too).

@humitos
Copy link
Member

humitos commented Oct 16, 2018

I see...

So,

But still, rtd doesn't support that workflow (more the one doc per project).

RTD does not support more than one doc per project, but if the repository has multiple translations the use will import the same repo many times as different (sub)projects. In that case, we may want to allow:

  1. multiple YAML files
  2. multiple configs on the same YAML file
  3. none of the above and force to build all the projects with the same YAML since the only thing that should change on each different translation are the .po files.

I'm mentioning 3) even though it's not a problem in that particular case, but as an example that it could be useful in some weird case, maybe.

At first, it seems we could kill that code.

@agjohnson
Copy link
Contributor

I think our translations workflow needs to be ripped apart eventually. Adding a translation should not require a separate file on the repo. However, currently, you shouldn't need a separate config file for this, the language selector is in the admin UI.

We've discussed in other tickets, but translations will eventually just be another project setting (ie, just enable "Español" translation to your project like you do versions, not add a separate project).

I'm still -1 on multiple config files I think, this is in line with other services like travis and circleci

@stsewd
Copy link
Member Author

stsewd commented Oct 24, 2018

Just to be clear, this is about having multiple configs in one file p: anyway, looks like we don't have a use case for this is kind of the same as having multiples files.

@ericholscher
Copy link
Member

+1 on removing multiple configs in a single file. I don't see any use-case for this. I do see value in being able to do something like defining multiple translations for a project, but I don't think having totally different configs in a single file make sense for that currently.

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

Successfully merging a pull request may close this issue.

4 participants