Skip to content

Settings: simplify all the settings removing a whole old layer (dev) #9978

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

Merged
merged 9 commits into from
Feb 7, 2023

Conversation

humitos
Copy link
Member

@humitos humitos commented Feb 2, 2023

We are not using settings/dev.py since we started using Docker (settings/docker_compose.py).
However, we never updated this code.

This commit removes the extra Dev class layer by moving the required (and still used settings) into settings/test.py and settings/docker_compose.py since they were inheriting from settings/dev.py.

Related: https://github.com/readthedocs/readthedocs-ops/issues/937

We are not using `settings/dev.py` since we started using
Docker (`settings/docker_compose.py`).
However, we never updated this code.

This commit removes the extra `Dev` class layer by moving the required (and
still used settings) into `settings/test.py` and `settings/docker_compose.py`
since they were inheriting from `settings/dev.py`.
@humitos humitos requested a review from a team as a code owner February 2, 2023 17:41
@humitos humitos requested a review from stsewd February 2, 2023 17:41
@humitos
Copy link
Member Author

humitos commented Feb 2, 2023

I think I missed one setting because there are 2 test cases failing. I'll check it and push a fix.

@humitos humitos requested a review from a team as a code owner February 2, 2023 19:35
@humitos humitos requested a review from benjaoming February 2, 2023 19:35
@humitos
Copy link
Member Author

humitos commented Feb 2, 2023

Documentation is failing because we have a super complex setup 🤯 . I simplified it and removed a lot of unnecessary things in #9981. I'd like to move forward with this because it simplifies the build a lot.

* Docs: remove outdated and complex code

This commit reduces the complexity of the documentation environment by removing
the requirement of having Django installed and loaded to build the docs.

* Remove the `djangodocs` and `doc_extensions`: they load the whole Django
application unnecesarily. We need to have a bunch of requirements installed just
because of this.

* Remove defaults from "Interesting settings" because all the default were
wrong. The Django extension was loading an invalid set of settings. This page
could be completely removed as well probably.

* Remove `featureflag` role because of the same reason (loads a whole Django
project). We were using it only to show a small description of the feature
flags. I wrote that text directly in the page. Feature flags are deprecated and
this page will probably deleted soon as well.

* Remove `buildpyversions` role also. Same reason. Manually wrote the versions
supported on each Docker image. This is used for the legacy images, tho. They
won't change since we don't maintain them anymore.

* Docs: reduce requirements drastically

Since we don't depend on Django anymore we can remove the `-r pip.txt`
dependency from the documentation.

This makes the documentation just to rely on Sphinx and some other extensions
only simplifying the environment a lot and running fast.

* Docs: don't install `pip.txt`

* Docs: remove missing `djangosetting` role
@humitos humitos enabled auto-merge (squash) February 3, 2023 06:21
@humitos humitos merged commit 58e38e0 into main Feb 7, 2023
@humitos humitos deleted the humitos/settings-simplification branch February 7, 2023 09:47
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 this pull request may close these issues.

2 participants