Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: move docs from juju.is #1244

Merged
merged 4 commits into from
Dec 20, 2024
Merged

docs: move docs from juju.is #1244

merged 4 commits into from
Dec 20, 2024

Conversation

tmihoc
Copy link
Member

@tmihoc tmihoc commented Dec 18, 2024

As part of a broader move where juju.is docs go federated and RTD, this PR adds all the python-libjuju material we previously had under juju.is/docs/juju (in how-to guide tabs) to the python-libjuju RTD (under a new section called "How-to guides").

This RTD project could use a lot of further improvements (e.g., for all of the other projects -- juju, terraform-provider-juju, charmcraft, ops -- I made sure to update the homepage according to the standard template and to have the full Diataxis tree and integrate the new content nicely with the old, removing duplication, etc.). However, given that we are slowly phasing python-libjuju out, I believe leaving things as is is probably fine.

There is one fix that it is worth making, namely, the links to Juju docs. I followed the instructions in https://canonical-documentation-with-sphinx-and-readthedocscom.readthedocs-hosted.com/style-guide/#internal-references for "targets in other doc sets", but the links don't seem to be working. It could be because the Juju RTD project needs some fixing (we're working on it). I should know soon enough what needs to be done and then I'll come back and fix all the links in a follow-up PR.

QA Steps

From the root of the repo:

# Build the docs:
tox -e docs 

#Preview the docs:
open docs/_build/index.html

Copy link
Collaborator

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, @tmihoc! However, it looks like you've accidentally commits all the Python files under build/*. Where are these files coming from? Should the /build directory be added to .gitignore?

docs/howto/#manage-machines.rst# Outdated Show resolved Hide resolved
@james-garner-canonical james-garner-canonical force-pushed the add-discourse-docs branch 2 times, most recently from 00ef6ca to 6947cf0 Compare December 19, 2024 04:50
@james-garner-canonical
Copy link
Contributor

I've taken care of rebasing this branch, and added a commit that removes build/ and #manage-machines.rst#, updates .gitignore to ignore build/, and adds the (mostly whitespace) changes mandated by pre-commit.

Copy link
Contributor

@tonyandrewmeyer tonyandrewmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me. The how-to guides are integrated, which is the main point, and while the docs site is still not great, I agree that it doesn't make sense to fix that given where things are headed.

For the broken Juju docs, the plan to fix them in a future PR seems fine - I don't think it needs to block merging, even though we did that that approach with ops. For what it's worth, I don't see the juju cross-Sphinx link defined, so that may be the problem?

Copy link
Contributor

@dimaqq dimaqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first read

docs/howto/manage-applications.rst Outdated Show resolved Hide resolved
docs/howto/manage-applications.rst Outdated Show resolved Hide resolved
docs/howto/manage-storage-pools.rst Outdated Show resolved Hide resolved
docs/howto/manage-credentials.rst Outdated Show resolved Hide resolved
docs/howto/manage-ssh-keys.rst Outdated Show resolved Hide resolved
docs/howto/manage-secret-backends.rst Outdated Show resolved Hide resolved
docs/howto/manage-units.rst Outdated Show resolved Hide resolved
docs/howto/manage-storage.rst Outdated Show resolved Hide resolved
docs/howto/manage-units.rst Outdated Show resolved Hide resolved
docs/howto/manage-users.rst Outdated Show resolved Hide resolved
@tmihoc
Copy link
Member Author

tmihoc commented Dec 19, 2024

@james-garner-canonical I see you've already committed some improvements. Do you think I could leave this PR in your hands? Asking because I'm juggling changes in a few other repos at the moment and I could use all the help I can get.

@james-garner-canonical
Copy link
Contributor

james-garner-canonical commented Dec 19, 2024

I've merged @dimaqq's suggestions and signed the commit.

Re: linking to Juju docs, @tonyandrewmeyer's comment pointed me to us needing to define the juju: reference for sphinx. intersphinx is already in docs/conf.py's extensions, so I guess we need something like this -- but what url do we use here? http://canonical-juju.readthedocs-hosted.com/

intersphinx_mapping = {
    'python': ('https://docs.python.org/3', None),
    "juju": (JUJU_DOCS_URL, None),
}

@james-garner-canonical
Copy link
Contributor

I guess if we go with @tmihoc's original suggestion to fix the Juju links in a subsequent PR, then this might be ready to merge. Any objections, @benhoyt and @dimaqq ?

Copy link
Collaborator

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I'm good with it.

The only minor thing I noticed when viewing locally is the breadcrumbs at the top of the page have a "" in them:
Screenshot from 2024-12-20 11-21-20

@james-garner-canonical
Copy link
Contributor

/merge

@jujubot jujubot merged commit a58645e into juju:main Dec 20, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants