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

Add documentation site #974

Merged
merged 4 commits into from Nov 14, 2023
Merged

Conversation

marctc
Copy link
Contributor

@marctc marctc commented Oct 31, 2023

  • Added initial structure to render docs with github pages. We decided to use hugo as is the tool used for Prometheus' client_java (see docs here). It's also quite popular tool among open source projects.
  • README file is being cleaned up to have minimal information. The content is moved to different subsections. I mostly followed the existing hierarchy but I also moved things a bit around. Please take a look and feel free to suggest how to structure it.
  • Added github action to deploy changes when master is built. This probably needs to enable the github page in project settings (@fstab can support us on this in case we can't figure how to do it).

In a follow-up PR, I can add Python docstrings of the documented classes. But for the scope of this PR I decided to leave it out.

Fixes #849

This a preview how it renders:

2023-10-31_14-13

Copy link
Member

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

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

Just a couple comments, but this looks great!

Is there a good way to deploy this to a github site just to check that CI works before merging? Locally everything looked nice.

name: Deploy Documentation to Github Pages

on:
# Runs on pushes targeting the 1.0.x branch
Copy link
Member

Choose a reason for hiding this comment

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

This comment can be removed since we don't have a 1.0.x branch.

weight: 7
---

# Labels
Copy link
Member

Choose a reason for hiding this comment

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

It's probably worth having Labels as a separate item since they are a core part of using this library.

Copy link
Contributor Author

@marctc marctc Nov 3, 2023

Choose a reason for hiding this comment

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

Moved labels and exemplars to their own section. ## Disabling _created metrics is now in the _index.md of instrumenting. I can change if need it.

@marctc
Copy link
Contributor Author

marctc commented Nov 3, 2023

Is there a good way to deploy this to a github site just to check that CI works before merging?

If I'm not mistaken, the only way to deploy to pages is syncing with a github branch. @fstab did you try to manually deploy the docs? or you just used the github action directly?

@fstab
Copy link
Member

fstab commented Nov 3, 2023

I just used the Github action. I didn't even write it, I just copied it out of the Hugo documentation :) https://gohugo.io/hosting-and-deployment/hosting-on-github/

@csmarchbanks
Copy link
Member

There were some readme updates that came in with allowing https, would you be willing to rebase this with those new changes?

Otherwise I think this looks good and I can work on any deployment issues in followup PRs if necessary.

Signed-off-by: Marc Tuduri <marctc@protonmail.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
Copy link
Member

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

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

A couple tiny comments, plus the most recent commit needs a DCO signoff.

docs/content/exporting/http/_index.md Outdated Show resolved Hide resolved
docs/content/exporting/http/_index.md Show resolved Hide resolved
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
Copy link
Member

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

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

Thanks!

@csmarchbanks csmarchbanks merged commit dc14069 into prometheus:master Nov 14, 2023
11 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.

Proposal: Documentation for client_python
3 participants