Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/label_pr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---

# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2024 Cloudera, Inc.
#
# 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
#
# https://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.

name: Execute Precommit Linting and Checks

on:
pull_request:
push:
branches: [main, devel]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.1
4 changes: 2 additions & 2 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ name: Publish documentation
on:
push:
branches:
- 'main'
- 'main'

workflow_dispatch:

jobs:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
branches:
- 'release/**'
- 'devel'

jobs:
validate:
runs-on: ubuntu-latest
Expand All @@ -34,7 +34,7 @@ jobs:
with:
python-version: '3.9'
cache: 'pip'

- name: Set up Ansible collections
run: |
sudo update-alternatives --install /usr/bin/python python $(which python3) 1
Expand All @@ -49,16 +49,16 @@ jobs:
ansible --version
ansible-galaxy collection list
ansible-galaxy role list

- name: Set up Ansible collection dependencies
run: |
ansible-builder introspect --write-pip final_python.txt --write-bindep final_bindep.txt /usr/share/ansible/collections
[[ -f final_python.txt ]] && pip install -r final_python.txt || echo "No Python dependencies found."
[[ -f final_bindep.txt ]] && bindep --file final_bindep.txt || echo "No system dependencies found."

- name: Report installed Python dependencies
run: pip freeze

- name: Validate collection
run: |
pushd /usr/share/ansible/collections/ansible_collections/cloudera/cloud
Expand All @@ -75,7 +75,7 @@ jobs:
run: |
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number

- name: Upload the PR number
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate_pr_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
branches:
- 'release/**'
- 'devel'

workflow_dispatch:

jobs:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,3 @@ dmypy.json

# Cython debug symbols
cython_debug/

26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2024 Cloudera, Inc.
#
# 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
#
# https://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.

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
12 changes: 11 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Thank you for considering contributions to the `cloudera.cloud` Ansible collecti

## Submitting a pull request

You can start work on issues that are not yet part of a [Milestone](https://github.com/cloudera-labs/cloudera.cloud/milestones) -- anything in our issue tracker that isn't assigned to a Milestone is considered the [backlog](https://github.com/cloudera-labs/cloudera.cloud/issues?q=is%3Aopen+is%3Aissue+no%3Amilestone).
You can start work on issues that are not yet part of a [Milestone](https://github.com/cloudera-labs/cloudera.cloud/milestones) -- anything in our issue tracker that isn't assigned to a Milestone is considered the [backlog](https://github.com/cloudera-labs/cloudera.cloud/issues?q=is%3Aopen+is%3Aissue+no%3Amilestone).

Before you start working, please announce that you want to do so by commenting on the issue. _([Create an issue](https://github.com/cloudera-labs/cloudera.cloud/issues/new?labels=enhancement) if there isn't one yet, and you can also check out our [Discussions](https://github.com/cloudera-labs/cloudera.cloud/discussions) for ideas.)_ We try to ensure that all active work is assigned to a Milestone in order to keep our backlog accurate.

Expand All @@ -21,6 +21,16 @@ As a _best practice_, you can prefix your branches with:
> [!NOTE]
> :fire_extinguisher: A **hotfix** should branch from `main`. It will then be committed to both the `main` and `devel` branches.

## Running pre-commit

We use [pre-commit](https://pre-commit.com/) to lint and validate submissions.

Setting up `pre-commit` is straightforward; see the [Installation](https://pre-commit.com/#installation) documentation on the `pre-commit` site for details.

We highly suggest you install the local `git` hook scripts as well; run `pre-commit install` within the root of the project.

Lastly, you can run the hooks prior to committing changes (and PR submission) by executing `pre-commit run -a`.

## Signing your commits

Note that we require signed commits inline with [Developer Certificate of Origin](https://developercertificate.org/) best-practices for open source collaboration.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@ 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.
limitations under the License.
9 changes: 4 additions & 5 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ nor in the manner indicated. Similarly, fulfilling a license’s compliance
requirements for a particular form of distribution is not an admission that the
software is in fact distributed in that form. Distributions and packaging vary
and not all third party components are relied upon in the same manner or degree.
In addition, some compliance documentation, such as embedded notices files in
In addition, some compliance documentation, such as embedded notices files in
source code, may be found within the distribution itself rather than below.
“Third Party Software” and “Separately Licensed Code” as defined in the
applicable Cloudera or Hortonworks agreement, respectively, have the same
Expand All @@ -29,7 +29,7 @@ operating system, which may be delivered to you with a containerized
installation of the operating system for your convenience. Cloudera software
constitutes a separate and independent work from the operating system, and the
provided container is an aggregation of the operating system and the Cloudera
software.
software.

NO WARRANTY; NO LIABILITY; NO INDEMNIFICATION/HOLD HARMLESS
Notwithstanding any agreement recipient may have with Cloudera: (A) CLOUDERA
Expand Down Expand Up @@ -71,11 +71,11 @@ request should include: (i) the name and version number of the covered binary,
license under which the source code must be provided, and (vi) your return
mailing and email address (if available).

Components:
Components:

rtfd/sphinx_rtd_theme 0.5.0 : MIT License

Licenses:
Licenses:

MIT License
(rtfd/sphinx_rtd_theme 0.5.0)
Expand All @@ -100,4 +100,3 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you have any questions, want to chat about the collection's capabilities and

## API

See the [API documentation](https://cloudera-labs.github.io/cloudera.cloud/) for details for each plugin and role within the collection.
See the [API documentation](https://cloudera-labs.github.io/cloudera.cloud/) for details for each plugin and role within the collection.

## Roadmap

Expand Down Expand Up @@ -123,7 +123,7 @@ For example, here we use the
To create a local collection tarball, run:

```bash
ansible-galaxy collection build
ansible-galaxy collection build
```

## Building the API Documentation
Expand Down
2 changes: 1 addition & 1 deletion docs/docsite/extra-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
# sections:
# - title: Usage and Configuration
# toctree:
# - usage
# - usage
2 changes: 1 addition & 1 deletion docsbuild/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

/temp-rst
/build
/rst
/rst
7 changes: 3 additions & 4 deletions docsbuild/cloudera.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
/**
* Copyright 2023 wmudge
*
*
* 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.
*/

53 changes: 28 additions & 25 deletions docsbuild/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
# documentation:
# http://www.sphinx-doc.org/en/master/config

project = 'cloudera.cloud'
copyright = 'Cloudera, Inc.'
project = "cloudera.cloud"
copyright = "Cloudera, Inc."

title = 'Cloudera Labs'
html_short_title = 'Cloudera Labs'
title = "Cloudera Labs"
html_short_title = "Cloudera Labs"

extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx_antsibull_ext']
extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx_antsibull_ext"]

pygments_style = 'ansible'
pygments_style = "ansible"

highlight_language = 'YAML+Jinja'
highlight_language = "YAML+Jinja"

html_theme = 'sphinx_ansible_theme'
html_theme = "sphinx_ansible_theme"
html_show_sphinx = False

display_version = False
Expand All @@ -40,37 +40,40 @@

# See https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#confval-intersphinx_mapping for the syntax
intersphinx_mapping = {
'python': ('https://docs.python.org/2/', (None, '../python2.inv')),
'python3': ('https://docs.python.org/3/', (None, '../python3.inv')),
'jinja2': ('http://jinja.palletsprojects.com/', (None, '../jinja2.inv')),
'ansible_devel': ('https://docs.ansible.com/ansible/devel/', (None, '../ansible_devel.inv')),
"python": ("https://docs.python.org/2/", (None, "../python2.inv")),
"python3": ("https://docs.python.org/3/", (None, "../python3.inv")),
"jinja2": ("http://jinja.palletsprojects.com/", (None, "../jinja2.inv")),
"ansible_devel": (
"https://docs.ansible.com/ansible/devel/",
(None, "../ansible_devel.inv"),
),
# If you want references to resolve to a released Ansible version (say, `5`), uncomment and replace X by this version:
# 'ansibleX': ('https://docs.ansible.com/ansible/X/', (None, '../ansibleX.inv')),
}

default_role = 'any'
default_role = "any"

nitpicky = True

html_css_files = [
'css/cloudera.css',
"css/cloudera.css",
]

html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = "%b %d, %Y"

html_theme_options = {
'vcs_pageview_mode': 'edit',
'documentation_home_url': 'https://github.com/cloudera-labs/',
'topbar_links': {
'Cloudera Data Platform (CDP)': 'https://www.cloudera.com/products/cloudera-data-platform.html',
'Documentation': 'https://docs.cloudera.com/',
'Downloads': 'https://www.cloudera.com/downloads.html',
'Training': 'https://www.cloudera.com/about/training.html',
'Certification': 'https://www.cloudera.com/about/training/certification.html',
"vcs_pageview_mode": "edit",
"documentation_home_url": "https://github.com/cloudera-labs/",
"topbar_links": {
"Cloudera Data Platform (CDP)": "https://www.cloudera.com/products/cloudera-data-platform.html",
"Documentation": "https://docs.cloudera.com/",
"Downloads": "https://www.cloudera.com/downloads.html",
"Training": "https://www.cloudera.com/about/training.html",
"Certification": "https://www.cloudera.com/about/training/certification.html",
},
'analytics_id': 'G-YMR2P5DEWR',
"analytics_id": "G-YMR2P5DEWR",
}

html_content = {
'display_github': 'True',
"display_github": "True",
}
6 changes: 3 additions & 3 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2024 Cloudera, Inc.
#
#
# 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
#
#
# https://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.
Expand Down
7 changes: 4 additions & 3 deletions plugins/doc_fragments/cdp_auth_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.


class ModuleDocFragment(object):
DOCUMENTATION = r'''
DOCUMENTATION = r"""
options:
profile:
description:
- If provided, the CDP SDK will use this value as its profile.
type: str
required: False
'''
RETURN = r''''''
"""
RETURN = r""""""
Loading