Skip to content

Commit

Permalink
MINOR: Fix broken links in contrib guide (#3135)
Browse files Browse the repository at this point in the history
* Replace relative URLs with absolute URLs when publishing the contributors guide

* add license
  • Loading branch information
andygrove authored Aug 16, 2022
1 parent e57dead commit ccd9406
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
# under the License.

build
temp
venv/
24 changes: 19 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
28 changes: 28 additions & 0 deletions docs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/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
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

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
4 changes: 2 additions & 2 deletions docs/source/contributor-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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._

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ccd9406

Please sign in to comment.