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

More utils doc #25457

Merged
merged 5 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

4. Wait for the tests on the release branch to be completed and be green (otherwise revert and fix bugs)

5. Add a tag in git to mark the release: "git tag v<VERSION> -m 'Adds tag v<VERSION> for pypi' "
5. On the release branch, add a tag in git to mark the release: "git tag v<VERSION> -m 'Adds tag v<VERSION> for pypi' "
Push the tag to git: git push --tags origin v<RELEASE>-release

6. Build both the sources and the wheel. Do not change anything in setup.py between
Expand Down
2 changes: 1 addition & 1 deletion utils/check_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Utility that checks the big table in the index.md of the doc and potentially updates it.
Utility that checks the big table in the file docs/source/en/index.md and potentially updates it.

Use from the root of the repo with:

Expand Down
4 changes: 2 additions & 2 deletions utils/check_task_guides.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Utility that checks the list of models that can be used for each in task (as defined in the task-specific pages of the
doc) is up to date and potentially fixes it.
Utility that checks the list of models in the tips in the task-specific pages of the doc is up to date and potentially
fixes it.

Use from the root of the repo with:

Expand Down
2 changes: 1 addition & 1 deletion utils/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

# All paths are defined with the intent that this script should be run from the root of the repo.
PATH_TO_EXAMPLES = "examples/"
# This maps a type of file to the patter to look for when searching where the version is defined, as well as the
# This maps a type of file to the pattern to look for when searching where the version is defined, as well as the
# template to follow when replacing it with the new version.
REPLACE_PATTERNS = {
"examples": (re.compile(r'^check_min_version\("[^"]+"\)\s*$', re.MULTILINE), 'check_min_version("VERSION")\n'),
Expand Down
3 changes: 1 addition & 2 deletions utils/sort_auto_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import argparse
import os
import re
from typing import Optional


# Path are set with the intent you should run this script from the root of the repo.
Expand All @@ -46,7 +45,7 @@
_re_identifier = re.compile(r'\s*\(\s*"(\S[^"]+)"')


def sort_auto_mapping(fname: str, overwrite: bool = False) -> Optional[bool]:
def sort_auto_mapping(fname: str, overwrite: bool = False) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean the following, yes, the return signature should be changed too (good catch!)

    Returns:
        `Optional[bool]`: Returns `None` if `overwrite=True`. Otherwise returns `True` if the file has an auto-mapping
improperly sorted, `False` if the file is okay.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually put back the optional and fixed the return so it's correct.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good for me!

"""
Sort all auto mappings in a file.

Expand Down