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

Update conf.py to dynamically show current release number in announcement text at top of Panel site. #6903

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

Coderambling
Copy link
Contributor

@Coderambling Coderambling commented Jun 7, 2024

Announcement at top of site now says: "Panel 1.4 has just been released. ..."

Introducing a variable that retrieves current version number , so it will say "Panel 1.4.x has just been released. ..."

This way the announcement will always show the actual latest release number to new and returning users. More accurate and more informative.

Also, it will more accurately reflect the fact that Panel has frequent releases. Now it says 1.4 just released for a very long period,.

The announcement is on every page of the website, so every site visitor sees this...

Thanks to @maximlt for pointing out line 77 of conf py .

Thanks to @hoxbro for pointing out line 77.

Announcement now says: "Panel 1.4 has just been released. ..."

Introducing a variable that retrieves current version number , so it will say "Panel 1.4.x has just been released. ..."

This way the announcement will always show the actual latest release number to new and returning users. More accurate and more informative.
Announcement text said checkout instead of check out :-)
@Coderambling
Copy link
Contributor Author

Checks have passed successfully. Does that make sure the version number will display on the site as intended?

Or can that only be confirmed after a new build of the site?

@philippjfr
Copy link
Member

Or can that only be confirmed after a new build of the site?

Correct but the change looks safe.

@philippjfr philippjfr merged commit 3983b0b into holoviz:main Jun 10, 2024
7 checks passed
@@ -43,6 +43,11 @@
html_theme = "pydata_sphinx_theme"
html_favicon = "_static/icons/favicon.ico"

current_release = panel.__version__ # Current release version variable

announcement_text = f"Panel {current_release} has just been released! Check out the <a href='https://panel.holoviz.org/about/releases.html#version-1-4-0'>release notes</a> and support Panel by giving it a 🌟 on <a href='https://github.com/holoviz/panel'>Github</a>."
Copy link
Member

Choose a reason for hiding this comment

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

Arf unfortunately this is not quite correct, annoucement_text contains a link to releases.html#version-1-4-0 ... @Coderambling can you please open a new PR to remove this fragment? No need to build it dynamically I think, since we always want users to see the top of the release notes page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes wel spotted, I will replace that link with the one below ok? That will show the top of the release page.

https://panel.holoviz.org/about/releases.html

Copy link
Member

Choose a reason for hiding this comment

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

Ok.

Copy link
Contributor Author

@Coderambling Coderambling Jun 11, 2024

Choose a reason for hiding this comment

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

Also, as the next PR after that, the Github API could be used to retrieve the release date, so instead the text would then be

Panel current_release was released on release_date.

Would that be an improvement?

Example code to retrieve release date from Github:

`import requests

url = "https://api.github.com/repos/holoviz/panel/releases/latest"

response = requests.get(url)
data = response.json()

print("The latest release date is:", data['published_at'])
`

It would mean importing the requests library in conf.py though. Would that be an issue?

Advantage is that it could then also be used to retrieve the number of Github Panel downloads and forks for display on the site

This would be a good way to communicate to (first time) site visitors that Panel is in active development and is a popular framework.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the hyperlink:

#7046

Copy link
Contributor Author

@Coderambling Coderambling left a comment

Choose a reason for hiding this comment

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

See comment.

Coderambling added a commit to Coderambling/panel that referenced this pull request Jul 31, 2024
Aa discussed with @maximlt, In the below section, the url:

https://panel.holoviz.org/about/releases.html#version-1-4-0

Was changed to:

https://panel.holoviz.org/about/releases.html

See below for comment and explanation:

holoviz#6903 (review)




announcement_text = f"Panel {current_release} has just been released! Check out the <a href='https://panel.holoviz.org/about/releases.html#version-1-4-0'>release notes</a> and support Panel by giving it a 🌟 on <a href='https://github.com/holoviz/panel'>Github</a>."
philippjfr pushed a commit that referenced this pull request Aug 1, 2024
Aa discussed with @maximlt, In the below section, the url:

https://panel.holoviz.org/about/releases.html#version-1-4-0

Was changed to:

https://panel.holoviz.org/about/releases.html

See below for comment and explanation:

#6903 (review)




announcement_text = f"Panel {current_release} has just been released! Check out the <a href='https://panel.holoviz.org/about/releases.html#version-1-4-0'>release notes</a> and support Panel by giving it a 🌟 on <a href='https://github.com/holoviz/panel'>Github</a>."
@Coderambling
Copy link
Contributor Author

Hm it seems this wasn't applied.

Top of webpages still shows the old text. Is this because it is scheduled to be applied in version 1.5?

Or is there another cause?

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.

3 participants