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

Replace add_javascript with add_js_file in Sphinx configuration script #4363

Merged
merged 5 commits into from
May 17, 2021

Conversation

harupy
Copy link
Member

@harupy harupy commented May 17, 2021

Signed-off-by: harupy 17039389+harupy@users.noreply.github.com

What changes are proposed in this pull request?

The current sphinx configuration script contains function or variables that no longer exist in the latest version of Sphinx (4.0.1). This PR replace them with valid ones.

#!/bin/bash -eo pipefail
make rsthtml
make javadocs

sphinx-build -b html -d build/doctrees  -W --keep-going source build/html
Running Sphinx v4.0.1
making output directory... done
WARNING: html_add_permalinks has been deprecated since v3.5.0. Please use html_permalinks and html_permalinks_icon instead.
WARNING: The config value `html_add_permalinks' has type `str', defaults to `_stable_repr_object'.

Extension error (languagesections):
Handler <function add_assets at 0x7efeadbe8ea0> for event 'builder-inited' threw an exception (exception: 'Sphinx' object has no attribute 'add_javascript')
make: *** [Makefile:70: rsthtml] Error 2

Exited with code exit status 2
CircleCI received exit code 2

https://app.circleci.com/pipelines/github/mlflow/mlflow/5602/workflows/f99cdd2b-109a-41a3-b43f-80d09af3ee97/jobs/7502

How is this patch tested?

Ensure the doc build successfully completes

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/projects: MLproject format, project running backends
  • area/scoring: Local serving, model deployment tools, spark UDFs
  • area/server-infra: MLflow server, JavaScript dev server
  • area/tracking: Tracking Service, tracking client APIs, autologging

Interface

  • area/uiux: Front-end, user experience, JavaScript, plotting
  • area/docker: Docker use across MLflow's components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

Language

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

Integrations

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

How should the PR be classified in the release notes? Choose one:

  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@github-actions github-actions bot added the rn/none List under Small Changes in Changelogs. label May 17, 2021
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
docs/source/conf.py Outdated Show resolved Hide resolved
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
html_add_permalinks = " "
html_permalinks_icon = " "
Copy link
Member Author

@harupy harupy May 17, 2021

Choose a reason for hiding this comment

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

Fix for:

WARNING: html_add_permalinks has been deprecated since v3.5.0. Please use html_permalinks and html_permalinks_icon instead.

app.add_javascript(JS_FILE)
app.add_js_file(JS_FILE)
Copy link
Member Author

Choose a reason for hiding this comment

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

Fix for:

Handler <function add_assets at 0x7efeadbe8ea0> for event 'builder-inited' threw an exception (exception: 'Sphinx' object has no attribute 'add_javascript')

Copy link
Collaborator

@WeichenXu123 WeichenXu123 left a comment

Choose a reason for hiding this comment

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

Great work!

@harupy
Copy link
Member Author

harupy commented May 17, 2021

@WeichenXu123 Thanks!

@harupy harupy merged commit 54bb5f4 into mlflow:master May 17, 2021
@harupy harupy deleted the replace-add-javascript branch May 17, 2021 03:27
@harupy harupy mentioned this pull request May 18, 2021
27 tasks
YQ-Wang pushed a commit to YQ-Wang/mlflow that referenced this pull request May 29, 2021
…cript (mlflow#4363)

* make sure docs build fails

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>

* use add_js_file

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>

* use html_permalinks

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>

* use bool

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>

* Use html_permalinks_icon

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: Yiqing Wang <yiqing@wangemail.com>
harupy added a commit to wamartin-aml/mlflow that referenced this pull request Jun 7, 2021
…cript (mlflow#4363)

* make sure docs build fails

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>

* use add_js_file

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>

* use html_permalinks

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>

* use bool

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>

* Use html_permalinks_icon

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn/none List under Small Changes in Changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants