Skip to content

Commit

Permalink
Fix some docs issues
Browse files Browse the repository at this point in the history
* Make landing page reachable.
* Fix order of navigation.
* Fix some broken links.
  • Loading branch information
mdellweg committed Jul 9, 2024
1 parent 071bfdc commit 4e378ab
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGES/+improve_docs_integration.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed some docs pages and improved the table of contents.
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ docs:
servedocs:
pulp-docs serve -w pulp-glue/pulp_glue -w pulpcore/cli/common/generic.py

# This is for the old docs. We may need it once more to push redirect pages.
site:
mkdocs build

pulp-glue/pulp_glue/%/locale/messages.pot: pulp-glue/pulp_glue/%/*.py
xgettext -d $* -o $@ pulp-glue/pulp_glue/$*/*.py
sed -i 's/charset=CHARSET/charset=UTF-8/g' $@
Expand All @@ -70,5 +66,5 @@ $(foreach LANGUAGE,$(LANGUAGES),pulpcore/cli/%/locale/$(LANGUAGE)/LC_MESSAGES/me
msgfmt -o $@ $<

compile_messages: $(foreach LANGUAGE,$(LANGUAGES),$(foreach GLUE_PLUGIN,$(GLUE_PLUGINS),pulp-glue/pulp_glue/$(GLUE_PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.mo)) $(foreach LANGUAGE,$(LANGUAGES),$(foreach CLI_PLUGIN,$(CLI_PLUGINS),pulpcore/cli/$(CLI_PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.mo))
.PHONY: build info black lint test docs servedocs site
.PHONY: build info black lint test docs servedocs
.PRECIOUS: $(foreach LANGUAGE,$(LANGUAGES),$(foreach GLUE_PLUGIN,$(GLUE_PLUGINS),pulp-glue/pulp_glue/$(GLUE_PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.po)) $(foreach LANGUAGE,$(LANGUAGES),$(foreach CLI_PLUGIN,$(CLI_PLUGINS),pulpcore/cli/$(CLI_PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.po))
4 changes: 2 additions & 2 deletions staging_docs/dev/guides/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ There are many ways to contribute to this project, and all are welcome.

## Get in Touch

If you want to connect with the Pulp community, ask some not-so-frequently-asked-questions or just leave general feedback, you can reach us in different ways summed up on [pulpproject.org](https://pulpproject.org/get_involved/).
If you want to connect with the Pulp community, ask some not-so-frequently-asked-questions or just leave general feedback, you can reach us in different ways summed up on [pulpproject.org](site:help/community/get-involved/).


## Doc Contributions

If you see something wrong with the docs, we welcome [documentation PRs](https://github.com/pulp/pulp-cli).

If you are using the Pulp CLI and have written end-to-end steps for Pulp workflows, we would greatly appreciate if you would contribute docs to the relevant [plugins](https://docs.pulpproject.org/pulpcore/plugins/index.html).
If you are using the Pulp CLI and have written end-to-end steps for Pulp workflows, we would greatly appreciate if you would contribute docs to the relevant [plugins](site:help/).


## Code Conventions
Expand Down
4 changes: 2 additions & 2 deletions staging_docs/dev/learn/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Pulp Glue

Pulp CLI uses the [`pulp-glue`](site:pulp-glue/docs/learn/architecture) library as an abstraction layer to perform high-level operations in pulp.
Pulp CLI uses the [`pulp-glue`](site:pulp-glue/docs/dev/learn/architecture/) library as an abstraction layer to perform high-level operations in pulp.

## Deferred Api and Entity lookup

In order to be able to access every (sub-)command's help page,
it is necessary that no code outside of the final performing command callback accesses the `api` property of the `PulpContext`.
See `pulp-glue` section about [deferred lookup](site:pulp-glue/docs/learn/architecture#deferred_api_and_entity_lookup).
See `pulp-glue` section about [deferred lookup](site:pulp-glue/docs/dev/learn/architecture/#deferred-api-and-entity-lookup).

## Plugin System

Expand Down
7 changes: 3 additions & 4 deletions staging_docs/user/index.md → staging_docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ Here you can find information about how to install the Pulp 3 CLI, and general u
Currently `pulp-cli` supports pulpcore and 6 of Pulp's plugins: `pulp_ansible`, `pulp-certguard`, `pulp_container`, `pulp_file`, `pulp_python` and `pulp_rpm`.
See section below for information on how to extend the CLI to support other Pulp plugins.

Check out the [supported workflows section](supported_workflows.md) to learn about the capabilities of the CLI.
You can find more workflow examples for the Pulp 3 CLI throughout the [plugin documentation](https://docs.pulpproject.org/pulpcore/plugins/index.html).
For example, [synchronizing a File repository](https://docs.pulpproject.org/pulp_file/workflows/sync.html).
You can find workflow examples for the Pulp 3 CLI throughout the [plugin documentation](site:help/).
For example, [synchronizing a File repository](site:/pulp_file/docs/user/guides/01-sync/).

Use the links on the left to navigate.

## CLI Plugins

The CLI can be extended via external plugins.
See the [installation](installation.md) instructions.
See the [installation](docs/user/guides/installation/) instructions.

Known plugins include:

Expand Down
3 changes: 3 additions & 0 deletions staging_docs/user/guides/_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* [Installation](installation.md)
* [Configuration](configuration.md)
* [Advanced Features](advanced_features.md)
2 changes: 1 addition & 1 deletion staging_docs/user/guides/advanced_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can specify a custom CA bundle for the connection to a Pulp server by provid
## Shell Completion

The CLI uses the click package which supports shell completion.
To configure this, check out [click's documentation](https://click.palletsprojects.com/en/8.0.x/shell_completion/).
To configure this, check out [click's documentation](https://click.palletsprojects.com/shell-completion/).
As an example, here is what to add to your `~/.bashrc` file if you're using bash:

```bash
Expand Down
2 changes: 1 addition & 1 deletion staging_docs/user/guides/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You can add optional dependencies in the usual way.
pipx install pulp-cli[pygments,shell]
```

[Additional plugins](index.md#cli-plugins) need to be injected into the apps virtual environment like this:
[Additional plugins](site:pulp-cli/#cli-plugins) need to be injected into the apps virtual environment like this:
```bash
pipx inject pulp-cli pulp-cli-deb
```
Expand Down
2 changes: 2 additions & 0 deletions staging_docs/user/reference/_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* [Using the CLI](using_the_cli.md)
* [Supported Workflows](supported_workflows.md)
3 changes: 3 additions & 0 deletions staging_docs/user/reference/supported_workflows.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Supported Workflows

!!! warning
This file is probably outdated by the time of reading it.

`pulp-cli` is still in beta, so the features and workflows listed here are subject to change.
`pulp-cli` is tested against the five most-recent pulpcore releases as of the date of the pulp-cli
release. It comes with support for five Pulp plugins: `pulp_ansible`, `pulp_container`, `pulp_file`,
Expand Down
15 changes: 12 additions & 3 deletions staging_docs/user/reference/using_the_cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

## General command syntax

In general, a pulp cli command follows the following structure:

`pulp [<global_options>] <plugin> <resource_class> [--type <resource_type>] <action> [<action_options>]`

Note that pulpcore commands omit the `<plugin>` part.

!!! Tip
**To learn about the structure of a command, you can use the `--help` option with any (in-)complete command.**

## Global options

Global options must be specified between `pulp` and the first subcommand.
Expand All @@ -14,8 +21,12 @@ Most of these can be represented by a corresponding configuration option.
| --version | Show the version and exit. | No configuration option |
| --help | Show help message and exit. | No configuration option |
| --config PATH | Specify the path of a Pulp CLI settings file to use instead of the default location. | No configuration option |
| -p, --profile TEXT | Select a [config profile](configuration.md#config-profiles) to use. | No configuration option |
| -p, --profile TEXT | Select a [config profile](site:pulp-cli/docs/user/guides/configuration/#config-profiles) to use. | No configuration option |
| --base-url TEXT | API base url of the pulp server. | |
| --api-root TEXT | Absolute API base path on server | not including 'api/v3/' |
| --domain TEXT | Domain to work in if feature is enabled | |
| --cid TEXT | Logging CID to send on requests | server configuration may require a valid GUID and ignore CIDs that aren't |
| --header TEXT | Custom header to add to each api call. Name and value are colon separated. | Can be specified multiple times. |
| --username TEXT | Username on pulp server. | |
| --password TEXT | Password on pulp server. | |
| --cert TEXT | Path to client certificate. | |
Expand All @@ -39,5 +50,3 @@ Most of these can be represented by a corresponding configuration option.
`pulp file repository update --name file_repo1 --description "Contains plain files"`

`pulp file repository destroy --name file_repo1`

To learn about the structure of a command, you can use the `--help` option with any (in-)complete command.

0 comments on commit 4e378ab

Please sign in to comment.