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

Download header files from the gallery #563

Closed
wants to merge 13 commits into from
Closed

Conversation

ahms5
Copy link
Member

@ahms5 ahms5 commented Mar 22, 2024

Changes proposed in this pull request:

- requires pyfar/gallery#50

  • download the navbar, stylefiles and logos which where copied from gallery.
  • remove redundancies

after pyfar/gallery#50 is merged we need to change the branch to main

latest changes: (2024-03-24)

  • intoduce pyfar as subpage to create left sidebar and dymanic header
  • download all the static header stlyes logos, stylefiles from gallery automatically
    • '_static/css/custom.css',
    • '_static/favicon.ico',
    • '_static/header.rst',
    • 'resources/logos/pyfar_logos_fixed_size_pyfar.png'
  • requires properly implement the header nav-bar gallery#52

@ahms5 ahms5 changed the base branch from main to develop March 22, 2024 13:24
Copy link
Member

@f-brinkmann f-brinkmann left a comment

Choose a reason for hiding this comment

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

Generally approved, but to small comments

docs/conf.py Outdated
@@ -125,6 +127,29 @@
"default_mode": "light"
}

# -- download navbar and style files from gallery -----------------------------
branch = 'static-nav-bar'
Copy link
Member

Choose a reason for hiding this comment

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

This will be changed, once the pull in the gallery is merged, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

docs/conf.py Outdated
for file in folders_in:
url = link + file
filename = file
print(url)
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this or was it only for debugging?

@ahms5 ahms5 added the documentation Everything related to docstrings and comments label Mar 24, 2024
@ahms5 ahms5 requested a review from f-brinkmann March 24, 2024 16:44
docs/pyfar.rst Outdated Show resolved Hide resolved
@sikersten
Copy link
Member

Looks good to me, thanks for taking care! What I do not understand: why was the former content of index.rst moved to pyfar.rst, and then index.html is replaced with pyfar.html? Why can't header.rst just be included at the top in index.rst?

Co-authored-by: sikersten <70263411+sikersten@users.noreply.github.com>
@ahms5
Copy link
Member Author

ahms5 commented Mar 26, 2024

Looks good to me, thanks for taking care! What I do not understand: why was the former content of index.rst moved to pyfar.rst, and then index.html is replaced with pyfar.html? Why can't header.rst just be included at the top in index.rst?

Good question! Sphinx works with a hirachy and the root is always index. If we just have the pyfar page, then it would be fine. But now we have the gallery as mainpage and then the packages as subpages. So I added the header links in the index.rst by header.rst and added pyfar.rst as a subpage in the header. In this way the website is build without any hardcoding of headers (which my leads to bugs, we saw it in gallery). Additionally it also handels the toctree from pyfar.rst properly, which results in a nice sidebar. I hope this answers it, otherwise we can discuss nexttime.

.gitignore Outdated Show resolved Hide resolved
sikersten
sikersten previously approved these changes Mar 26, 2024
Copy link
Member

@sikersten sikersten left a comment

Choose a reason for hiding this comment

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

Thanks, I get it now! Approved!

@ahms5
Copy link
Member Author

ahms5 commented Mar 26, 2024

if we directly merge to main and rebuild the doc on readthedocs, we dont need a wait until the release

Co-authored-by: sikersten <70263411+sikersten@users.noreply.github.com>
@ahms5 ahms5 requested a review from sikersten March 26, 2024 16:48
@mberz mberz changed the title get duplicated files from gallery Download header files from the gallery Apr 3, 2024
sikersten
sikersten previously approved these changes Apr 5, 2024
pingelit
pingelit previously approved these changes Apr 5, 2024
Copy link
Contributor

@pingelit pingelit left a comment

Choose a reason for hiding this comment

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

Thanks, great change. That makes the pyfar page a lot more usable in my opinion with the side bar.
One minor comment, but I might not be getting the complete picture.

@@ -107,6 +110,7 @@
"navbar_start": ["navbar-logo"],
"navbar_end": ["navbar-icon-links", "theme-switcher"],
"navbar_align": "content",
"header_links_before_dropdown": 8,
Copy link
Contributor

Choose a reason for hiding this comment

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

This was 10 in the gallery. Is this by design?

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 think 8 is by definition no More Dropdown

@ahms5 ahms5 dismissed stale reviews from pingelit and sikersten via 980e956 April 5, 2024 12:14
@ahms5 ahms5 requested a review from pingelit April 5, 2024 12:20
@ahms5 ahms5 changed the base branch from develop to main April 5, 2024 12:23
@ahms5 ahms5 changed the base branch from main to develop April 5, 2024 12:28
@ahms5
Copy link
Member Author

ahms5 commented Apr 5, 2024

replaced by #569

@ahms5 ahms5 closed this Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Everything related to docstrings and comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants