This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new ccd940615 MINOR: Fix broken links in contrib guide (#3135)
ccd940615 is described below
commit ccd9406155b9dbaa45aa038234e0f316dc2a98ef
Author: Andy Grove <[email protected]>
AuthorDate: Mon Aug 15 18:43:13 2022 -0600
MINOR: Fix broken links in contrib guide (#3135)
* Replace relative URLs with absolute URLs when publishing the contributors
guide
* add license
---
docs/.gitignore | 1 +
docs/README.md | 24 +++++++++++++++++++-----
docs/{.gitignore => build.sh} | 13 +++++++++++--
docs/source/contributor-guide/index.md | 4 ++--
4 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/docs/.gitignore b/docs/.gitignore
index baf488338..e1ba8440c 100644
--- a/docs/.gitignore
+++ b/docs/.gitignore
@@ -16,4 +16,5 @@
# under the License.
build
+temp
venv/
diff --git a/docs/README.md b/docs/README.md
index d41d08c18..cde904857 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -17,7 +17,11 @@
under the License.
-->
-# DataFusion docs
+# DataFusion Documentation
+
+This folder contains the source content of the [User
Guide](./source/user-guide)
+and [Contributor Guide](./source/contributor-guide). These are both published
to
+https://arrow.apache.org/datafusion/ as part of the release process.
## Dependencies
@@ -27,19 +31,29 @@ inside a Python virtualenv.
- Python
- `pip install -r requirements.txt`
-## Build
+## Build & Preview
+
+Run the provided script to build the HTML pages.
+
+```bash
+./build.sh
+```
+
+The HTML will be generated into a `build` directory.
+
+Preview the site on Linux by running this command.
```bash
-make html
+firefox build/html/index.html
```
-## Release
+## Release Process
The documentation is served through the
[arrow-site](https://github.com/apache/arrow-site/) repo. To release a new
version of the docs, follow these steps:
-1. Run `make html` inside `docs` folder to generate the docs website inside
the `build/html` folder.
+1. Run `./build.sh` inside `docs` folder to generate the docs website inside
the `build/html` folder.
2. Clone the arrow-site repo
3. Checkout to the `asf-site` branch (NOT `master`)
4. Copy build artifacts into `arrow-site` repo's `datafusion` folder with a
command such as
diff --git a/docs/.gitignore b/docs/build.sh
old mode 100644
new mode 100755
similarity index 71%
copy from docs/.gitignore
copy to docs/build.sh
index baf488338..1af99c3dc
--- a/docs/.gitignore
+++ b/docs/build.sh
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -14,6 +16,13 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+#
-build
-venv/
+set -e
+rm -rf build 2> /dev/null
+rm -rf temp 2> /dev/null
+mkdir temp
+cp -rf source/* temp/
+# replace relative URLs with absolute URLs
+sed -i
's/\.\.\/\.\.\/\.\.\//https:\/\/github.com\/apache\/arrow-datafusion\/blob\/master\//g'
temp/contributor-guide/index.md
+make SOURCEDIR=`pwd`/temp html
diff --git a/docs/source/contributor-guide/index.md
b/docs/source/contributor-guide/index.md
index c3c175496..748bc599f 100644
--- a/docs/source/contributor-guide/index.md
+++ b/docs/source/contributor-guide/index.md
@@ -154,7 +154,7 @@ Criterion integrates with Cargo's built-in [benchmark
support](https://doc.rust-
cargo bench --bench BENCHMARK_NAME
```
-A full list of benchmarks can be found [here](./datafusion/benches).
+A full list of benchmarks can be found [here](../../../datafusion/benches).
_[cargo-criterion](https://github.com/bheisler/cargo-criterion) may also be
used for more advanced reporting._
@@ -187,7 +187,7 @@ Below is a checklist of what you need to do to add a new
scalar function to Data
- [here](../../../datafusion/physical-expr/src/math_expressions.rs) for math
functions
- [here](../../../datafusion/physical-expr/src/datetime_expressions.rs) for
datetime functions
- create a new module [here](../../../datafusion/physical-expr/src) for
other functions
-- In [core/src/physical_plan](datafusion/core/src/physical_plan/functions.rs),
add:
+- In
[core/src/physical_plan](../../../datafusion/core/src/physical_plan/functions.rs),
add:
- a new variant to `BuiltinScalarFunction`
- a new entry to `FromStr` with the name of the function as called by SQL
- a new line in `return_type` with the expected return type of the function,
given an incoming type