potiuk commented on a change in pull request #10377:
URL: https://github.com/apache/airflow/pull/10377#discussion_r472310228
##########
File path: docs/build_docs.py
##########
@@ -15,8 +15,8 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
Review comment:
Yes. There are several reasons for it:
1) there was a problem when I switched to Docker-build only tests in #10368
. In .dockerignore we are ignoring anything with "build" name at any level as
build artifact. Usually generated directories (including one generated by
setup.py create directories which are named "build". I could probably filter it
out, but I think generally naming anything just "build" is a dangerous one
precisely for the reason that various tools might skip or ignore it or delete
it.
2) Without the .py extension this file does not get recognized as python
file by pre-commit. This is why I had to fix a number of pylint/flake/mypy
inside it it because it was not verified before.
3) I think generally speaking running it via buid.py should be discouraged
in favour of `./breeze build-doc`. The problem is that you never know if you
have all the recent extensions installed. For example if you'd do it after
adding spellchecking it would have failed and you would have to figure out that
you have to re-rerun 'pip install .[doc]' again. For people who are casual
contributors and do it very rarely this might come as a surprise. Also they
might not remember that they have a separate virtualenv where they should build
the docs and they would loose time trying to find out what's going on. They
also might have an even older version of the virtualenv that will not work
well.
The`./breeze build-doc` - handles all the venv problems for you and will ask
you "rebuild the image" in such case,
which makes it obvious what you should do.
Actually - it's even worse now @kaxil @mik-laj - I just checked that now.
And the old instructions are wrong. `pip install -e '.[doc]'` does not work at
all:
If you do it from the scratch you get the below error. So unless we know how
to fix it, I am removing the old mechanism and replace it with breeze-only. I
see no point keeping the instructions which do not work.
```
Wrong paste. Reproducing it..
==================================================
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]