Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jakep72 authored Jan 23, 2025
2 parents 23202c1 + 56cd118 commit b2d8bd9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 99 deletions.
93 changes: 0 additions & 93 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,96 +47,3 @@ jobs:
with:
body: ${{steps.github_release.outputs.changelog}}
draft: true

- name: Create release url file
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt

- name: Save release url file for publish
uses: actions/upload-artifact@v1
with:
name: release_url
path: release_url.txt

publish:
needs: [release]

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
submodules: true

- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: '3.9'

- name: Install main
shell: bash -l {0}
run: |
pip install .
- name: Run pyinstaller
shell: bash -l {0}
run: |
pip install pyinstaller
pyinstaller labelme.spec
- name: Load release url file from release job
uses: actions/download-artifact@v1
with:
name: release_url

- name: Get release file name & upload url
id: get_release_info
run: |
echo "::set-output name=upload_url::$(cat release_url/release_url.txt)"
- name: Upload release executable on macOS & Linux
id: upload_release_executable_macos_linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: ./dist/labelme
asset_name: labelme-${{ runner.os }}
asset_content_type: application/octet-stream
if: runner.os != 'Windows'

- name: Upload release executable on Windows
id: upload_release_executable_windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: ./dist/labelme.exe
asset_name: Labelme.exe
asset_content_type: application/octet-stream
if: runner.os == 'Windows'

- name: Create dmg for macOS
run: |
npm install -g create-dmg
cd dist
create-dmg Labelme.app || test -f Labelme\ 0.0.0.dmg
mv Labelme\ 0.0.0.dmg Labelme.dmg
if: runner.os == 'macOS'

- name: Upload release app on macOS
id: upload_release_app_macos
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: ./dist/Labelme.dmg
asset_name: Labelme.dmg
asset_content_type: application/octet-stream
if: runner.os == 'macOS'
2 changes: 1 addition & 1 deletion labelme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# 2. MINOR version when you add functionality in a backwards-compatible manner;
# 3. PATCH version when you make backwards-compatible bug fixes.
# e.g., 1.0.0a0, 1.0.0a1, 1.0.0b0, 1.0.0rc0, 1.0.0, 1.0.0.post0
__version__ = "5.6.0"
__version__ = "5.6.1"

QT4 = QT_VERSION[0] == "4"
QT5 = QT_VERSION[0] == "5"
Expand Down
2 changes: 1 addition & 1 deletion labelme/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ def __init__(
self.statusBar().show()

if output_file is not None and self._config["auto_save"]:
logger.warn(
logger.warning(
"If `auto_save` argument is True, `output_file` argument "
"is ignored and output filename is automatically "
"set as IMAGE_BASENAME.json."
Expand Down
4 changes: 2 additions & 2 deletions labelme/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def update_dict(target_dict, new_dict, validate_item=None):
if validate_item:
validate_item(key, value)
if key not in target_dict:
logger.warn("Skipping unexpected key in config: {}".format(key))
logger.warning("Skipping unexpected key in config: {}".format(key))
continue
if isinstance(target_dict[key], dict) and isinstance(value, dict):
update_dict(target_dict[key], value, validate_item=validate_item)
Expand All @@ -34,7 +34,7 @@ def get_default_config():
try:
shutil.copy(config_file, user_config_file)
except Exception:
logger.warn("Failed to save config: {}".format(user_config_file))
logger.warning("Failed to save config: {}".format(user_config_file))

return config

Expand Down
2 changes: 1 addition & 1 deletion labelme/utils/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def shapes_to_label(img_shape, shapes, label_name_to_value):


def labelme_shapes_to_label(img_shape, shapes):
logger.warn(
logger.warning(
"labelme_shapes_to_label is deprecated, so please use " "shapes_to_label."
)

Expand Down
2 changes: 1 addition & 1 deletion labelme/widgets/label_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(
# completion
completer = QtWidgets.QCompleter()
if not QT5 and completion != "startswith":
logger.warn(
logger.warning(
"completion other than 'startswith' is only "
"supported with Qt5. Using 'startswith'"
)
Expand Down

0 comments on commit b2d8bd9

Please sign in to comment.