From fcdc1fa91b7fd65f2c09104ecde695e5d05b5930 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Thu, 25 Jul 2024 12:28:38 -0300 Subject: [PATCH 1/2] Rename staging_docs to docs This does: - Remove legacy docs - Rename staging_docs to docs [noissue] --- docs/Makefile | 153 ------------ docs/_scripts/add_content_repo.sh | 5 - docs/_scripts/artifact.sh | 6 - docs/_scripts/autoupdate.sh | 4 - docs/_scripts/base.sh | 31 --- docs/_scripts/clean.sh | 18 -- docs/_scripts/distribution.sh | 3 - docs/_scripts/index.sh | 1 - docs/_scripts/pip.sh | 5 - docs/_scripts/publication.sh | 6 - docs/_scripts/pullthrough.sh | 2 - docs/_scripts/quickstart.sh | 30 --- docs/_scripts/remote.sh | 2 - docs/_scripts/repo.sh | 2 - docs/_scripts/sync.sh | 8 - docs/_scripts/twine.sh | 4 - docs/_scripts/upload.sh | 9 - docs/_static/survey_banner.js | 9 - docs/_templates/restapi.html | 24 -- {staging_docs => docs}/admin/guides/rbac.md | 0 .../admin/reference/settings.md | 0 docs/changes.rst | 4 - docs/conf.py | 228 ------------------ docs/contributing.rst | 1 - {staging_docs => docs}/index.md | 0 docs/index.rst | 68 ------ docs/installation.rst | 61 ----- docs/restapi/index.rst | 9 - docs/settings.rst | 20 -- docs/tech-preview.rst | 13 - .../user/guides/_SUMMARY.md | 0 {staging_docs => docs}/user/guides/publish.md | 0 {staging_docs => docs}/user/guides/pypi.md | 0 {staging_docs => docs}/user/guides/sync.md | 0 {staging_docs => docs}/user/guides/upload.md | 0 .../user/learn/tech-preview.md | 0 docs/workflows/index.rst | 30 --- docs/workflows/publish.rst | 109 --------- docs/workflows/pypi.rst | 70 ------ docs/workflows/sync.rst | 182 -------------- docs/workflows/upload.rst | 98 -------- 41 files changed, 1215 deletions(-) delete mode 100644 docs/Makefile delete mode 100644 docs/_scripts/add_content_repo.sh delete mode 100644 docs/_scripts/artifact.sh delete mode 100644 docs/_scripts/autoupdate.sh delete mode 100755 docs/_scripts/base.sh delete mode 100644 docs/_scripts/clean.sh delete mode 100644 docs/_scripts/distribution.sh delete mode 100644 docs/_scripts/index.sh delete mode 100644 docs/_scripts/pip.sh delete mode 100644 docs/_scripts/publication.sh delete mode 100644 docs/_scripts/pullthrough.sh delete mode 100644 docs/_scripts/quickstart.sh delete mode 100644 docs/_scripts/remote.sh delete mode 100644 docs/_scripts/repo.sh delete mode 100644 docs/_scripts/sync.sh delete mode 100644 docs/_scripts/twine.sh delete mode 100755 docs/_scripts/upload.sh delete mode 100644 docs/_static/survey_banner.js delete mode 100644 docs/_templates/restapi.html rename {staging_docs => docs}/admin/guides/rbac.md (100%) rename {staging_docs => docs}/admin/reference/settings.md (100%) delete mode 100644 docs/changes.rst delete mode 100644 docs/conf.py delete mode 100644 docs/contributing.rst rename {staging_docs => docs}/index.md (100%) delete mode 100644 docs/index.rst delete mode 100644 docs/installation.rst delete mode 100644 docs/restapi/index.rst delete mode 100644 docs/settings.rst delete mode 100644 docs/tech-preview.rst rename {staging_docs => docs}/user/guides/_SUMMARY.md (100%) rename {staging_docs => docs}/user/guides/publish.md (100%) rename {staging_docs => docs}/user/guides/pypi.md (100%) rename {staging_docs => docs}/user/guides/sync.md (100%) rename {staging_docs => docs}/user/guides/upload.md (100%) rename {staging_docs => docs}/user/learn/tech-preview.md (100%) delete mode 100644 docs/workflows/index.rst delete mode 100644 docs/workflows/publish.rst delete mode 100644 docs/workflows/pypi.rst delete mode 100644 docs/workflows/sync.rst delete mode 100644 docs/workflows/upload.rst diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 1716b258..00000000 --- a/docs/Makefile +++ /dev/null @@ -1,153 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -W -n -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build -STATIC_BUILD_DIR = _static -DIAGRAM_BUILD_DIR = _diagrams -DIAGRAM_SOURCE_DIR = diagrams_src -PULP_URL = "http://localhost:24817" - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -rm -rf $(DIAGRAM_BUILD_DIR)/* - -diagrams: -ifneq ($(wildcard $(DIAGRAM_SOURCE_DIR)), ) - mkdir -p $(DIAGRAM_BUILD_DIR) - python3 -m plantuml $(DIAGRAM_SOURCE_DIR)/*.dot - # cp + rm = mv workaround https://pulp.plan.io/issues/4791#note-3 - cp $(DIAGRAM_SOURCE_DIR)/*.png $(DIAGRAM_BUILD_DIR)/ - rm $(DIAGRAM_SOURCE_DIR)/*.png -else - @echo "Did not find $(DIAGRAM_SOURCE_DIR)." -endif - -html: - mkdir -p $(STATIC_BUILD_DIR) - curl --fail -o $(STATIC_BUILD_DIR)/api.json "$(PULP_URL)/pulp/api/v3/docs/api.json?component=python&include_html=1" - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/_scripts/add_content_repo.sh b/docs/_scripts/add_content_repo.sh deleted file mode 100644 index 10b1bbaf..00000000 --- a/docs/_scripts/add_content_repo.sh +++ /dev/null @@ -1,5 +0,0 @@ -# Add created PythonPackage content to repository -pulp python repository content add --repository foo --filename "shelf-reader-0.1.tar.gz" - -# After the task is complete, it gives us a new repository version -pulp python repository version show --repository foo diff --git a/docs/_scripts/artifact.sh b/docs/_scripts/artifact.sh deleted file mode 100644 index 4d2f421c..00000000 --- a/docs/_scripts/artifact.sh +++ /dev/null @@ -1,6 +0,0 @@ -# Get a Python package or choose your own -curl -O https://fixtures.pulpproject.org/python-pypi/packages/shelf-reader-0.1.tar.gz -export PKG="shelf-reader-0.1.tar.gz" - -# Upload it to Pulp -pulp python content upload --relative-path "$PKG" --file "$PKG" diff --git a/docs/_scripts/autoupdate.sh b/docs/_scripts/autoupdate.sh deleted file mode 100644 index b242f044..00000000 --- a/docs/_scripts/autoupdate.sh +++ /dev/null @@ -1,4 +0,0 @@ -# This configures the repository to produce new publications when a new version is created -pulp python repository update --name foo --autopublish -# This configures the distribution to be track the latest repository version for a given repository -pulp python distribution update --name foo --repository foo diff --git a/docs/_scripts/base.sh b/docs/_scripts/base.sh deleted file mode 100755 index 78cff5c7..00000000 --- a/docs/_scripts/base.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -echo "Setting environment variables for default hostname/port for the API and the Content app" -export BASE_ADDR=${BASE_ADDR:-http://localhost:24817} -export CONTENT_ADDR=${CONTENT_ADDR:-http://localhost:24816} - -# Necessary for `django-admin` -export DJANGO_SETTINGS_MODULE=pulpcore.app.settings - -# Install from source -if [ -z "$(pip freeze | grep pulp-cli)" ]; then - echo "Installing Pulp CLI" - git clone https://github.com/pulp/pulp-cli.git - cd pulp-cli - pip install -e . - cd .. -fi - -# Set up CLI config file -if [ ! -f ~/.config/pulp/settings.toml ]; then - echo "Configuring pulp-cli" - mkdir -p ~/.config/pulp - cat > ~/.config/pulp/cli.toml << EOF -[cli] -username = "admin" -password = "password" -base_url = "$BASE_ADDR" -verify_ssl = false -format = "json" -EOF -fi diff --git a/docs/_scripts/clean.sh b/docs/_scripts/clean.sh deleted file mode 100644 index e338f3a6..00000000 --- a/docs/_scripts/clean.sh +++ /dev/null @@ -1,18 +0,0 @@ -if [ -n "$(pulp python repository list | grep foo)" ]; then - pulp python repository destroy --name foo -fi - -if [ -n "$(pulp python remote list | grep foo)" ]; then - pulp python remote destroy --name bar -fi - -if [ -n "$(pulp python publication list | grep pulp)" ]; then - pulp python publication destroy --href "$(pulp python publication list | jq .[0].pulp_href)" -fi - -if [ -n "$(pulp python distribution list | grep foo)" ]; then - pulp python distribution destroy --name foo -fi - -pulp orphan cleanup --protection-time 0 -pip uninstall -y shelf-reader diff --git a/docs/_scripts/distribution.sh b/docs/_scripts/distribution.sh deleted file mode 100644 index 3f82a6b8..00000000 --- a/docs/_scripts/distribution.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Distributions are created asynchronously. Create one, and specify the publication that will -# be served at the base path specified. -pulp python distribution create --name foo --base-path foo --publication "$PUBLICATION_HREF" diff --git a/docs/_scripts/index.sh b/docs/_scripts/index.sh deleted file mode 100644 index 636a54d2..00000000 --- a/docs/_scripts/index.sh +++ /dev/null @@ -1 +0,0 @@ -pulp python distribution create --name my-pypi --base-path my-pypi --repository foo diff --git a/docs/_scripts/pip.sh b/docs/_scripts/pip.sh deleted file mode 100644 index 69e68600..00000000 --- a/docs/_scripts/pip.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo 'pip install --trusted-host pulp -i $BASE_ADDR/pypi/foo/simple/ shelf-reader' -pip install --trusted-host pulp -i $BASE_ADDR/pypi/foo/simple/ shelf-reader - -echo "is shelf reader installed?" -pip list | grep shelf-reader diff --git a/docs/_scripts/publication.sh b/docs/_scripts/publication.sh deleted file mode 100644 index 9d9a971f..00000000 --- a/docs/_scripts/publication.sh +++ /dev/null @@ -1,6 +0,0 @@ -# Create a new publication specifying the repository_version. -# Alternatively, you can specify just the repository, and Pulp will assume the latest version. -pulp python publication create --repository foo --version 1 - -# Publications can only be referenced through their pulp_href -PUBLICATION_HREF=$(pulp python publication list | jq -r .[0].pulp_href) diff --git a/docs/_scripts/pullthrough.sh b/docs/_scripts/pullthrough.sh deleted file mode 100644 index e1e537f3..00000000 --- a/docs/_scripts/pullthrough.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Add remote to distribution to enable pull-through caching -pulp python distribution update --name foo --remote bar diff --git a/docs/_scripts/quickstart.sh b/docs/_scripts/quickstart.sh deleted file mode 100644 index d6b14819..00000000 --- a/docs/_scripts/quickstart.sh +++ /dev/null @@ -1,30 +0,0 @@ -# This script will execute the component scripts and ensure that the documented examples -# work as expected. - -# THIS SCRIPT CURRENTLY MUST BE RUN IN A PULPLIFT DEVELOPMENT ENVIRONMENT -# TODO: remove the usage of pulp-devel bash functions so they can be directly modified -# for user environments. - -# From the _scripts directory, run with `source quickstart.sh` (source to preserve the environment -# variables) -export PLUGIN_SOURCE="../../" -set -e - -source base.sh -source clean.sh - -source repo.sh -source remote.sh -source sync.sh - -source publication.sh -source distribution.sh -source autoupdate.sh -source pullthrough.sh -source pip.sh - -source upload.sh -source add_content_repo.sh - -source index.sh -source twine.sh diff --git a/docs/_scripts/remote.sh b/docs/_scripts/remote.sh deleted file mode 100644 index beb56bf5..00000000 --- a/docs/_scripts/remote.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Create a remote that syncs some versions of shelf-reader into your repository. -pulp python remote create --name bar --url https://pypi.org/ --includes '["shelf-reader"]' diff --git a/docs/_scripts/repo.sh b/docs/_scripts/repo.sh deleted file mode 100644 index 74ecbb0b..00000000 --- a/docs/_scripts/repo.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Start by creating a new repository named "foo": -pulp python repository create --name foo diff --git a/docs/_scripts/sync.sh b/docs/_scripts/sync.sh deleted file mode 100644 index fed0538c..00000000 --- a/docs/_scripts/sync.sh +++ /dev/null @@ -1,8 +0,0 @@ -# Using the Remote we just created, we kick off a sync task -pulp python repository sync --name foo --remote bar - -# The sync command will by default wait for the sync to complete -# Use Ctrl+c or the -b option to send the task to the background - -# Show the latest version when sync is done -pulp python repository version show --repository foo diff --git a/docs/_scripts/twine.sh b/docs/_scripts/twine.sh deleted file mode 100644 index 32d02ab4..00000000 --- a/docs/_scripts/twine.sh +++ /dev/null @@ -1,4 +0,0 @@ -# Build custom package -python -m build $PLUGIN_SOURCE -# Upload built package distributions to my-pypi -twine upload --repository-url $BASE_ADDR/pypi/my-pypi/simple/ -u admin -p password "$PLUGIN_SOURCE"dist/* diff --git a/docs/_scripts/upload.sh b/docs/_scripts/upload.sh deleted file mode 100755 index 62549a08..00000000 --- a/docs/_scripts/upload.sh +++ /dev/null @@ -1,9 +0,0 @@ -source clean.sh -source repo.sh - -# Get a Python package or choose your own -curl -O https://fixtures.pulpproject.org/python-pypi/packages/shelf-reader-0.1.tar.gz -export PKG="shelf-reader-0.1.tar.gz" - -# Upload it to Pulp -pulp python content upload --relative-path "$PKG" --file "$PKG" diff --git a/docs/_static/survey_banner.js b/docs/_static/survey_banner.js deleted file mode 100644 index ae4127c6..00000000 --- a/docs/_static/survey_banner.js +++ /dev/null @@ -1,9 +0,0 @@ -window.onload = function() { - var elem = document.createElement('div'); - var body = document.getElementsByClassName("rst-content")[0] - var doc = document.getElementsByClassName("document")[0] - elem.className = "admonition important" - elem.id = "pulp-survey-banner" - elem.innerHTML = "

Please take our survey to help us improve Pulp!

"; - body.insertBefore(elem, doc) -} diff --git a/docs/_templates/restapi.html b/docs/_templates/restapi.html deleted file mode 100644 index 89dcb1a0..00000000 --- a/docs/_templates/restapi.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - REST API for Pulp 3 python Plugin - - - - - - - - - - - - - diff --git a/staging_docs/admin/guides/rbac.md b/docs/admin/guides/rbac.md similarity index 100% rename from staging_docs/admin/guides/rbac.md rename to docs/admin/guides/rbac.md diff --git a/staging_docs/admin/reference/settings.md b/docs/admin/reference/settings.md similarity index 100% rename from staging_docs/admin/reference/settings.md rename to docs/admin/reference/settings.md diff --git a/docs/changes.rst b/docs/changes.rst deleted file mode 100644 index 96e8eb90..00000000 --- a/docs/changes.rst +++ /dev/null @@ -1,4 +0,0 @@ -Changes -********* - -Removed due to docs migration process. diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index 4c879041..00000000 --- a/docs/conf.py +++ /dev/null @@ -1,228 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Pulp Python Support documentation build configuration file, created by -# sphinx-quickstart on Thu Nov 20 17:53:15 2014. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import os -import sys -sys.path.insert(0, os.path.abspath('..')) # noqa - - -try: - import sphinx_rtd_theme -except ImportError: - sphinx_rtd_theme = False - -# 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. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ----------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.extlinks'] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'Pulp python Support' -copyright = u'' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = "3.13.0.dev" -# The full version, including alpha/beta/rc tags. -release = "3.13.0.dev" - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -patterns = ['_build'] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - - -# -- 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_rtd_theme' if sphinx_rtd_theme else 'default' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# 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_theme_path = [sphinx_rtd_theme.get_html_theme_path()] if sphinx_rtd_theme else [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -html_additional_pages = {'restapi': 'restapi.html'} - -html_static_path = ['_static'] - -# Re-enable this when new survey is created. -# html_js_files = ['survey_banner.js'] - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# -- Options for LaTeX output -------------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', -} - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# If true, show URL addresses after external links. -#man_show_urls = False - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -rst_prolog = """.. attention:: - This docs will be deactivated in July 2024. `Learn More `_ - or go to the `New Pulp Docs `_ (beta). -""" diff --git a/docs/contributing.rst b/docs/contributing.rst deleted file mode 100644 index e582053e..00000000 --- a/docs/contributing.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../CONTRIBUTING.rst diff --git a/staging_docs/index.md b/docs/index.md similarity index 100% rename from staging_docs/index.md rename to docs/index.md diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index 5f018566..00000000 --- a/docs/index.rst +++ /dev/null @@ -1,68 +0,0 @@ -pulp-python Plugin -================== - -The `python`` 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 -`_. - -If you are just getting started, we recommend getting to know the :doc:`basic -workflows`. - -The REST API documentation for ``pulp_python`` is available `here `_. - -Features --------- - -* :ref:`Create local mirrors of PyPI ` that you have full control over -* :ref:`Upload your own Python packages ` -* :ref:`Perform pip install ` from your Pulp Python repositories -* :ref:`Download packages on-demand ` to reduce disk usage -* Every operation creates a restorable snapshot with :ref:`Versioned Repositories ` -* Curate your Python repositories with allowed and disallowed packages -* Host content either `locally or on S3 `_ -* De-duplication of all saved content - -Tech Preview ------------- - -Some additional features are being supplied as a tech preview. There is a possibility that -backwards incompatible changes will be introduced for these particular features. For a list of -features currently being supplied as tech previews only, see the :doc:`tech preview page -`. - -How to use these docs -===================== - -The documentation here should be considered the **primary documentation for managing Python related content.** -All relevant workflows are covered here, with references to some pulpcore supplemental docs. -Users may also find pulpcore’s conceptual docs useful. - -This documentation falls into two main categories: - - 1. :ref:`workflows-index` shows the **major features** of the Python plugin, with links to reference docs. - 2. The `REST API Docs `_ are automatically generated and provide more detailed information for each - minor feature, including all fields and options. - -Table of Contents ------------------ - -.. toctree:: - :maxdepth: 1 - - installation - settings - workflows/index - changes - contributing - restapi/index - tech-preview - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - diff --git a/docs/installation.rst b/docs/installation.rst deleted file mode 100644 index 79db2a77..00000000 --- a/docs/installation.rst +++ /dev/null @@ -1,61 +0,0 @@ -User Setup -========== - -All workflow examples use the Pulp CLI. Install and setup from PyPI: - -.. code-block:: bash - - pip install pulp-cli[pygments] # For color output - pulp config create -e - pulp status # Check that CLI can talk to Pulp - -If you configured the ``admin`` user with a different password, adjust the configuration -accordingly. If you prefer to specify the username and password with each request, please see -``Pulp CLI`` documentation on how to do that. - - -Install ``pulpcore`` --------------------- - -Follow the `installation -instructions `__ -provided with pulpcore. - -Install plugin --------------- - -This document assumes that you have -`installed pulpcore `_ -into a the virtual environment ``pulpvenv``. - -Users should install from **either** PyPI or source. - -From Source -*********** - -.. code-block:: bash - - sudo -u pulp -i - source ~/pulpvenv/bin/activate - cd pulp_python - pip install -e . - django-admin runserver 24817 - -Make and Run Migrations ------------------------ - -.. code-block:: bash - - pulpcore-manager makemigrations python - pulpcore-manager migrate python - -Run Services ------------- - -.. code-block:: bash - - pulpcore-manager runserver - gunicorn pulpcore.content:server --bind 'localhost:24816' --worker-class 'aiohttp.GunicornWebWorker' -w 2 - sudo systemctl restart pulpcore-resource-manager - sudo systemctl restart pulpcore-worker@1 - sudo systemctl restart pulpcore-worker@2 diff --git a/docs/restapi/index.rst b/docs/restapi/index.rst deleted file mode 100644 index 4701d8b2..00000000 --- a/docs/restapi/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -REST API -======== - -Pulpcore Reference: `pulpcore REST documentation `_. - -Pulp Python Endpoints ---------------------- - -Pulp Python Reference `pulp-python REST documentation <../restapi.html>`_ diff --git a/docs/settings.rst b/docs/settings.rst deleted file mode 100644 index 6d3cc15b..00000000 --- a/docs/settings.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. _settings: - -Settings -======== - -``pulp_python`` adds configuration options to those offered by ``pulpcore``. - -PYTHON_GROUP_UPLOADS -^^^^^^^^^^^^^^^^^^^^ - - This setting controls whether the uploading of packages through the PyPI APIs can be grouped - inside http sessions. When enabled, Pulp tries to group the uploaded distributions of a package - into one task generating one repository version. Defaults to False. - -PYPI_API_HOSTNAME -^^^^^^^^^^^^^^^^^ - - This specifies the hostname where the PyPI API is served. It defaults to the fully qualified - hostname of the system where the process is running. This needs to be adjusted if running behind - a non local reverse proxy. diff --git a/docs/tech-preview.rst b/docs/tech-preview.rst deleted file mode 100644 index a0185344..00000000 --- a/docs/tech-preview.rst +++ /dev/null @@ -1,13 +0,0 @@ -Tech previews -============= - -The following features are currently being released as part of a tech preview - -* New endpoint “pulp/api/v3/remotes/python/python/from_bandersnatch/” that allows for Python remote creation from a - Bandersnatch config file. -* PyPI’s json API at content endpoint ‘/pypi/{package-name}/json’. Allows for basic Pulp-to-Pulp syncing. -* Fully mirror Python repositories provided PyPI and Pulp itself. -* ``Twine`` upload packages to indexes at endpoints '/simple` or '/legacy'. -* Create pull-through caches of remote sources. -* Pulp Domain support -* RBAC support diff --git a/staging_docs/user/guides/_SUMMARY.md b/docs/user/guides/_SUMMARY.md similarity index 100% rename from staging_docs/user/guides/_SUMMARY.md rename to docs/user/guides/_SUMMARY.md diff --git a/staging_docs/user/guides/publish.md b/docs/user/guides/publish.md similarity index 100% rename from staging_docs/user/guides/publish.md rename to docs/user/guides/publish.md diff --git a/staging_docs/user/guides/pypi.md b/docs/user/guides/pypi.md similarity index 100% rename from staging_docs/user/guides/pypi.md rename to docs/user/guides/pypi.md diff --git a/staging_docs/user/guides/sync.md b/docs/user/guides/sync.md similarity index 100% rename from staging_docs/user/guides/sync.md rename to docs/user/guides/sync.md diff --git a/staging_docs/user/guides/upload.md b/docs/user/guides/upload.md similarity index 100% rename from staging_docs/user/guides/upload.md rename to docs/user/guides/upload.md diff --git a/staging_docs/user/learn/tech-preview.md b/docs/user/learn/tech-preview.md similarity index 100% rename from staging_docs/user/learn/tech-preview.md rename to docs/user/learn/tech-preview.md diff --git a/docs/workflows/index.rst b/docs/workflows/index.rst deleted file mode 100644 index d411c222..00000000 --- a/docs/workflows/index.rst +++ /dev/null @@ -1,30 +0,0 @@ -.. _workflows-index: - -Workflows -========= - -If you have not yet installed the `python` plugin on your Pulp installation, please follow our -:doc:`../installation`. These documents will assume you have the environment installed and -ready to go. - -The example workflows here use the Pulp CLI. Get and setup the Pulp CLI from PyPI with the following -commands. For more information about setting up the Pulp CLI please read the `installation and configuration -doc page `_. - -.. code-block:: bash - - pip install pulp-cli[pygments] # For colored output - pulp config create -e - -If you configured the ``admin`` user with a different password, adjust the configuration -accordingly. If you prefer to specify the username and password with each request, please see -Pulp CLI documentation on how to do that. - - -.. toctree:: - :maxdepth: 2 - - pypi - sync - upload - publish diff --git a/docs/workflows/publish.rst b/docs/workflows/publish.rst deleted file mode 100644 index 4445c142..00000000 --- a/docs/workflows/publish.rst +++ /dev/null @@ -1,109 +0,0 @@ -.. _host: - -Publish and Host -================ - -This section assumes that you have a repository with content in it. To do this, see the -:doc:`sync` or :doc:`upload` documentation. - -Create a Publication (manually) -------------------------------- - -Kick off a publish task by creating a new publication. The publish task will generate all the -metadata that ``pip`` needs to install packages (although it will need to be hosted through a -Distribution before it is consumable). - -.. literalinclude:: ../_scripts/publication.sh - :language: bash - -Publication Create Response:: - - { - "pulp_href": "/pulp/api/v3/publications/python/pypi/cad6007d-7172-41d1-8c22-0ec95e1d242a/", - "pulp_created": "2021-03-09T04:30:16.686784Z", - "repository_version": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/versions/1/", - "repository": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/", - "distributions": [] - } - -Host a Publication (Create a Distribution) --------------------------------------------- - -To host a publication, (which makes it consumable by ``pip``), users create a distribution which -will serve the associated publication at ``/pypi//`` - -.. literalinclude:: ../_scripts/distribution.sh - :language: bash - -Response:: - - { - "pulp_href": "/pulp/api/v3/distributions/python/pypi/4839c056-6f2b-46b9-ac5f-88eb8a7739a5/", - "pulp_created": "2021-03-09T04:36:48.289737Z", - "base_path": "foo", - "base_url": "/pypi/foo/", - "content_guard": null, - "pulp_labels": {}, - "name": "foo", - "publication": "/pulp/api/v3/publications/python/pypi/a09111b1-6bce-43ac-aed7-2e8441c22704/" - } - -Automate Publication and Distribution -------------------------------------- - -With a little more initial setup, you can have publications and distributions for your repositories -updated automatically when new repository versions are created. - -.. literalinclude:: ../_scripts/autoupdate.sh - :language: bash - -.. warning:: - Support for automatic publication and distribution is provided as a tech preview in Pulp 3. - Functionality may not work or may be incomplete. Also, backwards compatibility when upgrading - is not guaranteed. - -.. _pull-through-cache: - -Enable Pull-Through Caching: ----------------------------- - -Only packages present in your repository will be available from your index, but adding a remote source to -your distribution will enable the pull-through cache feature. This feature allows you to install any package -from the remote source and have Pulp store that package as orphaned content. - -.. literalinclude:: ../_scripts/pullthrough.sh - :language: bash - -.. warning:: - Support for pull-through caching is provided as a tech preview in Pulp 3. - Functionality may not work or may be incomplete. Also, backwards compatibility when upgrading - is not guaranteed. - -.. _using-distributions: - -Use the newly created distribution ------------------------------------ - -The metadata and packages can now be retrieved from the distribution:: - -$ http $BASE_ADDR/pypi/foo/simple/ -$ http $BASE_ADDR/pypi/foo/simple/shelf-reader/ - -The content is also pip installable:: - -$ pip install --trusted-host localhost -i $BASE_ADDR/pypi/foo/simple/ shelf-reader - -If you don't want to specify the distribution path every time, you can modify your ``pip.conf`` -file. See the `pip docs `_ for more -detail.:: - -$ cat pip.conf - -.. code:: - - [global] - index-url = http://localhost:24817/pypi/foo/simple/ - -The above configuration informs ``pip`` to install from ``pulp``:: - -$ pip install --trusted-host localhost shelf-reader diff --git a/docs/workflows/pypi.rst b/docs/workflows/pypi.rst deleted file mode 100644 index 6a8a0f00..00000000 --- a/docs/workflows/pypi.rst +++ /dev/null @@ -1,70 +0,0 @@ -.. _pypi-workflow: - -Setup your own PyPI: -==================== - -This section guides you through the quickest way to to setup ``pulp_python`` to act as your very own -private ``PyPI``. - -Create a Repository: --------------------- - -Repositories are the base objects ``Pulp`` uses to store and organize its content. They are automatically -versioned when content is added or deleted and allow for easy rollbacks to previous versions. - -.. literalinclude:: ../_scripts/repo.sh - :language: bash - -Repository Create Response:: - - { - "pulp_href": "/pulp/api/v3/repositories/python/python/3fe0d204-217f-4250-8177-c83b30751fca/", - "pulp_created": "2021-06-02T14:54:53.387054Z", - "versions_href": "/pulp/api/v3/repositories/python/python/3fe0d204-217f-4250-8177-c83b30751fca/versions/", - "pulp_labels": {}, - "latest_version_href": "/pulp/api/v3/repositories/python/python/3fe0d204-217f-4250-8177-c83b30751fca/versions/1/", - "name": "foo", - "description": null, - "retained_versions": null, - "remote": null, - "autopublish": false - } - -Create a Distribution: ----------------------- - -Distributions serve the content stored in repositories so that it can be used by tools like ``pip``. - -.. literalinclude:: ../_scripts/index.sh - :language: bash - -Distribution Create Response:: - - { - "pulp_href": "/pulp/api/v3/distributions/python/pypi/e8438593-fd40-4654-8577-65398833c331/", - "pulp_created": "2021-06-03T20:04:18.233230Z", - "base_path": "my-pypi", - "base_url": "https://pulp3-source-fedora33.localhost.example.com/pypi/foo/", - "content_guard": null, - "pulp_labels": {}, - "name": "my-pypi", - "repository": "/pulp/api/v3/repositories/python/python/3fe0d204-217f-4250-8177-c83b30751fca/", - "publication": null, - "allow_uploads": true - } - -Upload and Install Packages: ----------------------------- - -Packages can now be uploaded to the index using your favorite Python tool. The index url will be available -at ``/pypi//simple/``. - -.. literalinclude:: ../_scripts/twine.sh - :language: bash - -Packages can then be installed using your favorite Python tool:: - -$ pip install --trusted-host localhost -i $BASE_ADDR/pypi/my-pypi/simple/ shelf-reader - -Now you have a fully operational Python package index. Check out the other workflows to see more features of -``pulp_python``. diff --git a/docs/workflows/sync.rst b/docs/workflows/sync.rst deleted file mode 100644 index d6719fe0..00000000 --- a/docs/workflows/sync.rst +++ /dev/null @@ -1,182 +0,0 @@ -.. _sync-workflow: - -Synchronize a Repository -======================== - -Users can populate their repositories with content from an external source like PyPI by syncing -their repository. - -.. _versioned-repo-created: - -Create a Repository -------------------- - -.. literalinclude:: ../_scripts/repo.sh - :language: bash - -Repository Create Response:: - - { - "pulp_href": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/", - "pulp_created": "2021-03-09T04:11:54.347921Z", - "versions_href": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/versions/", - "pulp_labels": {}, - "latest_version_href": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/versions/0/", - "name": "foo", - "description": null, - "remote": null - } - -Reference (pulpcore): `Repository API Usage -`_ - -.. _create-remote: - -Create a Remote ---------------- - -Creating a remote object informs Pulp about an external content source. In this case, we will be -using a fixture, but Python remotes can be anything that implements the PyPI API. This can be PyPI -itself, a fixture, or even an instance of Pulp 2. - -.. literalinclude:: ../_scripts/remote.sh - :language: bash - -Remote Create Response:: - - { - "pulp_href": "/pulp/api/v3/remotes/python/python/a9bb3a02-c7d2-4b2e-9b66-050a6c9b7cb3/", - "pulp_created": "2021-03-09T04:14:02.646835Z", - "name": "bar", - "url": "https://pypi.org/", - "ca_cert": null, - "client_cert": null, - "tls_validation": true, - "proxy_url": null, - "pulp_labels": {}, - "pulp_last_updated": "2021-03-09T04:14:02.646845Z", - "download_concurrency": 10, - "policy": "on_demand", - "total_timeout": null, - "connect_timeout": null, - "sock_connect_timeout": null, - "sock_read_timeout": null, - "headers": null, - "rate_limit": null, - "includes": [ - "shelf-reader" - ], - "excludes": [], - "prereleases": true, - } - - -Reference: `Python Remote Usage <../restapi.html#tag/Remotes:-Python>`_ - -A More Complex Remote ---------------------- - -If only the name of a project is specified, every distribution of every version of that project -will be synced. You can use the version_specifier field to ensure only distributions you care -about will be synced:: - - $ pulp python remote create \ - --name 'complex-remote' \ - --url 'https://pypi.org/' \ - --includes '[ - "django~=2.0,!=2.0.1", - "pip-tools>=1.12,<=2.0", - "scipy", - "shelf-reader" - ]' - -You can also use version specifiers to "exclude" certain versions of a project, like so:: - - $ pulp python remote create \ - --name 'complex-remote' \ - --url 'https://pypi.org/' \ - --includes '[ - "django", - "scipy" - ]' \ - --excludes '[ - "django~=1.0", - "scipy" - ]' - -You can also filter packages by their type, platform and amount synced through the "package_types", -"exclude_platforms", and "keep_latest_packages" fields respectively, like so:: - - $ pulp python remote create \ - --name 'complex-filters' \ - --url 'https://pypi.org/' \ - --includes '["django"]' \ - --package-types '["sdist", "bdist-wheel"]' # only sync sdist and bdist-wheel package types \ - --exclude-platforms '["windows"]' # exclude any packages built for windows \ - --keep-latest-packages 5 # keep the five latest versions - -Reference: `Python Remote Usage <../restapi.html#tag/Remotes:-Python>`_ - -.. _mirror-workflow: - -Creating a remote to sync all of PyPI -_____________________________________ - -A remote can be setup to sync all of PyPI by not specifying any included packages like so:: - - $ pulp python remote create \ - --name 'PyPI-mirror' \ - --url 'https://pypi.org/' \ - --excludes '[ - "django~=1.0", - "scipy" - ]' - -By not setting the "includes" field Pulp will ask PyPI for all of its available packages to sync, minus the ones from -the excludes field. Default Python remotes are created with syncing policy "on_demand" because the most common -Python remotes involve syncing with PyPI which requires terabytes of disk space. This can be changed by -modifying the "policy" field. - -Syncing all of PyPI can take a long time depending on your network and disk speeds. Check out -:ref:`pull-through caching ` to learn about another way to mirror PyPI. - -Sync repository foo with remote -------------------------------- - -Use the remote object to kick off a synchronize task by specifying the repository to -sync with. You are telling pulp to fetch content from the remote and add to the repository. - -.. literalinclude:: ../_scripts/sync.sh - :language: bash - -Repository Version Show Response (when complete):: - - { - "pulp_href": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/versions/1/", - "pulp_created": "2021-03-09T04:20:21.896132Z", - "number": 1, - "base_version": null, - "content_summary": { - "added": { - "python.python": { - "count": 2, - "href": "/pulp/api/v3/content/python/packages/?repository_version_added=/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/versions/1/" - } - }, - "removed": {}, - "present": { - "python.python": { - "count": 2, - "href": "/pulp/api/v3/content/python/packages/?repository_version=/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/versions/1/" - } - } - } - } - - - - -Reference: `Python Sync Usage <../restapi.html#operation/repositories_python_python_sync>`_ - -Reference (pulpcore): `Repository Version Creation API Usage -`_ diff --git a/docs/workflows/upload.rst b/docs/workflows/upload.rst deleted file mode 100644 index bdd40e86..00000000 --- a/docs/workflows/upload.rst +++ /dev/null @@ -1,98 +0,0 @@ -.. _uploading-content: - -Upload and Manage Content -========================= -Content can be added to a repository not only by synchronizing from a remote source but also by uploading the files directly into Pulp. - -Create a repository -------------------- - -If you don't already have a repository, create one. - -.. literalinclude:: ../_scripts/repo.sh - :language: bash - -Repository GET response:: - - { - "pulp_href": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/", - "pulp_created": "2021-03-09T04:11:54.347921Z", - "versions_href": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/versions/", - "pulp_labels": {}, - "latest_version_href": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/versions/0/", - "name": "foo", - "description": null, - "remote": null - } - -Upload a file to Pulp ---------------------- - -Each artifact in Pulp represents a file. They can be created during sync or created manually by uploading a file. - -.. literalinclude:: ../_scripts/artifact.sh - :language: bash - -Content Upload response:: - - { - "pulp_href": "/pulp/api/v3/content/python/packages/f226894b-daa9-4152-9a04-595979ea5f9b/", - "pulp_created": "2021-03-09T04:47:13.066911Z", - "artifact": "/pulp/api/v3/artifacts/532b6318-add2-4208-ac1b-d6d37a39a97f/", - "filename": "shelf-reader-0.1.tar.gz", - "packagetype": "sdist", - "name": "shelf-reader", - "version": "0.1", - "metadata_version": "1.1", - "summary": "Make sure your collections are in call number order.", - "description": "too long to read" - "keywords": "", - "home_page": "https://github.com/asmacdo/shelf-reader", - "download_url": "", - "author": "Austin Macdonald", - "author_email": "asmacdo@gmail.com", - "maintainer": "", - "maintainer_email": "", - "license": "GNU GENERAL PUBLIC LICENSE Version 2, June 1991", - "requires_python": "", - "project_url": "", - "platform": "", - "supported_platform": "", - "requires_dist": "[]", - "provides_dist": "[]", - "obsoletes_dist": "[]", - "requires_external": "[]", - "classifiers": "[]" - } - -Add content to a repository ---------------------------- - -Once there is a content unit, it can be added and removed from repositories using the add and remove commands - -.. literalinclude:: ../_scripts/add_content_repo.sh - :language: bash - -Repository Version Show Response (after task complete):: - - { - "base_version": null, - "content_summary": { - "added": { - "python.python": { - "count": 1, - "href": "/pulp/api/v3/content/python/packages/?repository_version_added=/pulp/api/v3/repositories/python/python/931109d3-db86-4933-bf1d-45b4d4216d5d/versions/1/" - } - }, - "present": { - "python.python": { - "count": 1, - "href": "/pulp/api/v3/content/python/packages/?repository_version=/pulp/api/v3/repositories/python/python/931109d3-db86-4933-bf1d-45b4d4216d5d/versions/1/" - } - }, - "removed": {} - }, - "number": 1, - "pulp_created": "2020-05-28T21:04:54.403979Z", - "pulp_href": "/pulp/api/v3/repositories/python/python/931109d3-db86-4933-bf1d-45b4d4216d5d/versions/1/" - } From 04eaaf64863b2b589031158e7414d9222956aaa2 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Thu, 25 Jul 2024 12:29:13 -0300 Subject: [PATCH 2/2] Fix index.md heading level There should be only one level 1 heading (#) on the document, otherwise mkdocs ToC braeks. [noissue] --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 3345d94f..9414f9d1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,7 +25,7 @@ Some additional features are being supplied as a tech preview. There is a possi backwards incompatible changes will be introduced for these particular features. For a list of features currently being supplied as tech previews only, see the [tech preview page](site:pulp_python/docs/user/learn/tech-preview/). -# How to use these docs +## How to use these docs The documentation here should be considered the **primary documentation for managing Python related content.** All relevant workflows are covered here, with references to some pulpcore supplemental docs.