-
Notifications
You must be signed in to change notification settings - Fork 3k
site: use virtualenv and add make lint #14428
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c617e4e
use virtualenv and add make lint
kevinjqliu 3bdc51c
use venv
kevinjqliu 6179d97
update command
kevinjqliu 94391dc
add to readme
kevinjqliu 0915efd
run docs ci on linux and mac
kevinjqliu bfda6aa
command
kevinjqliu 449d55d
style
kevinjqliu c3f51b3
Merge remote-tracking branch 'origin/main' into kevinjqliu/make-lint
kevinjqliu 338c24b
thx manu
kevinjqliu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ | |
| set -e | ||
|
|
||
| export REMOTE="iceberg_docs" | ||
| export VENV_DIR=".venv" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we ever clean up this dir?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i dont think so. i could add it to the |
||
|
|
||
| # Ensures the presence of a specified remote repository for documentation. | ||
| # If the remote doesn't exist, it adds it using the provided URL. | ||
|
|
@@ -34,12 +35,20 @@ create_or_update_docs_remote () { | |
| git fetch "${REMOTE}" | ||
| } | ||
|
|
||
| # Creates the virtual environment if it doesn't exist. | ||
| create_venv () { | ||
| if [ ! -d "${VENV_DIR}" ]; then | ||
| echo " --> creating virtual environment at ${VENV_DIR}" | ||
| python3 -m venv "${VENV_DIR}" | ||
| fi | ||
| } | ||
|
|
||
| # Installs or upgrades dependencies specified in the 'requirements.txt' file using pip. | ||
| install_deps () { | ||
| echo " --> install deps" | ||
|
|
||
| # Use pip to install or upgrade dependencies from the 'requirements.txt' file quietly | ||
| pip3 -q install -r requirements.txt --upgrade | ||
| # Use pip from venv to install or upgrade dependencies from the 'requirements.txt' file quietly | ||
| "${VENV_DIR}/bin/pip3" -q install -r requirements.txt --upgrade | ||
| } | ||
|
|
||
| # Checks if a provided argument is not empty. If empty, displays an error message and exits with a status code 1. | ||
|
|
@@ -186,16 +195,16 @@ pull_versioned_docs () { | |
|
|
||
| check_markdown_files () { | ||
| echo " --> check markdown file styles" | ||
| if ! python3 -m pymarkdown --config markdownlint.yml scan docs/docs/nightly/docs/*.md docs/*.md README.md | ||
| if ! "${VENV_DIR}/bin/python3" -m pymarkdown --config markdownlint.yml scan docs/docs/nightly/docs/*.md docs/*.md README.md | ||
| then | ||
| echo "Markdown style issues found. Please run './dev/lint.sh --fix' to fix them." | ||
| echo "Markdown style issues found. Please run 'make lint-fix' to fix them." | ||
| exit 1 | ||
| fi | ||
| } | ||
|
|
||
| fix_markdown_files () { | ||
| echo " --> fix markdown file styles" | ||
| python3 -m pymarkdown --config markdownlint.yml fix docs/docs/nightly/docs/*.md docs/*.md README.md | ||
| "${VENV_DIR}/bin/python3" -m pymarkdown --config markdownlint.yml fix docs/docs/nightly/docs/*.md docs/*.md README.md | ||
| } | ||
|
|
||
| # Cleans up artifacts and temporary files generated during documentation management. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,8 @@ set -e | |
|
|
||
| clean | ||
|
|
||
| create_venv | ||
|
|
||
| install_deps | ||
|
|
||
| pull_versioned_docs | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update README for these commands.