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

Upgrade Website #3289

Closed
wants to merge 187 commits into from
Closed

Upgrade Website #3289

wants to merge 187 commits into from

Conversation

CristianLara
Copy link
Contributor

Context

This is the Ax counterpart to the same upgrade in Botorch: pytorch/botorch#2653

Motivation

We are already using most of the correct tooling but it has become very out of date and is tied together with scripts that are difficult to maintain. Upgrade our tooling by updating to latest versions and dramatically simplifying our setup/deploy scripts.

Includes:

  • Upgrade Docusaurus from V1 to V3
  • Utilize new MDX support in Docusaurus by converting our tutorials to MDX (previously converted to html)
  • Tutorials link to Colab for easy execution
  • Website versioning is now handled natively through Docusaurus
  • New website versions are only created for major and minor releases (not patches)
  • Build and Deploy workflows have been dramatically simplified
  • Change Sphinx theme to ReadTheDocs
  • API Reference is still built using Sphinx but is now hosted by ReadTheDocs. ReadTheDocs also handles versioning.
  • Legacy website will be frozen and available at archive.ax.dev
    • Served by Vercel from the archive branch
  • Website now supports dark mode
Before After
image image
image image
image image
image image

Considerations

  • Our tutorials are natively embedded and versioned in the website using Docusaurus, but our sphinx-generated API reference is not. ReadTheDocs will create new version of the sphinx docs for every new release tag in our github repo.
  • Continue using same integrations for Algolia Search and Google Analytics
  • The number and type of github workflows we have remain the same, but the complexity of the workflows and the supporting scripts has been simplified.

Test Plan

docusaurus-bot and others added 30 commits August 30, 2024 17:30
Allow this repo to use the same github actions as the origin. The scripts manually push changes to the `gh-pages` branch for website deployment so we need to update some references to do it safely
This fork doesn't have the correct secrets so I doubt it could actually update anything, but lets be safe and also save us some build failures
Deploy: Remove unsafe references to facebook/Ax
So that we don't have to create fake releases just to re-deploy the website while testing
Deploy: Allow triggering deploys manually
A more lightweight way to update the website while testing, skips automated testing
Don't need this in fork
When using pinned botorch i keep getting the error

```
ModuleNotFoundError: No module named 'botorch.acquisition.multi_objective.base'
```
I see this happening on the main repo as well, working around it for now as this is the path used for nightly crons
…latest

Actions: Publish website using latest BoTorch
efb4fc1 is missing these environment variables, without them we are seeing the same issue as before
…atest

Actions: Publish website, actually use latest
We don't have docusaurus-bot in this repo so let's specify my user. I may need to add an auth token for myself if this fails.

Also don't execute tutorials, it adds like 2 hours to the build time and is not necessary for this phase of testing.
Actions: Specify user for publishing website
Actions: Add github token for publishing website
The previous code attempted to create these same strings using the actions `github` environment variable but these are not available in the shell script. It may be possible to pass in the variable but we can just be explicit here instead that this is intended to be done by the bot.

The name and email are provided by the official actions/checkout@v4 documentation: https://github.com/actions/checkout?tab=readme-ov-file#push-a-commit-using-the-built-in-token
…ctions-bot

Actions: Publish Website use github actions bot
Also temporarily disable google analytics and algolia
These don't need to be configured when deploying from a local machine
This is the result of running
```
npx @docusaurus/migrate migrate website website-v2
```

There are further automated scripts to assist with migrating individual pages, and manual steps will also be necessary. The website will not properly load yet, this commit is mostly to more easily compare the diffs between steps.
This was incorrectly migrated. We will manually migrate our CSS in a later step
This was added as a demonstration of the feature, we can consider adding this feature back in the future.
These were disabled to speed up testing during development. Re-enabling now in preparation for opening pull request.
This script was simplified in the botorch repo, we want to keep the setups as similar as possible between the two repos so we duplicate the changes here.

We can consider truly sharing this part of the setup in the future by making this script a shared Github Action.
This was introduced for testing purposed. We can still manually trigger the workflows from the github UI
sphinx-rtd-theme v3.0.0 supports sphinx v8
We were keeping this around as a convenient reference during the upgrade, no longer necessary.
Reverting these files back to their upstream versions after bad merge.
There are some changes to the tutorials in upstream. Since we moved the files around we can't just resolve merge conflicts. Instead let's just overwrite with the latest, this has the benefit of wiping the data from running the tutorials locally from testing. In the next commit I'll add the code cells again to support google. colab
duplicate of fa2a2e8 after catching up with latest origin
Org and website references should point to the official names and links. Further preparation for merging back into upstream.

There's a lingering reference in the algolia setup but we'll update that separately
Preparation for merge into upstream
Still missing appId, will add that once I have access
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jan 30, 2025
The fork was hosted at /Ax/ but the official website does not use a baseUrl
@facebook-github-bot
Copy link
Contributor

@CristianLara has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@CristianLara has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.01%. Comparing base (9bd4c16) to head (89b5273).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3289   +/-   ##
=======================================
  Coverage   96.01%   96.01%           
=======================================
  Files         518      518           
  Lines       52132    52132           
=======================================
  Hits        50057    50057           
  Misses       2075     2075           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

CristianLara added a commit to CristianLara/Ax that referenced this pull request Jan 31, 2025
Summary:
## Context

This is the Ax counterpart to the same upgrade in Botorch: pytorch/botorch#2653

## Motivation

We are already using most of the correct tooling but it has become very out of date and is tied together with scripts that are difficult to maintain. Upgrade our tooling by updating to latest versions and dramatically simplifying our setup/deploy scripts.

Includes:
- Upgrade Docusaurus from V1 to V3
- Utilize new MDX support in Docusaurus by converting our tutorials to MDX (previously converted to html)
- Tutorials link to Colab for easy execution
- Website versioning is now handled natively through Docusaurus
- New website versions are only created for major and minor releases (not patches)
- Build and Deploy workflows have been dramatically simplified
- Change Sphinx theme to ReadTheDocs
- API Reference is still built using Sphinx but is now hosted by ReadTheDocs. ReadTheDocs also handles versioning.
- Legacy website will be frozen and available at [archive.ax.dev](archive.ax.dev)
    - Served by Vercel from the `archive` branch
- Website now supports dark mode

| Before    | After |
| -------- | ------- |
|        <img width="1325" alt="image" src="https://github.com/user-attachments/assets/4af73120-f125-47e2-8285-bd01f4251ee9" />         |      <img width="1330" alt="image" src="https://github.com/user-attachments/assets/ea17c47c-5012-47ab-a9d2-4b7e9c103cb0" />      |
| <img width="1328" alt="image" src="https://github.com/user-attachments/assets/3dbde70a-8b84-43a4-8374-362f594de7fc" /> | <img width="1332" alt="image" src="https://github.com/user-attachments/assets/c779b7dd-76b9-4eb3-9b08-ca663732d7ec" />  |
| <img width="1328" alt="image" src="https://github.com/user-attachments/assets/25d74ed7-4536-43a3-8654-ed291ae50cf3" /> | <img width="1331" alt="image" src="https://github.com/user-attachments/assets/e2438746-d975-4a09-96b5-d73e5d1a9980" /> |
| <img width="1327" alt="image" src="https://github.com/user-attachments/assets/bcf71617-a537-45e4-a5e8-452de946a238" /> | <img width="1277" alt="image" src="https://github.com/user-attachments/assets/71b34ff9-1aaf-4c39-ade1-7bb346aad317" /> |

## Considerations
- Our tutorials are natively embedded and versioned in the website using Docusaurus, but our sphinx-generated API reference is not. ReadTheDocs will create new version of the sphinx docs for every new release tag in our github repo.
- Continue using same integrations for Algolia Search and Google Analytics
- The number and type of github workflows we have remain the same, but the complexity of the workflows and the supporting scripts has been simplified.

Pull Request resolved: facebook#3289

Test Plan:
- I've enabled all the workflows in my PR and everything is passing [https://github.com/CristianLara/botorch/actions](https://github.com/CristianLara/botorch/actions)
    - Pypy deploy and codecov are failing as expected due to missing credentials
- Website for my fork is being actively built and served at [cristianlara.me/Ax](cristianlara.me/Ax)
- API Reference is being built and served by ReadTheDocs at [https://ax.readthedocs.io/](https://ax.readthedocs.io/)

Differential Revision: D68916590

Pulled By: CristianLara
CristianLara added a commit to CristianLara/Ax that referenced this pull request Jan 31, 2025
Summary:
Pull Request resolved: facebook#3294

## Context

This is the Ax counterpart to the same upgrade in Botorch: pytorch/botorch#2653

## Motivation

We are already using most of the correct tooling but it has become very out of date and is tied together with scripts that are difficult to maintain. Upgrade our tooling by updating to latest versions and dramatically simplifying our setup/deploy scripts.

Includes:
- Upgrade Docusaurus from V1 to V3
- Utilize new MDX support in Docusaurus by converting our tutorials to MDX (previously converted to html)
- Tutorials link to Colab for easy execution
- Website versioning is now handled natively through Docusaurus
- New website versions are only created for major and minor releases (not patches)
- Build and Deploy workflows have been dramatically simplified
- Change Sphinx theme to ReadTheDocs
- API Reference is still built using Sphinx but is now hosted by ReadTheDocs. ReadTheDocs also handles versioning.
- Legacy website will be frozen and available at [archive.ax.dev](archive.ax.dev)
    - Served by Vercel from the `archive` branch
- Website now supports dark mode

| Before    | After |
| -------- | ------- |
|        <img width="1325" alt="image" src="https://github.com/user-attachments/assets/4af73120-f125-47e2-8285-bd01f4251ee9" />         |      <img width="1330" alt="image" src="https://github.com/user-attachments/assets/ea17c47c-5012-47ab-a9d2-4b7e9c103cb0" />      |
| <img width="1328" alt="image" src="https://github.com/user-attachments/assets/3dbde70a-8b84-43a4-8374-362f594de7fc" /> | <img width="1332" alt="image" src="https://github.com/user-attachments/assets/c779b7dd-76b9-4eb3-9b08-ca663732d7ec" />  |
| <img width="1328" alt="image" src="https://github.com/user-attachments/assets/25d74ed7-4536-43a3-8654-ed291ae50cf3" /> | <img width="1331" alt="image" src="https://github.com/user-attachments/assets/e2438746-d975-4a09-96b5-d73e5d1a9980" /> |
| <img width="1327" alt="image" src="https://github.com/user-attachments/assets/bcf71617-a537-45e4-a5e8-452de946a238" /> | <img width="1277" alt="image" src="https://github.com/user-attachments/assets/71b34ff9-1aaf-4c39-ade1-7bb346aad317" /> |

## Considerations
- Our tutorials are natively embedded and versioned in the website using Docusaurus, but our sphinx-generated API reference is not. ReadTheDocs will create new version of the sphinx docs for every new release tag in our github repo.
- Continue using same integrations for Algolia Search and Google Analytics
- The number and type of github workflows we have remain the same, but the complexity of the workflows and the supporting scripts has been simplified.

Pull Request resolved: facebook#3289

Test Plan:
- I've enabled all the workflows in my PR and everything is passing [https://github.com/CristianLara/botorch/actions](https://github.com/CristianLara/botorch/actions)
    - Pypy deploy and codecov are failing as expected due to missing credentials
- Website for my fork is being actively built and served at [cristianlara.me/Ax](cristianlara.me/Ax)
- API Reference is being built and served by ReadTheDocs at [https://ax.readthedocs.io/](https://ax.readthedocs.io/)

Differential Revision: D68916590

Pulled By: CristianLara
CristianLara added a commit to CristianLara/Ax that referenced this pull request Jan 31, 2025
Summary:
Pull Request resolved: facebook#3294

## Context

This is the Ax counterpart to the same upgrade in Botorch: pytorch/botorch#2653

## Motivation

We are already using most of the correct tooling but it has become very out of date and is tied together with scripts that are difficult to maintain. Upgrade our tooling by updating to latest versions and dramatically simplifying our setup/deploy scripts.

Includes:
- Upgrade Docusaurus from V1 to V3
- Utilize new MDX support in Docusaurus by converting our tutorials to MDX (previously converted to html)
- Tutorials link to Colab for easy execution
- Website versioning is now handled natively through Docusaurus
- New website versions are only created for major and minor releases (not patches)
- Build and Deploy workflows have been dramatically simplified
- Change Sphinx theme to ReadTheDocs
- API Reference is still built using Sphinx but is now hosted by ReadTheDocs. ReadTheDocs also handles versioning.
- Legacy website will be frozen and available at [archive.ax.dev](archive.ax.dev)
    - Served by Vercel from the `archive` branch
- Website now supports dark mode

| Before    | After |
| -------- | ------- |
|        <img width="1325" alt="image" src="https://github.com/user-attachments/assets/4af73120-f125-47e2-8285-bd01f4251ee9" />         |      <img width="1330" alt="image" src="https://github.com/user-attachments/assets/ea17c47c-5012-47ab-a9d2-4b7e9c103cb0" />      |
| <img width="1328" alt="image" src="https://github.com/user-attachments/assets/3dbde70a-8b84-43a4-8374-362f594de7fc" /> | <img width="1332" alt="image" src="https://github.com/user-attachments/assets/c779b7dd-76b9-4eb3-9b08-ca663732d7ec" />  |
| <img width="1328" alt="image" src="https://github.com/user-attachments/assets/25d74ed7-4536-43a3-8654-ed291ae50cf3" /> | <img width="1331" alt="image" src="https://github.com/user-attachments/assets/e2438746-d975-4a09-96b5-d73e5d1a9980" /> |
| <img width="1327" alt="image" src="https://github.com/user-attachments/assets/bcf71617-a537-45e4-a5e8-452de946a238" /> | <img width="1277" alt="image" src="https://github.com/user-attachments/assets/71b34ff9-1aaf-4c39-ade1-7bb346aad317" /> |

## Considerations
- Our tutorials are natively embedded and versioned in the website using Docusaurus, but our sphinx-generated API reference is not. ReadTheDocs will create new version of the sphinx docs for every new release tag in our github repo.
- Continue using same integrations for Algolia Search and Google Analytics
- The number and type of github workflows we have remain the same, but the complexity of the workflows and the supporting scripts has been simplified.

Pull Request resolved: facebook#3289

Test Plan:
- I've enabled all the workflows in my PR and everything is passing [https://github.com/CristianLara/botorch/actions](https://github.com/CristianLara/botorch/actions)
    - Pypy deploy and codecov are failing as expected due to missing credentials
- Website for my fork is being actively built and served at [cristianlara.me/Ax](cristianlara.me/Ax)
- API Reference is being built and served by ReadTheDocs at [https://ax.readthedocs.io/](https://ax.readthedocs.io/)

Differential Revision: D68916590

Pulled By: CristianLara
@facebook-github-bot
Copy link
Contributor

@CristianLara merged this pull request in 4702b26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants