diff --git a/.gitignore b/.gitignore index 4a0474ae76c..67169bd278c 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,7 @@ .idea/ .DS_Store dist/ +*.egg-info/ +__pycache__/ +_build/ +sphinx_airflow_theme/sphinx_airflow_theme/static/_gen/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1599c5b3a19..91653d61c7e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: - --comment-style - "|#|" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo files: ^\.gitmodules$|^\.gitignore$|^\.gitignore$|^Dockerfile.*$ - id: insert-license @@ -46,7 +46,7 @@ repos: - --comment-style - "/**| *| */" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo - id: insert-license name: Add licence for all shell files @@ -56,7 +56,7 @@ repos: - --comment-style - "|#|" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo - id: insert-license name: Add licence for all yaml files @@ -65,7 +65,7 @@ repos: - --comment-style - "|#|" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo - id: insert-license name: Add licence for all TOML files @@ -74,7 +74,7 @@ repos: - --comment-style - "|#|" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo - id: insert-license name: Add licence for all HTML files @@ -83,9 +83,36 @@ repos: - --comment-style - "{{/*||*/}}" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo files: ^landing-pages/site/layouts/.+\.html$ + - id: insert-license + name: Add licence for all Python files + types: [python] + args: + - --comment-style + - "|#|" + - --license-filepath + - license-templates/LICENSE.txt + - --fuzzy-match-generates-todo + - id: insert-license + name: Add license for all rst files + args: + - --comment-style + - "||" + - --license-filepath + - license-templates/LICENSE.rst + - --fuzzy-match-generates-todo + files: \.rst$ + - id: insert-license + name: Add license for all JINJA template files + files: ^sphinx_airflow_theme/.*\.html$ + args: + - --comment-style + - "{#||#}" + - --license-filepath + - license-templates/LICENSE.txt + - --fuzzy-match-generates-todo - repo: local hooks: - id: shellcheck @@ -110,22 +137,22 @@ repos: entry: ./site.sh lint-js language: system files: \.js$ - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 - hooks: - - id: check-executables-have-shebangs - - id: check-json - - id: check-merge-conflict - - id: check-toml - - id: check-yaml - - id: detect-private-key - - id: end-of-file-fixer - - id: pretty-format-json - args: - - --indent=2 - - --autofix - - --top-keys=name,version,description,repository,main,author,license,scripts - - id: mixed-line-ending - - id: requirements-txt-fixer - - id: trailing-whitespace - args: [--markdown-linebreak-ext=md] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-executables-have-shebangs + - id: check-json + - id: check-merge-conflict + - id: check-toml + - id: check-yaml + - id: detect-private-key + - id: end-of-file-fixer + - id: pretty-format-json + args: + - --indent=2 + - --autofix + - --top-keys=name,version,description,repository,main,author,license,scripts + - id: mixed-line-ending + - id: requirements-txt-fixer + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] diff --git a/landing-pages/site/assets/scss/_roadmap.scss b/landing-pages/site/assets/scss/_roadmap.scss index 2c2563e2b3e..b89090ddc7d 100644 --- a/landing-pages/site/assets/scss/_roadmap.scss +++ b/landing-pages/site/assets/scss/_roadmap.scss @@ -227,18 +227,17 @@ li.current > a { border-left: solid 4px #017cee; color: #017cee; - padding-left: 1.25em; } - li.toctree-l2 > a { + li li > a { padding-left: 2.427em; } - li.toctree-l3 > a { + li li li > a { padding-left: 4.045em; } - li.toctree-l4 > a { + li li li li > a { padding-left: 5.663em; } } diff --git a/landing-pages/src/docs-index.js b/landing-pages/src/docs-index.js new file mode 100644 index 00000000000..884ea655ddb --- /dev/null +++ b/landing-pages/src/docs-index.js @@ -0,0 +1,26 @@ +/** + * 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. + */ + +import "./js/navbarScroll"; +import "./js/drawer"; +import "./js/contentDrawer"; +import "./js/progressTracking"; +import "./js/rating"; +import "./js/makeTableResponsive"; +import "./js/tocTree"; diff --git a/landing-pages/src/js/tocTree.js b/landing-pages/src/js/tocTree.js new file mode 100644 index 00000000000..a8801d4d2b2 --- /dev/null +++ b/landing-pages/src/js/tocTree.js @@ -0,0 +1,27 @@ +/** + * 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. + */ + +Array.from(document.querySelectorAll(".toctree ul")).forEach((listElement) => { + const siblingsLinks = Array.from(listElement.parentNode.children).filter((d) => d.tagName === "A"); + siblingsLinks.forEach((linkElement) => { + const expandElement = document.createElement("span"); + expandElement.classList.add("toctree-expand"); + linkElement.insertBefore(expandElement, linkElement.firstChild); + }); +}); diff --git a/landing-pages/webpack.common.js b/landing-pages/webpack.common.js index 2d236e5cfca..d83b646fc58 100644 --- a/landing-pages/webpack.common.js +++ b/landing-pages/webpack.common.js @@ -25,7 +25,8 @@ const AssetsPlugin = require("assets-webpack-plugin"); module.exports = { entry: { - main: path.join(__dirname, "src", "index.js") + main: path.join(__dirname, "src", "index.js"), + docs: path.join(__dirname, "src", "docs-index.js") }, output: { diff --git a/license-templates/LICENSE.rst b/license-templates/LICENSE.rst new file mode 100644 index 00000000000..adf897d15d3 --- /dev/null +++ b/license-templates/LICENSE.rst @@ -0,0 +1,16 @@ +.. 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. diff --git a/license-templates.txt b/license-templates/LICENSE.txt similarity index 100% rename from license-templates.txt rename to license-templates/LICENSE.txt diff --git a/site.sh b/site.sh index 1d405f3c9c5..851bd55fae9 100755 --- a/site.sh +++ b/site.sh @@ -36,7 +36,9 @@ These are ${0} commands used in various situations: cleanup Delete the virtual environment in Docker build-image Build a Docker image with a environment install-node-deps Download all the Node dependencies - preview Starts the web server + preview-site Starts the web server with preview of the website + preview-docs Starts the web server with preview of the Sphinx theme + prepare-theme Prepares and copies files needed for the proper functioning of the sphinx theme. build-landing-pages Builds a landing pages build-site Builds a website with documentation check-site-links Checks if the links are correct in the website @@ -222,6 +224,7 @@ function build_site { EOF } + function cleanup_environment { container_status="$(docker inspect "${CONTAINER_NAME}" --format '{{.State.Status}}')" echo "Current container status: ${container_status}" @@ -241,6 +244,16 @@ function cleanup_environment { fi } +function prepare_theme { + SITE_DIST="landing-pages/dist" + THEME_GEN="sphinx_airflow_theme/sphinx_airflow_theme/static/_gen" + mkdir -p "${THEME_GEN}/css" "${THEME_GEN}/js" + cp ${SITE_DIST}/docs.*.js "${THEME_GEN}/js/docs.js" + cp ${SITE_DIST}/scss/main.min.*.css "${THEME_GEN}/css/main.min.css" + cp ${SITE_DIST}/scss/main-custom.min.*.css "${THEME_GEN}/css/main-custom.min.css" + echo "Successful copied required files" +} + if [[ "$#" -eq 0 ]]; then echo "You must provide at least one command." echo @@ -289,6 +302,9 @@ elif [[ "${CMD}" == "check-site-links" ]]; then ensure_node_module_exists ensure_that_website_is_build run_command "/opt/site/landing-pages/" ./check-links.sh +elif [[ "${CMD}" == "prepare-theme" ]]; then + ensure_that_website_is_build + prepare_theme elif [[ "${CMD}" == "lint-js" ]]; then ensure_node_module_exists if [[ "$#" -eq 0 ]]; then diff --git a/sphinx_airflow_theme/README.md b/sphinx_airflow_theme/README.md new file mode 100644 index 00000000000..0d1aaa9f48d --- /dev/null +++ b/sphinx_airflow_theme/README.md @@ -0,0 +1,20 @@ + + +# Sphinx theme for Airflow diff --git a/sphinx_airflow_theme/demo/awesome-cat.jpg b/sphinx_airflow_theme/demo/awesome-cat.jpg new file mode 100644 index 00000000000..b2fce1555a9 Binary files /dev/null and b/sphinx_airflow_theme/demo/awesome-cat.jpg differ diff --git a/sphinx_airflow_theme/demo/conf.py b/sphinx_airflow_theme/demo/conf.py new file mode 100644 index 00000000000..44cc1a5e4b6 --- /dev/null +++ b/sphinx_airflow_theme/demo/conf.py @@ -0,0 +1,77 @@ +# 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. + +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'Theme demo' +copyright = '2019, Apache Software Foundation' +author = 'Apache Software Foundation' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# Custom sidebar templates, +html_sidebars = { + '**': [ + 'version-selector.html', + 'searchbox.html', + 'globaltoc.html', + ] +} + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_airflow_theme' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] diff --git a/sphinx_airflow_theme/demo/docs.sh b/sphinx_airflow_theme/demo/docs.sh new file mode 100755 index 00000000000..3348e828dc4 --- /dev/null +++ b/sphinx_airflow_theme/demo/docs.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env 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 -euox pipefail + +MY_DIR="$(cd "$(dirname "$0")" && pwd)" +pushd "${MY_DIR}" &>/dev/null || exit 1 + +SOURCE_DIR="." +BUILD_DIR="_build" + +function usage { +cat << EOF +usage: ${0} [] + +These are ${0} commands used in various situations: + + build Build the documentation + preview Build a Docker image with a environment + help Display usage + +EOF +} + +function ensure_that_documentation_is_built { + if [[ ! -f _build/html/index.html ]] ; then + echo "Documentation is not built. Start build." + sphinx-build -M html "${SOURCE_DIR}" "${BUILD_DIR}" -E + fi +} + +function start_preview { + ensure_that_documentation_is_built + pushd "${BUILD_DIR}/html" + python -m http.server --cgi 3001 + popd +} + +if [[ "$#" -eq 0 ]]; then + echo "You must provide at least one command." + echo + usage + exit 1 +fi + + +CMD=$1 + +shift + +# Check fundamentals commands +if [[ "${CMD}" == "build" ]] ; then + sphinx-build -M html "." "_build" -E + exit 0 +elif [[ "${CMD}" == "preview" ]] ; then + start_preview + exit 0 +else + usage + exit 0 +fi + + +popd &>/dev/null || exit 1 diff --git a/sphinx_airflow_theme/demo/index.rst b/sphinx_airflow_theme/demo/index.rst new file mode 100644 index 00000000000..ab1d1330867 --- /dev/null +++ b/sphinx_airflow_theme/demo/index.rst @@ -0,0 +1,36 @@ + .. 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. + +Welcome to Theme demo's documentation! +====================================== + +AAA + +.. toctree:: + :maxdepth: 1 + :caption: References + + playground + +AAA + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/sphinx_airflow_theme/demo/playground.rst b/sphinx_airflow_theme/demo/playground.rst new file mode 100644 index 00000000000..27d251d991e --- /dev/null +++ b/sphinx_airflow_theme/demo/playground.rst @@ -0,0 +1,600 @@ + .. 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. + +Playground +========== + +.. contents:: Content + :local: + :depth: 1 + +Inline markup +""""""""""""" + +*text* - emphasis (italics), +**text** - emphasis (boldface), and +``text`` - code samples. + + +List and quotes blocks +"""""""""""""""""""""" + +* This is a bulleted list. +* It has two items, the second + item uses two lines. + +1. This is a numbered list. +2. It has two items too. + +#. This is a numbered list. +#. It has two items too. + +* this is +* a list + + * with a nested list + * and some subitems + +* and here the parent list continues + +Subsection +'''''''''' + +Subsubsection +------------- + +Definitions list +"""""""""""""""" + +term (up to a line of text) + Definition of the term, which must be indented + + and can even consist of multiple paragraphs + +next term + Description. + +Parameter list +"""""""""""""" + +:Date: 2001-08-16 +:Version: 1 +:Authors: - Me + - Myself + - I +:Indentation: Since the field marker may be quite long, the second + and subsequent lines of the field body do not have to line up + with the first line, but they must be indented relative to the + field name marker, and they must line up with each other. +:Parameter i: integer + +Option list +""""""""""" + +-a Output all. +-b Output both (this description is + quite long). +-c arg Output just arg. +--long Output all day long. + +-p This option has two paragraphs in the description. + This is the first. + + This is the second. Blank lines may be omitted between + options (as above) or left in (as here and below). + +--very-long-option A VMS-style option. Note the adjustment for + the required two spaces. + +--an-even-longer-option + The description can also start on the next line. + +-2, --two This option has two variants. + +-f FILE, --file=FILE These two options are synonyms; both have + arguments. + +/V A VMS/DOS-style option. + +Literal blocks +"""""""""""""" + +This is a typical paragraph. An indented literal block follows. + +:: + + for a in [5,4,3,2,1]: # this is program code, shown as-is + print a + print "it's..." + # a literal block continues until the indentation ends + +This text has returned to the indentation of the first paragraph, +is outside of the literal block, and is therefore treated as an +ordinary paragraph. + + +Quoted literal blocks +""""""""""""""""""""" + +John Doe wrote:: + +>> Great idea! +> +> Why didn't I think of that? + +You just did! ;-) + + +Doc test blocks +""""""""""""""" + +This is an ordinary paragraph. + +>>> print 'this is a Doctest block' +this is a Doctest block + +The following is a literal block:: + + >>> This is not recognized as a doctest block by + reStructuredText. It *will* be recognized by the doctest + module, though! + + +Grid tables +""""""""""" + ++------------------------+------------+----------+----------+ +| Header row, column 1 | Header 2 | Header 3 | Header 4 | +| (header rows optional) | | | | ++========================+============+==========+==========+ +| body row 1, column 1 | column 2 | column 3 | column 4 | ++------------------------+------------+----------+----------+ +| body row 2 | Cells may span columns. | ++------------------------+------------+---------------------+ +| body row 3 | Cells may | - Table cells | ++------------------------+ span rows. | - contain | +| body row 4 | | - body elements. | ++------------------------+------------+---------------------+ + + +Footnotes +""""""""" + +[#]_ is a reference to footnote 1, and [#]_ is a reference to +footnote 2. + +.. [#] This is footnote 1. +.. [#] This is footnote 2. +.. [#] This is footnote 3. + +[#]_ is a reference to footnote 3. + + +[2]_ will be "2" (manually numbered), +[#]_ will be "3" (anonymous auto-numbered), and +[#label]_ will be "1" (labeled auto-numbered). + +.. [2] This footnote is labeled manually, so its number is fixed. + +.. [#label] This autonumber-labeled footnote will be labeled "1". + It is the first auto-numbered footnote and no other footnote + with label "1" exists. The order of the footnotes is used to + determine numbering, not the order of the footnote references. + +.. [#] This footnote will be labeled "3". It is the second + auto-numbered footnote, but footnote label "2" is already used. + + +Here is a citation reference: [CIT2002]_. + +.. [CIT2002] This is the citation. It's just like a footnote, + except the label is textual. + + +Para. + +---------- + +Para. + + +Admonitions +""""""""""" + +.. attention:: + Beware killer rabbits! + +.. caution:: + Beware killer rabbits! + +.. danger:: + Beware killer rabbits! + +.. error:: + Beware killer rabbits! + +.. hint:: + Beware killer rabbits! + +.. important:: + Beware killer rabbits! + +.. note:: + Beware killer rabbits! + +.. tip:: + Beware killer rabbits! + +.. warning:: + Beware killer rabbits! + + +.. note:: This is a note admonition. + This is the second line of the first paragraph. + + - The note contains all indented body elements + following. + - It includes this bullet list. + + +.. versionadded:: 2.5 + The *spam* parameter. + +.. versionchanged:: 2.5 + The *spam* parameter. + +.. deprecated:: 2.5 + The *spam* parameter. + + +.. seealso:: + + Module :py:mod:`zipfile` + Documentation of the :py:mod:`zipfile` standard module. + + `GNU tar manual, Basic Tar Format `_ + Documentation for tar archive files, including GNU tar extensions. + +.. seealso:: modules :py:mod:`zipfile`, :py:mod:`tarfile` + +.. rubric:: AAAAAA + + +.. glossary:: + + environment + A structure where information about all documents under the root is + saved, and used for cross-referencing. The environment is pickled + after the parsing stage, so that successive runs only need to read + and parse new and changed documents. + + source directory + The directory which, including its subdirectories, contains all + source files for one Sphinx project. + +Figure +"""""" + +.. figure:: awesome-cat.jpg + :scale: 10 % + :alt: Photo by Jae Park on Unsplash + + Awesome cat because everyone loves cats. + + +Topic +""""" + +.. topic:: Topic Title + + Subsequent indented lines comprise + the body of the topic, and are + interpreted as body elements. + +Sidebar +""""""" + +.. sidebar:: Sidebar Title + :subtitle: Optional Sidebar Subtitle + + Subsequent indented lines comprise + the body of the sidebar, and are + interpreted as body elements. + + +Code +"""" + +.. code:: python + + def my_function(): + "just a test" + print 8/2 + + +rubric +"""""" + +.. rubric:: I like kitty + +Epigraph +"""""""" + +.. epigraph:: + + No matter where you go, there you are. + + -- Buckaroo Banzai + + +compound +"""""""" + + +.. compound:: + + The 'rm' command is very dangerous. If you are logged + in as root and enter :: + + cd / + rm -rf * + + you will erase the entire contents of your file system. + + +Table of Contents +""""""""""""""""" + +.. contents:: Table of Contents + + +Awesome +""""""" + +.. header:: This space for rent. + + +Replacement Text +"""""""""""""""" + +.. |reST| replace:: reStructuredText + +Yes, |reST| is a long word, so I can't blame anyone for wanting to +abbreviate it. + + +I recommend you try |Python|_. + +.. |Python| replace:: Python, *the* best language around +.. _Python: http://www.python.org/ + + +Unicode Character Codes +""""""""""""""""""""""" + +Copyright |copy| 2003, |BogusMegaCorp (TM)| |---| +all rights reserved. + +.. |copy| unicode:: 0xA9 .. copyright sign +.. |BogusMegaCorp (TM)| unicode:: BogusMegaCorp U+2122 + .. with trademark sign +.. |---| unicode:: U+02014 .. em dash + :trim: + + +Date +"""" + +.. |date| date:: +.. |time| date:: %H:%M + +Today's date is |date|. + +This document was generated on |date| at |time|. + + +Roles +""""" +:envvar:`envvar` + +... is installed in :file:`/usr/lib/python2.{x}/site-packages` ... + +The function :py:func:`datetime.datetime.today()` does a similar thing. + +The function :py:class:`datetime.datetime` does a similar thing. + +The function :py:class:`datetime.INVALID` does a similar thing. + + +Class description +""""""""""""""""" + +https://airflow.readthedocs.io/en/latest/_api/airflow/contrib/hooks/gcp_api_base_hook/index.html + +.. py:class:: GoogleCloudBaseHookDDD(gcp_conn_id:str='google_cloud_default', delegate_to:str=None) + + Bases: :class:`airflow.hooks.base_hook.BaseHook` + + A base hook for Google cloud-related hooks. Google cloud has a shared REST + API client that is built in the same way no matter which service you use. + This class helps construct and authorize the credentials needed to then + call googleapiclient.discovery.build() to actually discover and build a client + for a Google cloud service. + + The class also contains some miscellaneous helper functions. + + All hook derived from this base hook use the 'Google Cloud Platform' connection + type. Three ways of authentication are supported: + + Default credentials: Only the 'Project Id' is required. You'll need to + have set up default credentials, such as by the + ``GOOGLE_APPLICATION_DEFAULT`` environment variable or from the metadata + server on Google Compute Engine. + + JSON key file: Specify 'Project Id', 'Keyfile Path' and 'Scope'. + + Legacy P12 key files are not supported. + + JSON data provided in the UI: Specify 'Keyfile JSON'. + + :param gcp_conn_id: The connection ID to use when fetching connection info. + :type gcp_conn_id: str + :param delegate_to: The account to impersonate, if any. + For this to work, the service account making the request must have + domain-wide delegation enabled. + :type delegate_to: str + + .. py:function:: send_message(sender, recipient, message_body, [priority=1]) + + Send a message to a recipient + + :param str sender: The person sending the message + :param str recipient: The recipient of the message + :param str message_body: The body of the message + :param priority: The priority of the message, can be a number 1-5 + :type priority: integer or None + :return: the message id + :rtype: int + :raises ValueError: if the message_body exceeds 160 characters + :raises TypeError: if the message_body is not a basestring + + .. py:staticmethod:: send_message + + Send a message to a recipient + + .. py:staticmethod:: send_message + + Send a message to a recipient + + .. py:classmethod:: send_message + + Send a message to a recipient + + .. py:decorator:: send_message + + Send a message to a recipient + + .. py:decoratormethod:: send_message + + Send a message to a recipient + + + .. attribute:: project_id + + + Returns project id. + + :return: id of the project + :rtype: str + + + .. attribute:: num_retries + + + Returns num_retries from Connection. + + :return: the number of times each API request should be retried + :rtype: int + + + .. attribute:: client_info + + + Return client information used to generate a user-agent for API calls. + + It allows for better errors tracking. + + This object is only used by the google-cloud-* libraries that are built specifically for + the Google Cloud Platform. It is not supported by The Google APIs Python Client that use Discovery + based APIs. + + + .. attribute:: scopes + + + Return OAuth 2.0 scopes. + + :return: Returns the scope defined in the connection configuration, or the default scope + :rtype: Sequence[str] + + + + .. method:: _get_credentials_and_project_id(self) + + Returns the Credentials object for Google API and the associated project_id + + + + + .. method:: _get_credentials(self) + + Returns the Credentials object for Google API + + + + + .. method:: _get_access_token(self) + + Returns a valid access token from Google API Credentials + + + + + .. method:: _authorize(self) + + Returns an authorized HTTP object to be used to build a Google cloud + service hook connection. + + + + + .. method:: _get_field(self, f:str, default:Any=None) + + Fetches a field from extras, and returns it. This is some Airflow + magic. The google_cloud_platform hook type adds custom UI elements + to the hook page, which allow admins to specify service_account, + key_path, etc. They get formatted as shown below. + + + + + .. staticmethod:: catch_http_exception(func:Callable[..., RT]) + + Function decorator that intercepts HTTP Errors and raises AirflowException + with more informative message. + + + + + .. staticmethod:: fallback_to_default_project_id(func:Callable[..., RT]) + + Decorator that provides fallback for Google Cloud Platform project id. If + the project is None it will be replaced with the project_id from the + service account the Hook is authenticated with. Project id can be specified + either via project_id kwarg or via first parameter in positional args. + + :param func: function to wrap + :return: result of the function call + + + + + .. staticmethod:: provide_gcp_credential_file(func:Callable[..., RT]) + + Function decorator that provides a ``GOOGLE_APPLICATION_CREDENTIALS`` + environment variable, pointing to file path of a JSON file of service + account key. diff --git a/sphinx_airflow_theme/setup.py b/sphinx_airflow_theme/setup.py new file mode 100644 index 00000000000..c466748a12f --- /dev/null +++ b/sphinx_airflow_theme/setup.py @@ -0,0 +1,86 @@ +# 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. + +import os +from setuptools import setup + +REQUIRED_ADDITIONAL_FILES=[ + "sphinx_airflow_theme/static/_gen/css/main.min.css", + "sphinx_airflow_theme/static/_gen/css/main-custom.min.css", + "sphinx_airflow_theme/static/_gen/js/docs.js""" +] +missing_files = [ + f + for f in REQUIRED_ADDITIONAL_FILES + if not os.path.isfile(f) +] +if missing_files: + raise Exception( + "Missing files: {}. You need copy these files from dist of website.".format(missing_files) + ) + +with open('README.md', encoding='utf-8') as file: + long_description = file.read() + +setup( + name='sphinx_airflow_theme', + version='0.0.01', + url='https://github.com/apache/airflow-site/tree/aip-11', + license='Apache License 2.0', + author='Apache Software Foundation', + author_email='dev@airflow.apache.org', + description='Airflow theme for Sphinx', + long_description=long_description, + long_description_content_type='text/markdown', + zip_safe=False, + packages=['sphinx_airflow_theme'], + package_data={'sphinx_airflow_theme': [ + 'theme.conf', + '*.html', + 'static/css/*.css', + 'static/css/fonts/*.*' + 'static/js/*.js', + ]}, + include_package_data=True, + # See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package + entry_points = { + 'sphinx.html_themes': [ + 'sphinx_airflow_theme = sphinx_airflow_theme', + ] + }, + install_requires=[ + 'sphinx' + ], + tests_require=[], + extras_require={ + 'dev': [], + }, + classifiers=[ + 'Framework :: Sphinx', + 'Framework :: Sphinx :: Theme', + 'License :: OSI Approved :: Apache Software License', + 'Environment :: Console', + 'Environment :: Web Environment', + 'Intended Audience :: Developers', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Operating System :: OS Independent', + 'Topic :: Documentation', + 'Topic :: Software Development :: Documentation', + ], +) diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/__init__.py b/sphinx_airflow_theme/sphinx_airflow_theme/__init__.py new file mode 100644 index 00000000000..71658403270 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/__init__.py @@ -0,0 +1,34 @@ +# 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. + +from os import path + +__version__ = '0.0.1' +__version_full__ = __version__ + + +def get_html_theme_path(): + """Return list of HTML theme paths.""" + cur_dir = path.abspath(path.dirname(path.dirname(__file__))) + return cur_dir + + +# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package +def setup(app): + app.add_html_theme('sphinx_airflow_theme', path.abspath(path.dirname(__file__))) + app.add_stylesheet('_gen/css//main-custom.min.css') + app.add_js_file('_gen/js/docs.js') diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/breadcrumbs.html b/sphinx_airflow_theme/sphinx_airflow_theme/breadcrumbs.html new file mode 100644 index 00000000000..14361ec2ef7 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/breadcrumbs.html @@ -0,0 +1,41 @@ +{# + 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. +#} + +{% if meta is defined and meta is not none %} + {% set check_meta = True %} +{% else %} + {% set check_meta = False %} +{% endif %} + +{% if check_meta and 'github_url' in meta %} + {% set display_github = True %} +{% endif %} + + diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/footer.html b/sphinx_airflow_theme/sphinx_airflow_theme/footer.html new file mode 100644 index 00000000000..f0a3c116423 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/footer.html @@ -0,0 +1,148 @@ +{# + 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. +#} + + diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/globaltoc.html b/sphinx_airflow_theme/sphinx_airflow_theme/globaltoc.html new file mode 100644 index 00000000000..00a552f6120 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/globaltoc.html @@ -0,0 +1,90 @@ + +{# + 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. +#} + + + + diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/header.html b/sphinx_airflow_theme/sphinx_airflow_theme/header.html new file mode 100644 index 00000000000..e5081af9fbe --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/header.html @@ -0,0 +1,171 @@ +{# + 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. +#} + +
+ + + +
diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/layout.html b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html new file mode 100644 index 00000000000..25eecb1bab6 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html @@ -0,0 +1,365 @@ +{# + 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. +#} + +{# + basic/layout.html + ~~~~~~~~~~~~~~~~~ + + Master layout template for Sphinx themes. + + :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{%- set url_root = pathto('', 1) %} +{%- if url_root == '#' %}{% set url_root = '' %}{% endif %} +{%- if not embedded and docstitle %} + {%- set titlesuffix = " — "|safe + docstitle|e %} +{%- else %} + {%- set titlesuffix = "" %} +{%- endif %} +{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %} + + + + + +{%- macro pager() %} + +{%- endmacro %} + +{%- macro rating() %} +
+

Was this entry helpful?

+
+ +
+ + + + + + +
+ +
+ + + + + + +
+ +
+ + + + + + +
+ +
+ + + + + + +
+ +
+ + + + + + +
+ +
+
+{%- endmacro %} + +{%- macro sidebar() %} +
+ {%- for sidebartemplate in sidebars %} + {%- include sidebartemplate %} + {%- endfor %} +
+{%- endmacro %} + +{%- macro mobileSidebar() %} +
+ + +
+
+
+ {%- for sidebartemplate in sidebars %} + {%- include sidebartemplate %} + {%- endfor %} +
+
+
+
+{%- endmacro %} + +{%- macro script() %} + + + + + + {%- for js in script_files %} + {{ js_tag(js) }} + {%- endfor %} +{%- endmacro %} + +{%- macro css() %} + + + {%- for css in css_files %} + {%- if css|attr("filename") %} + {{ css_tag(css) }} + {%- else %} + + {%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro sidetoc() %} + +{%- endmacro %} + +{%- if html_tag %} + {{ html_tag }} +{%- else %} + +{%- endif %} + + {%- if not html5_doctype and not skip_ua_compatible %} + + {%- endif %} + {%- if use_meta_charset or html5_doctype %} + + {%- else %} + + {%- endif %} + + {{- metatags }} + {%- block htmltitle %} + {{ title|striptags|e }}{{ titlesuffix }} + {%- endblock %} + {%- block css %} + {{- css() }} + {%- endblock %} + {%- if not embedded %} + {%- if pageurl %} + + {%- endif %} + {%- if use_opensearch %} + + {%- endif %} + {%- if favicon %} + + {%- endif %} + {%- endif %} + {%- block linktags %} + {%- if hasdoc('about') %} + + {%- endif %} + {%- if hasdoc('genindex') %} + + {%- endif %} + {%- if hasdoc('search') %} + + {%- endif %} + {%- if hasdoc('copyright') %} + + {%- endif %} + {%- if next %} + + {%- endif %} + {%- if prev %} + + {%- endif %} + {%- endblock %} + {%- block extrahead %} {% endblock %} + + +{%- block body_tag %}{% endblock %} + +{%- block header %} + {% include "header.html" %} +{% endblock %} + +{%- block content %} + +
+ {# START MOBILE SIDEBAR #} + {{ mobileSidebar() }} + {# END MOBILE SIDEBAR #} +
+ {# START SIDEBAR #} + {{ sidebar() }} + {# END SIDEBAR #} + + {# START BODY #} + +
+ {% include "breadcrumbs.html" %} + {# START CONTENT #} +
+
+ {%- block document %} +
+
+
+ {% block body %} {% endblock %} + {%- block pager %}{{ pager() }}{% endblock %} +
+ +
+
+ {%- endblock %} +
+
+ {%- block rating %}{{ rating() }}{% endblock %} + {# END CONTENT #} +
+ {# END BODY #} + + {# START SIDEBAR #} + {{ sidetoc() }} + {# END SIDEBAR #} +
+ {% include "suggest_change_button.html" %} +
+ +{%- endblock %} + +{#{%- block relbar2 %}{{ relbar() }}{% endblock %}#} + +{%- block footer %} + {% include "footer.html" %} +{%- endblock %} +{%- block scripts %} + {{- script() }} +{%- endblock %} + + diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/searchbox.html b/sphinx_airflow_theme/sphinx_airflow_theme/searchbox.html new file mode 100644 index 00000000000..4c32df8009d --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/searchbox.html @@ -0,0 +1,47 @@ +{# + 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. +#} + +
+
+ + + + + +
+
+ + + diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/searchresults.html b/sphinx_airflow_theme/sphinx_airflow_theme/searchresults.html new file mode 100644 index 00000000000..6387f64493f --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/searchresults.html @@ -0,0 +1,58 @@ +{# + 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. +#} + +

{{ _('Search') }}

+

+ From here you can search these documents. Enter your search + words into the box below and click "search". +

+
+ + + +
+ +
+ + +
+{%- if search_performed %} +

{{ _('Search Results') }}

+ {%- if not search_results %} +

{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}

+ {%- endif %} +{%- endif %} +
+ {%- if search_results %} + + {%- endif %} +
diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/suggest_change_button.html b/sphinx_airflow_theme/sphinx_airflow_theme/suggest_change_button.html new file mode 100644 index 00000000000..98ee9a768ba --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/suggest_change_button.html @@ -0,0 +1,74 @@ +{# + 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. +#} + +{% if meta is defined and meta is not none %} + {% set check_meta = True %} +{% else %} + {% set check_meta = False %} +{% endif %} + +{% if check_meta and 'github_url' in meta %} + {% set display_github = True %} +{% endif %} + +{% if check_meta and 'github_url' in meta %} + {% set display_github = True %} +{% endif %} + +{% if hasdoc(pagename) %} + {% if display_github %} + {% if check_meta and 'github_url' in meta %} + {% set github_link = meta['github_url'] %} + {% else %} + {% set github_link = 'https://' ~ github_host|default("github.com") ~ '/' ~ github_user ~ '/' ~ github_repo ~ '/' ~ theme_vcs_pageview_mode|default("blob") ~ '/' ~ github_version ~ conf_py_path ~ pagename ~ suffix %} + {% endif %} + + {% else %} + {% if source_url_prefix %} + {% set sourcce_link = source_url_prefix ~ pagename ~ suffix %} + {% elif has_source and sourcename %} + {% set sourcce_link = pathto('_sources/' + sourcename, true)|e %} + {% else %} + {% set sourcce_link = None %} + {% endif %} + + {% endif %} +{% endif %} diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/theme.conf b/sphinx_airflow_theme/sphinx_airflow_theme/theme.conf new file mode 100644 index 00000000000..577040e04a8 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/theme.conf @@ -0,0 +1,8 @@ +[theme] +inherit = basic +stylesheet = _gen/css/main.min.css +pygments_style = default + +[options] +canonical_url = +analytics_id = diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/version-selector.html b/sphinx_airflow_theme/sphinx_airflow_theme/version-selector.html new file mode 100644 index 00000000000..d5e400ad6f8 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/version-selector.html @@ -0,0 +1,33 @@ +{# + 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. +#} + +