Skip to content

[Documentation] Replace recommonmark by myst-parser #65664

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 4 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/release-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,19 @@ jobs:
release_version=$(echo "${{ github.ref_name }}" | sed 's/llvmorg-//g')
echo "release-version=$release_version" >> "$GITHUB_OUTPUT"

- name: Checkout LLVM
uses: actions/checkout@v4

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
doxygen \
graphviz \
python3-github \
python3-recommonmark \
python3-sphinx \
ninja-build \
texlive-font-utils
pip3 install --user sphinx-markdown-tables

- name: Checkout LLVM
uses: actions/checkout@v4
pip3 install --user -r ./llvm/docs/requirements.txt

- name: Create Release
run: |
Expand Down
23 changes: 4 additions & 19 deletions clang/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,11 @@
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The suffix of source filenames.
source_suffix = {
".rst": "restructuredtext",
}

try:
import recommonmark
except ImportError:
# manpages do not use any .md sources
if not tags.has("builder-man"):
raise
else:
import sphinx

if sphinx.version_info >= (3, 0):
# This requires 0.5 or later.
extensions.append("recommonmark")
else:
source_parsers = {".md": "recommonmark.parser.CommonMarkParser"}
source_suffix[".md"] = "markdown"
import sphinx

if sphinx.version_info >= (3, 0):
extensions.append("myst_parser")

# The encoding of source files.
# source_encoding = 'utf-8-sig'
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/Aliasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Aliasing in Fortran

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

## Introduction
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/ArrayComposition.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Array Composition

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

This note attempts to describe the motivation for and design of an
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/BijectiveInternalNameUniquing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Bijective Internal Name Uniquing

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

FIR has a flat namespace. No two objects may have the same name at the module
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/C++17.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# C++14/17 features used in f18

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

The C++ dialect used in this project constitutes a subset of the
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/C++style.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Flang C++ Style Guide

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

This document captures the style guide rules that are followed in the Flang codebase.
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/Calls.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Representation of Fortran function calls

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

## Procedure reference implementation protocol
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/Character.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Implementation of `CHARACTER` types in f18

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

## Kinds and Character Sets
Expand Down
4 changes: 2 additions & 2 deletions flang/docs/ComplexOperations.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Complex Operations

```eval_rst
.. contents::
```{eval-rst}
.. toctree::
:local:
```

Expand Down
7 changes: 4 additions & 3 deletions flang/docs/ControlFlowGraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Control Flow Graph

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

## Concept
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/DesignGuideline.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
-->
# Design Guideline

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```
## Documenting the design

Expand Down
7 changes: 4 additions & 3 deletions flang/docs/DoConcurrent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# `DO CONCURRENT` isn't necessarily concurrent

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

A variant form of Fortran's primary looping construct was
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/Extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Fortran Extensions supported by Flang

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

As a general principle, this compiler will accept by default and
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/FIRArrayOperations.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Design: FIR Array operations

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

## General
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/FlangDriver.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Flang drivers

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

There are two main drivers in Flang:
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/FortranFeatureHistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# A Fortran feature history cheat sheet

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

## Original IBM 704 FORTRAN
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/FortranForCProgrammers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Fortran For C Programmers

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

This note is limited to essential information about Fortran so that
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/FortranIR.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Design: Fortran IR

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

## Introduction
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/FortranLLVMTestSuite.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Fortran Tests in the LLVM Test Suite

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

The [LLVM Test Suite](https://github.com/llvm/llvm-test-suite) is a
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/GettingInvolved.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
-->
# Getting Involved

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

The Flang Project welcomes contributions of all kinds.
Expand Down
10 changes: 6 additions & 4 deletions flang/docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Getting Started

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

## Building flang
Expand Down Expand Up @@ -443,7 +444,8 @@ system to create HTML pages which would be hosted on the webpage of flang and
updated periodically.

If you would like to generate and view the HTML locally:
- Install [Sphinx](http://sphinx-doc.org/), including the [sphinx-markdown-tables](https://pypi.org/project/sphinx-markdown-tables/) extension.
- Install [Sphinx](http://sphinx-doc.org/), and the required extensions
using `pip install --user -r ~/llvm-projects/docs/requirements.txt`
- Pass `-DLLVM_ENABLE_SPHINX=ON -DSPHINX_WARNINGS_AS_ERRORS=OFF` to the cmake command.

```bash
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/IORuntimeInternals.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Fortran I/O Runtime Library Internal Design

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

This note is meant to be an overview of the design of the *implementation*
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/ImplementingASemanticCheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
-->
# How to implement a Sematic Check in Flang

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

I recently added a semantic check to the Flang compiler front end. This document
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/IntrinsicTypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# Implementation of `Intrinsic` types in f18

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

Intrinsic types are integer, real, complex, character, and logical.
Expand Down
7 changes: 4 additions & 3 deletions flang/docs/Intrinsics.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

# A categorization of standard (2018) and extended Fortran intrinsic procedures

```eval_rst
.. contents::
:local:
```{contents}
---
local:
---
```

This note attempts to group the intrinsic procedures of Fortran into categories
Expand Down
Loading