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

[IO-1445][external] Changes to LocalDataset() & get_annotations() to account for local releases pulled with folders #678

Merged
merged 10 commits into from
Oct 24, 2023
Merged
Prev Previous commit
Next Next commit
Changed job filter so that it only targets darwin/future
JBWilkie committed Oct 12, 2023
commit 7475f082dfe4b9679c5457093bd18c15e09318dc
14 changes: 7 additions & 7 deletions .github/workflows/EVENT_pull_request.yml
Original file line number Diff line number Diff line change
@@ -31,15 +31,15 @@ jobs:
with:
files: ${{ needs.get_changed_files.outputs.python_changed_files }}

# typecheck:
# name: Analyse types in python
# needs: get_changed_files
# uses: ./.github/workflows/JOB_typecheck.yml
# with:
# files: ${{ needs.get_changed_files.outputs.python_changed_files }}
typecheck:
name: Analyse types in python
needs: get_changed_files
uses: ./.github/workflows/JOB_typecheck.yml
with:
files: ${{ needs.get_changed_files.outputs.python_changed_files }}

run_tests:
needs: [format, lint]
needs: [format, lint, typecheck]
name: Run tests
uses: ./.github/workflows/JOB_tests.yml

114 changes: 58 additions & 56 deletions .github/workflows/EVENT_release.yml
Original file line number Diff line number Diff line change
@@ -47,9 +47,8 @@ jobs:
needs: validate_tag
uses: ./.github/workflows/JOB_tests.yml

release:
needs: [run_tests]
if: startsWith(github.ref, 'refs/tags/v')
build:
needs: validate_tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -66,77 +65,80 @@ jobs:
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.3.1"

- name: Install dependencies
run: |
poetry install --no-interaction --no-root --all-extras -vvv
poetry build

- name: Add build to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/*
asset_name: ${{ env.release_id }}.tar.gz
asset_content_type: application/gzip

release:
needs: [run_tests, build]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Publish on pypi.org
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry publish --build
# poetry publish
echo "Publishing to pypi.org - Emulated"

test_release:
needs: [run_tests]
needs: [run_tests, build]
if: startsWith(github.ref, 'refs/tags/test-')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: pip install pip --upgrade
- name: Setup Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.3.1"
- name: Check secrets are set
run: |
if [[ -z "${{ secrets.TEST_PYPI_USERNAME }}" || -z "${{ secrets.TEST_PYPI_PASSWORD }}" ]]; then
echo "TEST_PYPI_USERNAME and TEST_PYPI_PASSWORD must be set"
exit 1
fi
- name: Publish on test.pypi.org
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
python ./deploy/nightly_package_setup.py
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config http-basic.test-pypi ${{ secrets.TEST_PYPI_USERNAME }} ${{ secrets.TEST_PYPI_PASSWORD }}

poetry publish --build --repository test-pypi
python ./deploy/revert_nightly_setup.py
poetry publish
echo "Publishing to test.pypi.org - Emulated"

# Linear tickets update

notify_release:
needs: [release]
if: success()
uses: ./.github/workflows/JOB_slack_message.yml
secrets: inherit
with:
icon: ":rocket:"
at_team: true
message: |
:tada: *${{ inputs.release_tag || github.event.release.tag_name }}* has been released!
:link:
- https://pypi.org/project/darwin-py
- ${{ github.event.release.html_url }}
needs: [release, test_release]
if: always() && contains(needs.*.result, 'success')
runs-on: ubuntu-latest
steps:
- name: Notify Slack
uses: ./.github/workflows/JOB_slack_message.yml
with:
icon: ":rocket:"
at_team: ${{ env.is_scheduled || !env.is_draft }}
secrets: inherit
message: |
:tada: *${{ env.release_tag }}* has been released!
:link:
- https://pypi.org/project/darwin-py
- ${{ github.event.release.html_url }}

notify_failed_release:
needs: [release]
if: failure()
uses: ./.github/workflows/JOB_slack_message.yml
secrets: inherit
with:
icon: ":warning:"
at_team: true
message: |
:warning: *${{ inputs.release_tag || github.event.release.tag_name }}* Release has failed to be released!

*An error occurred performing release, and you may need to release manually.*

:link:
- ${{ github.event.release.html_url }}
needs: [release, test_release]
if: always() && contains(needs.*.result, 'failure')
runs-on: ubuntu-latest
steps:
- name: Notify Slack
uses: ./.github/workflows/JOB_slack_message.yml
with:
secrets: inherit
icon: ":warning:"
at_team: true
message: |
:warning: *${{ env.release_tag }}* has failed to be released!

*An error occurred performing release, and you may need to release manually.*

:link:
- ${{ github.event.release.html_url }}
14 changes: 13 additions & 1 deletion .github/workflows/JOB_e2e.yml
Original file line number Diff line number Diff line change
@@ -58,5 +58,17 @@ jobs:

:link:
- https://github.com/v7labs/darwin-py/actions/runs/${{ github.run_id }}
:warning: ${{ github.workflow }} failed.
:warning: ${{ github.workflow }} failed

- name: Send Slack Notification
run: |
PAYLOAD=$(cat <<EOF
{
"channel": "#${{ vars.SLACK_CHANNEL }}",
"username": "${{ vars.SLACK_USERNAME }}",
"text": "",
"icon_emoji": "${{ vars.SLACK_ICON }}"
}
EOF
)
curl -X POST --data-urlencode "payload=$PAYLOAD" ${{ secrets.SLACK_WEBHOOK }}
2 changes: 1 addition & 1 deletion deploy/_filter_files.py
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ def main(argv: List[str]) -> None:
if file_extension.startswith("."):
file_extension = file_extension[1:]

files_out = [file for file in files_in if file.endswith(f".{file_extension}")]
files_out = [file for file in files_in if file.endswith(f".{file_extension}") if "darwin/future" in file]

print(" ".join(files_out))

44 changes: 0 additions & 44 deletions deploy/nightly_package_setup.py

This file was deleted.

41 changes: 0 additions & 41 deletions deploy/revert_nightly_setup.py

This file was deleted.

You are viewing a condensed version of this merge commit. You can view the full changes here.