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

doc: Enable Markdown doc compilation #5048

Merged
merged 28 commits into from
Feb 11, 2025

Conversation

wenzeslaus
Copy link
Member

@wenzeslaus wenzeslaus commented Feb 4, 2025

The initial commit simply uncoments the Markdown compilation lines from #3849. This requires the actual Markdown files to be present, so this breaks the CI. This will stay like this for now. The PR is mean to be tested together with the Markdown files generated by script in #4620 (switch to this branch after generating the files).

Subsequent commits will add fixes of the compilation (missing tools, files, etc.).

To test this (assuming you already have the Markdown files):

Get virtual environment in some way (venv or pipenv).

Install dependencies:

pip install -r man/mkdocs/requirements.txt

Compile everything:

make distclean && ./configure ... && make
(cd man && make build-mkdocs)

The initial commit simply uncoments the Markdown compilation lines from OSGeo#3849. This requires the actual Markdown files to be present, so this breaks the CI. This will stay like this for now. The PR is mean to be tested together with the Markdown files generated by script in OSGeo#4620 (switch to this branch after generating the files).

Subsequent commits will add fixes of the compilation (missing tools, files, etc.).
…eral and assumes that HTML will be eventually removed (the thumbnails are generated twice now, once for HTML and once of Markdown).
@github-actions github-actions bot added raster Related to raster data processing Python Related code is in Python module labels Feb 5, 2025
@github-actions github-actions bot added the GUI wxGUI related label Feb 5, 2025
wenzeslaus and others added 5 commits February 5, 2025 22:59
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@wenzeslaus wenzeslaus marked this pull request as ready for review February 7, 2025 04:02
@wenzeslaus
Copy link
Member Author

This now builds Markdown files in dist based on the HTML-based .md files in the code (without a need to generate the files). make build-mkdocs (see above) can run as well.

@wenzeslaus
Copy link
Member Author

When this is merged, ./utils/grass_html2md.sh can be easily tested in action with or without changes in #5054.

@petrasovaa
Copy link
Contributor

Looking at the previous failure on Ubuntu:

fatal: destination path 'grass-addons' already exists and is not an empty directory.
ERROR: Failed to get addons files list from the Git repository </home/runner/.grass8/addons/grass-addons>.
fatal: Not a valid object name grass8

The tests run locally. @echoix , are these tests running in parallel perhaps?

@echoix
Copy link
Member

echoix commented Feb 10, 2025

I'm not sure I understand. Can you point me on what lines of a job log you're talking about ? It shouldn't appear on the main repo...

If it's the 4 Ubuntu jobs, no, it's not in parallel, it's pure gunittest.

@echoix
Copy link
Member

echoix commented Feb 10, 2025

It only runs in parallel if it's pytest, and you use the plugin pytest-xdist.

Copy link
Contributor

@cwhite911 cwhite911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs are looking really good. I only had a few comments and suggest adding the following make command to man/Makefile for local testing.

serve-mkdocs:
	@cd $(MDDIR) ; SITE_NAME="GRASS GIS $(GRASS_VERSION_NUMBER) Reference Manual" \
	COPYRIGHT="&copy; 2003-$(GRASS_VERSION_DATE) GRASS Development Team, GRASS GIS $(GRASS_VERSION_NUMBER) Reference Manual" \
	mkdocs serve

@wenzeslaus
Copy link
Member Author

serve-mkdocs:
	@cd $(MDDIR) ; SITE_NAME="GRASS GIS $(GRASS_VERSION_NUMBER) Reference Manual" \
	COPYRIGHT="&copy; 2003-$(GRASS_VERSION_DATE) GRASS Development Team, GRASS GIS $(GRASS_VERSION_NUMBER) Reference Manual" \
	mkdocs serve

Please, create a new PR for this after this is merged.

@wenzeslaus wenzeslaus merged commit bd67b98 into OSGeo:main Feb 11, 2025
27 of 28 checks passed
@wenzeslaus wenzeslaus deleted the enable-md-compilation branch February 11, 2025 19:24
@github-actions github-actions bot added this to the 8.5.0 milestone Feb 11, 2025
wenzeslaus added a commit that referenced this pull request Feb 13, 2025
…#5098)

The original dependency handling between r.color and r.mapcalc from fd7d0ec and 9e56f6c uses dependency on binaries and builds r.mapcalc ahead of time. The new build code defines dependency between r.color and r.mapcalc subdir phony targets.

This fixes the new issue which arose in #5048 with the Markdown documentation where r.colors build failed because r.mapcalc gave permission denied. I temporarily fixed the issue in #5048 by removing r.mapcalc from SUBDIRS. However, the change broke the recompilation with distclean not tested in CI). The new approach with explicit subdir phony target dependency avoids both issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display docs general GUI wxGUI related module Python Related code is in Python raster Related to raster data processing
Projects
Development

Successfully merging this pull request may close these issues.

5 participants