Skip to content

Conversation

@AlenkaF
Copy link
Member

@AlenkaF AlenkaF commented Dec 5, 2022

This PR is a complementary work to apache/arrow-site#275.

It adds a version warning script tag to the docs/source/_templates/layout.html and versionwarnings.js file into docs/source/_static/.

@github-actions
Copy link

github-actions bot commented Dec 5, 2022

{# Add version warnings #}
{% block footer %}
{{ super() }}
<script type="text/javascript" src="/docs/versionwarning.js"></script>
Copy link
Member

Choose a reason for hiding this comment

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

Is this PR missing the file /docs/versionwarning.js?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is a separate PR that adds the versionwarnings.js file: apache/arrow-site#275 .
It has to be merged first.

Copy link
Member

Choose a reason for hiding this comment

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

Why can't the file be added in docs/source/_static instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Why can't the file be added in docs/source/_static instead?

That is something Joris also suggested, but at the end decided it could stay as is. I do not mind changing, if it is preferred. cc @jorisvandenbossche

Copy link
Member

Choose a reason for hiding this comment

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

@kou what would be the goal of that variable? So that you can build the docs locally with a different path (one that would match the local path)?
That still won't help that you can test this locally when building the arrow docs, though, as it the javascript code needs the structure of different versions in subdirectories as we have in that arrow-site branch.

Copy link
Member

Choose a reason for hiding this comment

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

Yes. I wanted to solve "in practice you can't test a change in this repo though, and you always have to test it in arrow-site as well to check the changes".

I thought that we can test almost features (I understand that we can't test all features) with this approach. We don't need to change src=.../versionwaning.js in all .html manually to test locally with this approach.

If this approach doesn't help versionwarning.js developers/maintainers, I'm OK without this approach. (I'm OK that they always need apache/arrow-site.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I propose to keep the current path to the JS file (docs/_static) and also the current way of injecting the src link in the html files. This way there will be no further changes needed in the arrow-site repo.

If we decide to move the file to the dev/ folder or use a variable in html (in my short attempt I wasn't able to make Sphinx work with variables) I think it is better to create a follow-up issue.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good to me!

Copy link
Member

Choose a reason for hiding this comment

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

I'm OK with it too.

@pitrou
Copy link
Member

pitrou commented Dec 5, 2022

For the record, this is how this looks in the Python docs:
https://docs.python.org/3.6/library/ftplib.html
This is the corresponding template code:
https://github.com/python/cpython/blob/main/Doc/tools/templates/layout.html#L3-L11

{# Add version warnings #}
{% block footer %}
{{ super() }}
<script type="text/javascript" src="/docs/versionwarning.js"></script>
Copy link
Member

Choose a reason for hiding this comment

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

I like docs/source/_static/ because https://github.com/apache/arrow/blob/master/docs/source/_static/versions.json uses docs/source/_static/.

@AlenkaF AlenkaF marked this pull request as ready for review December 20, 2022 12:16
@jorisvandenbossche jorisvandenbossche merged commit 305026f into apache:master Dec 23, 2022
@ursabot
Copy link

ursabot commented Dec 23, 2022

Benchmark runs are scheduled for baseline = 387e95a and contender = 305026f. 305026f is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed] test-mac-arm
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.1% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 305026f6 ec2-t3-xlarge-us-east-2
[Failed] 305026f6 test-mac-arm
[Finished] 305026f6 ursa-i9-9960x
[Finished] 305026f6 ursa-thinkcentre-m75q
[Finished] 387e95ad ec2-t3-xlarge-us-east-2
[Failed] 387e95ad test-mac-arm
[Finished] 387e95ad ursa-i9-9960x
[Finished] 387e95ad ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@AlenkaF AlenkaF deleted the ARROW-18363 branch January 3, 2023 07:46
EpsilonPrime pushed a commit to EpsilonPrime/arrow that referenced this pull request Jan 5, 2023
…g to stable/dev docs) (apache#14839)

This PR is a complementary work to apache/arrow-site#275.

It adds a version warning script tag to the `docs/source/_templates/layout.html` and _versionwarnings.js_ file into `docs/source/_static/`.

Authored-by: Alenka Frim <frim.alenka@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants