You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-15Lines changed: 43 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,38 +118,66 @@ For example, here we use the
118
118
> [!IMPORTANT]
119
119
> The CDP modules expect standard CDP authentication configurations, e.g. `CDP_PROFILE`, as described by the *Configuring* section of [CDP CLI/SDK](https://github.com/cloudera/cdpcli#configuring).
120
120
121
-
## Building the Collection
121
+
## Building and Developing the Collection
122
122
123
-
To create a local collection tarball, run:
123
+
To develop the collection -- additions, updates, bugfixes, etc. -- or to build resources from the collections -- API documentation, etc. -- you must first install [Hatch](https://hatch.pypa.io/latest/) according to your specific development environment.
124
124
125
125
```bash
126
-
ansible-galaxy collection build
126
+
# As a Python application
127
+
pip install hatch
128
+
129
+
# With Brew (OSX)
130
+
brew install hatch
131
+
132
+
# On Fedora
133
+
sudo dnf install hatch
127
134
```
128
135
129
-
## Building the API Documentation
136
+
### Developing Collection Resources
130
137
131
-
To create a local copy of the API documentation, first make sure the collection is in your `ANSIBLE_COLLECTIONS_PATHS`. Then run the following:
138
+
To set up a development environment, you can first use the following to install the Python dependencies:
132
139
133
140
```bash
134
-
# change into the /docsbuild directory
135
-
cd docsbuild
141
+
hatch shell
142
+
```
143
+
144
+
This will create a `hatch`-managed virtual environment. (You can also associate this Python environment with your IDE, like VSCode!)
145
+
146
+
> [!TIP]
147
+
> You also need to ensure the collection's project directory is in your `ANSIBLE_COLLECTIONS_PATH` variable.
148
+
149
+
While you develop and work on collection resources, you can easily execute checks and linters with the following command:
150
+
151
+
```bash
152
+
hatch run lint
153
+
```
136
154
137
-
# install the build requirements (antsibull-docs); you may want to set up a
This script will run a number of `pre-commit` hooks, including `ansible-lint`, as well as lint any API documentation, guides, and other resources.
140
156
141
-
# Install the collection's build dependencies
142
-
pip install -r requirements.txt
157
+
If you wish to contribute your changes, please check out the instructions in the [CONTRIBUTING](./CONTRIBUTING.md) guide.
143
158
144
-
# Then run the build script
145
-
./build.sh
159
+
### Building the API Documentation
160
+
161
+
To create a local copy of the API documentation, first make sure the project, i.e. the collection, is in your `ANSIBLE_COLLECTIONS_PATH`. Then run the following:
162
+
163
+
```bash
164
+
hatch run docs:build
146
165
```
147
166
148
167
Your local documentation will be found at `docsbuild/build/html`.
149
168
169
+
170
+
### Building the Collection Bundle
171
+
172
+
To create a local collection tarball, run:
173
+
174
+
```bash
175
+
ansible-galaxy collection build
176
+
```
177
+
150
178
## License and Copyright
151
179
152
-
Copyright 2023, Cloudera, Inc.
180
+
Copyright 2025, Cloudera, Inc.
153
181
154
182
```
155
183
Licensed under the Apache License, Version 2.0 (the "License");
0 commit comments