forked from delta-io/delta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Docs] Adding all the markdown source files for docs.delta.io
- Loading branch information
1 parent
d51ed45
commit 85d94f0
Showing
115 changed files
with
18,655 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Docs Generation Scripts | ||
This directory contains scripts to generate API Docs for Scala, Java, and Python. | ||
|
||
## Setup Environment | ||
### Install Conda (Skip if you already installed it) | ||
Follow [Conda Download](https://www.anaconda.com/download/) to install Anaconda. | ||
|
||
### Create an environment from environment file | ||
Follow [Create Environment From Environment file](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-from-file) to create a Conda environment from `/delta/docs/environment.yml` and activate the newly created `delta_docs` environment. | ||
|
||
``` | ||
# Note the `--file` argument should be a fully qualified path. Using `~` in file | ||
# path doesn't work. Example valid path: `/Users/macuser/delta/docs/environment.yml` | ||
conda env create --name delta_docs --file=<absolute_path_to_delta_repo>/docs/environment.yml` | ||
``` | ||
|
||
### Run Script | ||
Run `python3 <delta root>/docs/generate_api_docs.py` to generate API docs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright (2021) The Delta Lake Project Authors. | ||
* | ||
* Licensed 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. | ||
*/ | ||
|
||
/* | ||
* This file contains code from the Apache Spark project (original license above). | ||
* It contains modifications, which are licensed as follows: | ||
*/ | ||
|
||
/* | ||
* 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. | ||
*/ | ||
|
||
/* Dynamically injected style for the API docs */ | ||
|
||
.unstable { | ||
background-color: #EE4B2B; | ||
} | ||
|
||
.developer { | ||
background-color: #0047AB; | ||
} | ||
|
||
.evolving { | ||
background-color: #44751E; | ||
} | ||
|
||
.badge { | ||
font-family: Arial, san-serif; | ||
float: right; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright (2021) The Delta Lake Project Authors. | ||
* | ||
* Licensed 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. | ||
*/ | ||
|
||
/* | ||
* This file contains code from the Apache Spark project (original license above). | ||
* It contains modifications, which are licensed as follows: | ||
*/ | ||
|
||
/* | ||
* 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. | ||
*/ | ||
|
||
/* Dynamically injected post-processing code for the API docs */ | ||
|
||
$(document).ready(function() { | ||
var annotations = $("dt:contains('Annotations')").next("dd").children("span.name"); | ||
addBadges(annotations, "Unstable", ":: Unstable ::", '<span class="unstable badge">Unstable API</span>'); | ||
addBadges(annotations, "Developer", ":: DeveloperApi ::", '<span class="developer badge">Developer API</span>'); | ||
addBadges(annotations, "Evolving", ":: Evolving ::", '<span class="evolving badge">Evolving API</span>'); | ||
}); | ||
|
||
function addBadges(allAnnotations, name, tag, html) { | ||
var annotations = allAnnotations.filter(":contains('" + name + "')") | ||
var tags = $(".cmt:contains(" + tag + ")") | ||
|
||
// Remove identifier tags from comments | ||
tags.each(function(index) { | ||
var oldHTML = $(this).html(); | ||
var newHTML = oldHTML.replace(tag, ""); | ||
$(this).html(newHTML); | ||
}); | ||
|
||
// Add badges to all containers | ||
tags | ||
// Scala 2.11 docs require these | ||
.prevAll("h4.signature") | ||
.add(annotations.closest("div.fullcommenttop")) | ||
.add(annotations.closest("div.fullcomment").prevAll("h4.signature")) | ||
// Scala 2.12 docs require this | ||
.add(tags.prevAll("span.symbol")) | ||
.add(annotations.closest("div.fullcomment").prevAll("span.symbol")) | ||
.prepend(html); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright (2021) The Delta Lake Project Authors. | ||
* | ||
* Licensed 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. | ||
*/ | ||
|
||
/* | ||
* This file contains code from the Apache Spark project (original license above). | ||
* It contains modifications, which are licensed as follows: | ||
*/ | ||
|
||
/* | ||
* 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. | ||
*/ | ||
|
||
/* Dynamically injected style for the API docs */ | ||
|
||
.badge { | ||
font-family: Arial, san-serif; | ||
float: right; | ||
margin: 4px; | ||
/* The following declarations are taken from the ScalaDoc template.css */ | ||
display: inline-block; | ||
padding: 2px 4px; | ||
font-size: 11.844px; | ||
font-weight: bold; | ||
line-height: 14px; | ||
color: #ffffff; | ||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); | ||
white-space: nowrap; | ||
vertical-align: baseline; | ||
background-color: #999999; | ||
padding-right: 9px; | ||
padding-left: 9px; | ||
-webkit-border-radius: 9px; | ||
-moz-border-radius: 9px; | ||
border-radius: 9px; | ||
} | ||
|
||
.unstable { | ||
background-color: #EE4B2B; | ||
} | ||
|
||
.developer { | ||
background-color: #0047AB; | ||
} | ||
|
||
.evolving { | ||
background-color: #44751E; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* Copyright (2021) The Delta Lake Project Authors. | ||
* | ||
* Licensed 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. | ||
*/ | ||
|
||
/* | ||
* This file contains code from the Apache Spark project (original license above). | ||
* It contains modifications, which are licensed as follows: | ||
*/ | ||
|
||
/* | ||
* 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. | ||
*/ | ||
|
||
/* Dynamically injected post-processing code for the API docs */ | ||
|
||
$(document).ready(function() { | ||
addBadges(":: Unstable ::", '<span class="unstable badge">Unstable API</span>'); | ||
addBadges(":: DeveloperApi ::", '<span class="developer badge">Developer API</span>'); | ||
addBadges(":: Evolving ::", '<span class="evolving badge">Evolving API</span>'); | ||
}); | ||
|
||
function addBadges(tag, html) { | ||
var tags = $(".block:contains(" + tag + ")") | ||
|
||
// Remove identifier tags | ||
tags.each(function(index) { | ||
var oldHTML = $(this).html(); | ||
var newHTML = oldHTML.replace(tag, ""); | ||
$(this).html(newHTML); | ||
}); | ||
|
||
// Add html badge tags | ||
tags.each(function(index) { | ||
if ($(this).parent().is('td.colLast')) { | ||
$(this).parent().prepend(html); | ||
} else if ($(this).parent('li.blockList') | ||
.parent('ul.blockList') | ||
.parent('div.description') | ||
.parent().is('div.contentContainer')) { | ||
var contentContainer = $(this).parent('li.blockList') | ||
.parent('ul.blockList') | ||
.parent('div.description') | ||
.parent('div.contentContainer') | ||
var header = contentContainer.prev('div.header'); | ||
if (header.length > 0) { | ||
header.prepend(html); | ||
} else { | ||
contentContainer.prepend(html); | ||
} | ||
} else if ($(this).parent().is('li.blockList')) { | ||
$(this).parent().prepend(html); | ||
} else { | ||
$(this).prepend(html); | ||
} | ||
}); | ||
} |
Oops, something went wrong.