-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fb-LSDV-5367
- Loading branch information
Showing
574 changed files
with
34,258 additions
and
14,339 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -15,3 +15,5 @@ | |
!README.md | ||
!licenses/** | ||
!LICENSE | ||
!pyproject.toml | ||
!poetry.lock |
This file contains 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 |
---|---|---|
@@ -1 +1,4 @@ | ||
.github/ @farioas | ||
docs/.npmignore @hlomzik @Gondragos @nicholasrq | ||
docs/package.json @hlomzik @Gondragos @nicholasrq | ||
docs/yarn.lock @hlomzik @Gondragos @nicholasrq |
This file contains 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 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 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: "CodeQL config" | ||
|
||
paths-ignore: | ||
- label_studio/frontend/dist |
This file contains 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 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,12 +22,12 @@ jobs: | |
- uses: hmarr/[email protected] | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.head_sha }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
|
@@ -45,7 +45,7 @@ jobs: | |
if: always() | ||
run: cat ${{ env.REPORT_PATH }} | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: Security check results | ||
|
This file contains 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Blue | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
head_sha: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
blue: | ||
name: Blue | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.head_sha }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: blue --all-files --hook-stage pre-push |
This file contains 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 |
---|---|---|
|
@@ -46,6 +46,9 @@ on: | |
type: string | ||
required: false | ||
|
||
env: | ||
PYTHON_VERSION_FILE: "pyproject.toml" | ||
|
||
jobs: | ||
pypi: | ||
name: "PyPI" | ||
|
@@ -57,41 +60,41 @@ jobs: | |
- uses: hmarr/[email protected] | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Install toml | ||
run: | | ||
set -euo pipefail | ||
wget -q -O- "https://github.com/gnprice/toml-cli/releases/download/v0.2.3/toml-0.2.3-x86_64-linux.tar.gz" | tar -xz -C . | ||
mv toml-0.2.3-x86_64-linux/toml toml | ||
chmod +x toml | ||
- name: Manage version | ||
env: | ||
PROVIDED_VERSION: ${{ inputs.version }} | ||
run: | | ||
set -x | ||
set -euo pipefail | ||
version=$(sed "s/^v//g" <<< ${PROVIDED_VERSION}) | ||
sed -i "s/^__version__[ ]*=.*/__version__ = '${version}'/g" label_studio/__init__.py | ||
./toml set '${{ env.PYTHON_VERSION_FILE }}' tool.poetry.version "$version" > pyproject.toml.new | ||
mv -f pyproject.toml.new pyproject.toml | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Configure pip cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pypi-${{ hashFiles('deploy/requirements-mw.txt') }}-${{ hashFiles('deploy/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pypi- | ||
- name: Set up Poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
- name: Install dependencies | ||
- name: Install Python dependencies | ||
run: | | ||
pip install -r deploy/requirements-mw.txt | ||
pip install -r deploy/requirements.txt | ||
pip install -e . | ||
pip install twine | ||
poetry install --with build | ||
- name: Collect static | ||
run: | | ||
python label_studio/manage.py collectstatic | ||
poetry run python label_studio/manage.py collectstatic | ||
- name: Download feature flags | ||
env: | ||
|
@@ -105,7 +108,7 @@ jobs: | |
--retry-delay 10 \ | ||
-H "Authorization: $LAUNCHDARKLY_COMMUNITY_SDK_KEY" \ | ||
"https://sdk.launchdarkly.com/sdk/latest-all" >"$LAUNCHDARKLY_DOWNLOAD_PATH" | ||
if [ "$(jq 'has("flags")' <<< cat $LAUNCHDARKLY_DOWNLOAD_PATH)" = "true" ]; then | ||
if [ "$(jq 'has("flags")' <<< cat $LAUNCHDARKLY_DOWNLOAD_PATH)" = "true" ]; then | ||
echo "feature_flags.json is valid" | ||
else | ||
echo "feature_flags.json is invalid" | ||
|
@@ -116,19 +119,19 @@ jobs: | |
- name: Package | ||
env: | ||
VERSION_OVERRIDE: ${{ inputs.version }} | ||
run: python setup.py sdist bdist_wheel | ||
run: poetry build | ||
|
||
- name: Upload to PYPI | ||
if: inputs.upload_to_pypi | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} | ||
run: twine upload dist/* | ||
run: poetry run twine upload dist/* | ||
|
||
- name: Get PyPI package details | ||
id: pypi-package-details | ||
if: inputs.upload_to_pypi | ||
uses: actions/github-script@v6 | ||
uses: actions/github-script@v7 | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
with: | ||
|
@@ -156,7 +159,7 @@ jobs: | |
- name: Attach artifacts to release | ||
if: inputs.release-id | ||
uses: actions/github-script@v6 | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GIT_PAT }} | ||
script: | | ||
|
@@ -176,7 +179,7 @@ jobs: | |
- name: Upload to artifact | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Dist | ||
path: dist/ |
This file contains 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 |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
git config --global user.email '[email protected]' | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: "${{ github.repository_owner }}/${{ env.HELM_CHART_REPO_NAME }}" | ||
token: ${{ secrets.GIT_PAT }} | ||
|
Oops, something went wrong.