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

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

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
man/build_class_graphical.py Outdated Show resolved Hide resolved
man/build_class_graphical.py Outdated Show resolved Hide resolved
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

Copy link
Contributor

Choose a reason for hiding this comment

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

The topics page is functional, but we should improve the design in another PR.

@@ -44,7 +44,6 @@ SUBDIRS = \
r.latlong \
r.lake \
r.li \
r.mapcalc \
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove r.mapcalc? I was having an issue building because the previous r.mapcalc dist wasn't getting removed with make distclean, so I needed to manually remove it.

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
Status: In Progress
Development

Successfully merging this pull request may close these issues.

5 participants