From 3265e453bbf9ddb2f5f985c0cec46db138a1e2d0 Mon Sep 17 00:00:00 2001 From: Dejan Simic <10134699+simicd@users.noreply.github.com> Date: Sat, 10 Feb 2024 14:31:46 +0100 Subject: [PATCH 1/6] Add ASF attribution --- .gitignore | 1 + doc/source/_templates/trademark.html | 10 ++++++++++ doc/source/conf.py | 12 ++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 doc/source/_templates/trademark.html diff --git a/.gitignore b/.gitignore index b055998..274baeb 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ /package/*/apt/repositories/ /package/*/apt/tmp/ /package/docker/*.deb +/venv/ diff --git a/doc/source/_templates/trademark.html b/doc/source/_templates/trademark.html new file mode 100644 index 0000000..4f4a3c5 --- /dev/null +++ b/doc/source/_templates/trademark.html @@ -0,0 +1,10 @@ +{# Display the trademark information (which is defined in conf.py html_context). #} +{% if show_copyright and trademark %} +
+
+ +{% endif %} diff --git a/doc/source/conf.py b/doc/source/conf.py index 809f31c..7df49b5 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,8 +27,13 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'Apache Arrow Flight SQL adapter for PostgreSQL' -copyright = '2022-2023, Apache Arrow Developers' -author = 'Apache Arrow Developers' +copyright = '2019-2024, Apache Software Foundation' +trademark = [ + "Apache Arrow Flight, Arrow Flight, Apache, the Apache feather logo, and the Apache Arrow project logo", + "are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries." +] +author = 'Apache Software Foundation' + version = os.environ.get('VERSION') if not version: meson_build_path = pathlib.Path(__file__).parent / '../../meson.build' @@ -96,12 +101,15 @@ ], 'use_edit_page_button': True, 'show_nav_level': 2, + "footer_start": ["copyright", "trademark"], + "footer_end": ["sphinx-version", "theme-version"] } html_context = { 'github_user': 'apache', 'github_repo': 'arrow-flight-sql-postgresql', 'github_version': 'main', 'doc_path': 'doc/source', + 'trademark': trademark } html_static_path = ['_static'] html_favicon = "_static/favicon.ico" From f001bb1a70ee218dafe03d4b10796a1f5ddf56af Mon Sep 17 00:00:00 2001 From: Dejan Simic <10134699+simicd@users.noreply.github.com> Date: Sat, 10 Feb 2024 14:56:38 +0100 Subject: [PATCH 2/6] Add docs README --- doc/README.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++ doc/source/conf.py | 5 +-- 2 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 doc/README.md diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000..853495c --- /dev/null +++ b/doc/README.md @@ -0,0 +1,76 @@ + + +# Arrow Flight SQL Adapter for PostgreSQL Documentation + +This folder contains the source for the public documentation. +This is published to https://arrow.apache.org/flight-sql-postgresql/ by a GitHub action +when changes are merged to the main branch. + +## Dependencies + +It's recommended to install build dependencies and build the documentation +inside a Python `venv`. + +To prepare building the documentation run the following on the root level of the project: + +1. Set up virtual environment if it was not already created + ```bash + python3 -m venv venv + ``` +1. Activate virtual environment + ```bash + source venv/bin/activate + ``` +1. Install documentation dependencies + ```bash + pip install -r docs/requirements.txt + ``` + +## Build & Preview + +Run the provided script to build the HTML pages. + +```bash +cd docs +sphinx-build -M html source build +``` + +The HTML will be generated into a `build` directory. + +Preview the site on Linux by running this command. + +```bash +firefox build/html/index.html +``` + +## Release Process + +This documentation is hosted at https://arrow.apache.org/flight-sql-postgresql/ + +When the PR is merged to the `main` branch of the DataFusion +repository, a [github workflow](https://github.com/apache/arrow-flight-sql-postgresql/blob/main/.github/workflows/doc.yaml) which: + +1. Builds the html content +2. Pushes the html content to the [`asf-site`](https://github.com/apache/arrow-flight-sql-postgresql/tree/asf-site) branch in this repository. + +The Apache Software Foundation provides https://arrow.apache.org/, +which serves content based on the configuration in +[.asf.yaml](https://github.com/apache/arrow-flight-sql-postgresql/blob/main/.asf.yaml), +which specifies the target as https://arrow.apache.org/flight-sql-postgresql/. diff --git a/doc/source/conf.py b/doc/source/conf.py index 7df49b5..e8dcab5 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -22,12 +22,13 @@ import os import pathlib import re +from datetime import datetime # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -project = 'Apache Arrow Flight SQL adapter for PostgreSQL' -copyright = '2019-2024, Apache Software Foundation' +project = 'Apache Arrow Flight SQL Adapter for PostgreSQL' +copyright = f'2019-{datetime.now().year}, Apache Software Foundation' trademark = [ "Apache Arrow Flight, Arrow Flight, Apache, the Apache feather logo, and the Apache Arrow project logo", "are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries." From bb421af57b8bd43b2ad5c91edfcd4bcb6f6f3e84 Mon Sep 17 00:00:00 2001 From: Dejan Simic <10134699+simicd@users.noreply.github.com> Date: Mon, 12 Feb 2024 23:23:34 +0100 Subject: [PATCH 3/6] Apply suggestions from code review Co-authored-by: Sutou Kouhei
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 188a446..6247f52 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -28,10 +28,12 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'Apache Arrow Flight SQL adapter for PostgreSQL'
-copyright = f'2022-{datetime.now().year}, Apache Software Foundation'
-trademark = [
- "Apache Arrow Flight, Arrow Flight, Arrow Flight SQL, Apache, the Apache feather logo, and the Apache Arrow project logo",
+copyright = (f'2022-{datetime.now().year}, Apache Software Foundation\n',
+ "Apache Arrow Flight, Arrow Flight, Arrow Flight SQL, Apache, the Apache feather logo, and the Apache Arrow project logo",
"are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries."
+ )
+trademark = [
+
]
author = 'Apache Software Foundation'
@@ -102,7 +104,7 @@
],
'use_edit_page_button': True,
'show_nav_level': 2,
- "footer_start": ["copyright", "trademark"],
+ "footer_start": ["copyright"],
"footer_end": ["sphinx-version", "theme-version"]
}
html_context = {
From 3b56bd82e062f2087d2c412644239ca2c7227e79 Mon Sep 17 00:00:00 2001
From: Dejan Simic <10134699+simicd@users.noreply.github.com>
Date: Sun, 18 Feb 2024 23:11:41 +0100
Subject: [PATCH 6/6] Apply suggestions from code review
Co-authored-by: Sutou Kouhei