Skip to content

Commit

Permalink
Move docs test workflow and rm obsolete docs processes
Browse files Browse the repository at this point in the history
This does:

* Adds a docs test workflow in the ci.yml
* Removes docs test from test.yml workflow (which tests the plugin)
* Deprecate --docs feature from plugin-template
  * remove docs_test option
  * remove template/docs
  * remove template/bootstrap/docs legacy content
  * remove ci_update_docs
  * make it no-ops
* Update various info across files

Closes: #901
  • Loading branch information
pedro-psb committed Jul 26, 2024
1 parent 6f9579c commit 65c470f
Show file tree
Hide file tree
Showing 24 changed files with 85 additions and 404 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
matrix:
env:
- TEST: pulp
- TEST: docs
- TEST: azure
- TEST: gcp
- TEST: s3
Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ The following settings are stored in `template_config.yml`.
latest_release_branch A pointer to the currently latest release branch (this is automatically
updated).

docs_test Include a CI build for testing the 'make html' command for sphinx docs.

os_required_packages A list of packages to be installed on the host OS (Ubuntu) in the build
step.

Expand Down Expand Up @@ -229,12 +227,12 @@ provided by the plugin-template.

# Add Documentation to a Pulp plugin

The next step is to add documentation that can be hosted on
[Read the Docs](https://readthedocs.org/).

1. Run the `./plugin-template --docs` command to generate the docs.
The next step is to add documentation.
Pulp has a dedicated documentation tool that aggregates docs from subscribed plugins and handles
its publishing.

``$ ./plugin-template --docs PLUGIN_NAME``
To learn more about how it works and how to include your plugin, check out
[pulp-docs documentation](https://pulpproject.org/pulp-docs/docs/dev/).

## Discoverability

Expand Down Expand Up @@ -263,7 +261,7 @@ pulpcore.plugin.PulpPluginAppConfig]({{ plugin_name | snake }}/app/__init__.py)

# Customizing Plugin Behavior

First, look at the [overview](https://docs.pulpproject.org/pulpcore/plugins/plugin-writer/concepts/index.html) of Pulp Models to understand how Pulp fits these pieces together.
First, look at the [overview](https://pulpproject.org/pulpcore/docs/dev/learn/plugin-concepts/) of Pulp Models to understand how Pulp fits these pieces together.

Bootstrapping created various new endpoints (e.g. remote, repository and content).
Additional information should be added to these to tell Pulp how to handle your content.
Expand Down
22 changes: 12 additions & 10 deletions plugin-template
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,12 @@ DEFAULT_SETTINGS = {
"ci_base_image": "ghcr.io/pulp/pulp-ci-centos9",
"ci_env": {},
"ci_trigger": "{pull_request: {branches: ['*']}}",
"ci_update_docs": True,
"core_import_allowed": [],
"deploy_client_to_pypi": True,
"deploy_client_to_rubygems": True,
"deploy_to_pypi": True,
"disabled_redis_runners": [],
"doc_requirements_from_pulpcore": False,
"docker_fixtures": False,
"docs_test": True,
"flake8_ignore": [],
"flake8": True,
"github_org": "pulp",
Expand Down Expand Up @@ -124,6 +121,12 @@ DEPRECATED_FILES = {
],
}

DOCS_OPTION_DEPRECATION_INFO = """\
'--docs' option is deprecated (July, 2024):
Most docs intervention are now handled by pulp-docs.
See https://github.com/pulp/pulp-docs.\
"""


def main():
parser = argparse.ArgumentParser(
Expand Down Expand Up @@ -194,9 +197,11 @@ def main():
"--docs",
action="store_true",
help=textwrap.dedent(
"""\
f"""\
Generate or update plugin documentation.
{DOCS_OPTION_DEPRECATION_INFO}
"""
),
)
Expand Down Expand Up @@ -276,12 +281,6 @@ def main():
"\nLoaded plugin template config from "
"{path}/template_config.yml.\n".format(path=plugin_root_dir)
)
if not config["docs_test"]:
if config["ci_update_docs"]:
print("There's no use updating the docs pipeline without using it.")
print("Disabling 'ci_update_docs'.")
config["ci_update_docs"] = False
write_new_config = True

if args.verbose:
print("\nUsing the following config:\n")
Expand Down Expand Up @@ -334,6 +333,9 @@ def main():
if getattr(args, section) or args.all
]
for section in sections:
if section == "docs":
print(DOCS_OPTION_DEPRECATION_INFO)
continue
write_template_section(config, section, plugin_root_dir, verbose=args.verbose)

if write_new_config and not (args.generate_config or args.all):
Expand Down
1 change: 0 additions & 1 deletion templates/bootstrap/.bumpversion.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ values =

[bumpversion:file:./setup.py]

[bumpversion:file:./docs/conf.py]
4 changes: 0 additions & 4 deletions templates/bootstrap/.gitignore.j2
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ instance/
# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
docs/_static/

# PyBuilder
target/

Expand Down
Empty file removed templates/bootstrap/HISTORY.rst
Empty file.
2 changes: 1 addition & 1 deletion templates/bootstrap/README.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Pulp plugin to support hosting your own {{ plugin_app_label | dash }}.

For more information, please see the [documentation](docs/index.rst) or the [Pulp project page](https://pulpproject.org/).
For more information, please see the [documentation](docs/index.md) or the [Pulp project page](https://pulpproject.org/).


How to File an Issue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
{% include 'header.j2' %}
-r requirements.txt
towncrier

pulp-docs @ git+https://github.com/pulp/pulp-docs@main
1 change: 0 additions & 1 deletion templates/bootstrap/docs/contributing.rst.j2

This file was deleted.

12 changes: 12 additions & 0 deletions templates/bootstrap/docs/index.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Welcome to Pulp {{ plugin_label | upper }}

The `{{ plugin_label | upper }}` plugin extends pulpcore to support hosting python packages.
This plugin is a part of the Pulp Project, and assumes some familiarity with the
[pulpcore documentation](site:pulpcore/).

If you are just getting started, we recommend:

- [Getting Started with {{ plugin_label | upper }}](site:{{ plugin_name }}/docs/tutorials/getting-started.md),
for a starting out with a common use case.


33 changes: 0 additions & 33 deletions templates/bootstrap/docs/workflows/index.rst.j2

This file was deleted.

34 changes: 0 additions & 34 deletions templates/bootstrap/docs/workflows/publish.rst.j2

This file was deleted.

52 changes: 0 additions & 52 deletions templates/bootstrap/docs/workflows/upload.rst.j2

This file was deleted.

Loading

0 comments on commit 65c470f

Please sign in to comment.