<commit_before>name: build-release

on:
  workflow_dispatch:
    inputs:
      tag:
        description: "tag: git tag you want create. (sample 1.0.0)"
        required: true
      dry_run:
        description: "dry_run: true will never create relase/nuget."
        required: true
        default: "false"

env:
  DRY_RUN_BRANCH_PREFIX: "test_release"

jobs:
  update-packagejson:
    runs-on: ubuntu-latest
    env:
      GIT_TAG: ${{ github.event.inputs.tag }}
      TARGET_FILE: ./src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/package.json
      DRY_RUN: ${{ github.event.inputs.dry_run }}
    outputs:
      sha: ${{ steps.commit.outputs.sha }}
    steps:
      - uses: actions/checkout@v2
      - name: before
        run: cat ${{ env.TARGET_FILE}}
      - name: update package.json to version ${{ env.GIT_TAG }}
        run: sed -i -e "s/\(\"version\":\) \"\(.*\)\",/\1 \"${{ env.GIT_TAG }}\",/" ${{ env.TARGET_FILE }}
      - name: after
        run: cat ${{ env.TARGET_FILE}}
      - name: Commit files
        id: commit
        run: |
          git config --local user.email "41898282+github-actions[bot]@<EMAIL>"
          git config --local user.name "github-actions[bot]"
          git commit -m "feat: Update package.json to ${{ env.GIT_TAG }}" -a
          echo "::set-output name=sha::$(git rev-parse HEAD)"
      - name: check sha
        run: echo "SHA ${SHA}"
        env:
          SHA: ${{ steps.commit.outputs.sha }}
      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: ${{ github.ref }}
          tags: false
        if: env.DRY_RUN == 'false'
      - name: Push changes (dry_run)
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: ${{ env.DRY_RUN_BRANCH_PREFIX }}-${{ env.GIT_TAG }}
          tags: false
        if: env.DRY_RUN == 'true'

  build-dotnet:
    needs: [update-packagejson]
    runs-on: ubuntu-latest
    timeout-minutes: 10
    env:
      GIT_TAG: ${{ github.event.inputs.tag }}
      DOTNET_CLI_TELEMETRY_OPTOUT: 1
      DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
      NUGET_XMLDOC_MODE: skip
      DOTNET_SDK_VERSION_3: "3.1.403"
      DOTNET_SDK_VERSION_5: "5.0.100"
    steps:
      - run: echo ${{ needs.update-packagejson.outputs.sha }}
      - uses: actions/checkout@v2
        with:
          ref: ${{ needs.update-packagejson.outputs.sha }}
      - uses: actions/setup-dotnet@v1
        with:
          dotnet-version: "${{ env.DOTNET_SDK_VERSION_3 }}"
      - uses: actions/setup-dotnet@v1
        with:
          dotnet-version: "${{ env.DOTNET_SDK_VERSION_5 }}"
      # build
      - run: dotnet build ./src/MagicOnion/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Abstractions/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Shared/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Client/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Server/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Server.HttpGateway/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Server.Redis/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Server.Authentication/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      #- run: dotnet build ./src/MagicOnion.Server.OpenTelemetry/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.MSBuild.Tasks/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Generator/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      # test
      # - run: dotnet test ./tests/MagicOnion.NetCoreTests/ -c Release
      # - run: dotnet test ./tests/MagicOnion.Hosting.Tests/ -c Release
      # pack nuget
      - run: dotnet pack ./src/MagicOnion/MagicOnion.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Abstractions/MagicOnion.Abstractions.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Shared/MagicOnion.Shared.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Client/MagicOnion.Client.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Server/MagicOnion.Server.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Server.HttpGateway/MagicOnion.Server.HttpGateway.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Server.Redis/MagicOnion.Server.Redis.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Server.Authentication/MagicOnion.Server.Authentication.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      #- run: dotnet pack ./src/MagicOnion.Server.OpenTelemetry/MagicOnion.Server.OpenTelemetry.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.MSBuild.Tasks/MagicOnion.MSBuild.Tasks.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Generator/MagicOnion.Generator.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - uses: actions/upload-artifact@v1
        with:
          name: nuget
          path: ./publish/
      # publish moc
      - run: dotnet publish ./src/MagicOnion.Generator/ -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true /p:IncludeSymbolsInSingleFile=true --self-contained -r win-x64 -o ./src/MagicOnion.Generator/bin/moc/win-x64
      - run: dotnet publish ./src/MagicOnion.Generator/ -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true /p:IncludeSymbolsInSingleFile=true --self-contained -r linux-x64 -o ./src/MagicOnion.Generator/bin/moc/linux-x64
      - run: dotnet publish ./src/MagicOnion.Generator/ -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true /p:IncludeSymbolsInSingleFile=true --self-contained -r osx-x64 -o ./src/MagicOnion.Generator/bin/moc/osx-x64
      - run: zip -r moc.${{ env.GIT_TAG }}.zip ./src/MagicOnion.Generator/bin/moc
      - uses: actions/upload-artifact@v1
        with:
          name: moc.${{ env.GIT_TAG }}.zip
          path: ./moc.${{ env.GIT_TAG }}.zip

  build-unity:
    needs: [update-packagejson]
    strategy:
      matrix:
        unity: ["2019.3.9f1"]
        include:
          - unity: 2019.3.9f1
            license: UNITY_2019_3
    env:
      GIT_TAG: ${{ github.event.inputs.tag }}
    runs-on: ubuntu-latest
    timeout-minutes: 15
    container:
      # https://hub.docker.com/r/gableroux/unity3d/tags
      image: gableroux/unity3d:${{ matrix.unity }}-linux-il2cpp
    steps:
      # Ubuntu 18.04 git is too old, use ppa latest git.
      - run: |
          apt-get update && apt-get install --no-install-recommends -y software-properties-common && add-apt-repository -y ppa:git-core/ppa
          apt-get update && apt-get install --no-install-recommends -y git
      - uses: actions/checkout@v2
        with:
          ref: ${{ needs.update-packagejson.outputs.sha }}
      # activate Unity from manual license file(ulf)
      - run: echo -n "$UNITY_LICENSE" >> .Unity.ulf
        env:
          UNITY_LICENSE: ${{ secrets[matrix.license] }}
      - name: Activate Unity, always returns a success. But if a subsequent run fails, the activation may have failed(if succeeded, shows `Next license update check is after` and not shows other message(like GUID != GUID). If fails not). In that case, upload the artifact's .alf file to https://license.unity3d.com/manual to get the .ulf file and set it to secrets.
        run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -manualLicenseFile .Unity.ulf || exit 0

      # execute scripts/Export Package
      - name: Export unitypackage
        run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
        working-directory: src/MagicOnion.Client.Unity
        env:
          UNITY_PACKAGE_VERSION: ${{ env.GIT_TAG }}

      # Store artifacts.
      - uses: actions/upload-artifact@v1
        with:
          name: MagicOnion.Client.Unity.${{ env.GIT_TAG }}.unitypackage
          path: ./src/MagicOnion.Client.Unity/MagicOnion.Client.Unity.${{ env.GIT_TAG }}.unitypackage

  create-release:
    if: github.event.inputs.dry_run == 'false'
    needs: [build-dotnet, build-unity]
    runs-on: ubuntu-latest
    env:
      DOTNET_CLI_TELEMETRY_OPTOUT: 1
      DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
      NUGET_XMLDOC_MODE: skip
      GIT_TAG: ${{ github.event.inputs.tag }}
    steps:
      - uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 3.1.101
      # Create Release
      - uses: actions/create-release@v1
        id: create_release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ env.GIT_TAG }}
          release_name: Ver.${{ env.GIT_TAG }}
          draft: true
          prerelease: false
      - uses: actions/download-artifact@v2-preview
      # Upload to NuGet
      - run: dotnet nuget push "./nuget/*.nupkg" --skip-duplicate -s https://www.nuget.org/api/v2/package -k ${{ secrets.NUGET_KEY }}
      # Upload to Releases(generator)
      - uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: ./moc.${{ env.GIT_TAG }}.zip/moc.${{ env.GIT_TAG }}.zip
          asset_name: moc.${{ env.GIT_TAG }}.zip
          asset_content_type: application/octet-stream
      # Upload to Releases(unitypackage)
      - uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}<commit_msg>fix: create release should refer after push sha<commit_after>name: build-release

on:
  workflow_dispatch:
    inputs:
      tag:
        description: "tag: git tag you want create. (sample 1.0.0)"
        required: true
      dry_run:
        description: "dry_run: true will never create relase/nuget."
        required: true
        default: "false"

env:
  DRY_RUN_BRANCH_PREFIX: "test_release"

jobs:
  update-packagejson:
    runs-on: ubuntu-latest
    env:
      GIT_TAG: ${{ github.event.inputs.tag }}
      TARGET_FILE: ./src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/package.json
      DRY_RUN: ${{ github.event.inputs.dry_run }}
    outputs:
      sha: ${{ steps.commit.outputs.sha }}
    steps:
      - uses: actions/checkout@v2
      - name: before
        run: cat ${{ env.TARGET_FILE}}
      - name: update package.json to version ${{ env.GIT_TAG }}
        run: sed -i -e "s/\(\"version\":\) \"\(.*\)\",/\1 \"${{ env.GIT_TAG }}\",/" ${{ env.TARGET_FILE }}
      - name: after
        run: cat ${{ env.TARGET_FILE}}
      - name: Commit files
        id: commit
        run: |
          git config --local user.email "41898282+github-actions[bot]@users.<EMAIL>"
          git config --local user.name "github-actions[bot]"
          git commit -m "feat: Update package.json to ${{ env.GIT_TAG }}" -a
          echo "::set-output name=sha::$(git rev-parse HEAD)"
      - name: check sha
        run: echo "SHA ${SHA}"
        env:
          SHA: ${{ steps.commit.outputs.sha }}
      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: ${{ github.ref }}
          tags: false
        if: env.DRY_RUN == 'false'
      - name: Push changes (dry_run)
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: ${{ env.DRY_RUN_BRANCH_PREFIX }}-${{ env.GIT_TAG }}
          tags: false
        if: env.DRY_RUN == 'true'

  build-dotnet:
    needs: [update-packagejson]
    runs-on: ubuntu-latest
    timeout-minutes: 10
    env:
      GIT_TAG: ${{ github.event.inputs.tag }}
      DOTNET_CLI_TELEMETRY_OPTOUT: 1
      DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
      NUGET_XMLDOC_MODE: skip
      DOTNET_SDK_VERSION_3: "3.1.403"
      DOTNET_SDK_VERSION_5: "5.0.100"
    steps:
      - run: echo ${{ needs.update-packagejson.outputs.sha }}
      - uses: actions/checkout@v2
        with:
          ref: ${{ needs.update-packagejson.outputs.sha }}
      - uses: actions/setup-dotnet@v1
        with:
          dotnet-version: "${{ env.DOTNET_SDK_VERSION_3 }}"
      - uses: actions/setup-dotnet@v1
        with:
          dotnet-version: "${{ env.DOTNET_SDK_VERSION_5 }}"
      # build
      - run: dotnet build ./src/MagicOnion/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Abstractions/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Shared/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Client/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Server/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Server.HttpGateway/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Server.Redis/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Server.Authentication/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      #- run: dotnet build ./src/MagicOnion.Server.OpenTelemetry/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.MSBuild.Tasks/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      - run: dotnet build ./src/MagicOnion.Generator/ -c Release -p:VersionPrefix=${{ env.GIT_TAG }}
      # test
      # - run: dotnet test ./tests/MagicOnion.NetCoreTests/ -c Release
      # - run: dotnet test ./tests/MagicOnion.Hosting.Tests/ -c Release
      # pack nuget
      - run: dotnet pack ./src/MagicOnion/MagicOnion.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Abstractions/MagicOnion.Abstractions.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Shared/MagicOnion.Shared.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Client/MagicOnion.Client.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Server/MagicOnion.Server.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Server.HttpGateway/MagicOnion.Server.HttpGateway.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Server.Redis/MagicOnion.Server.Redis.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Server.Authentication/MagicOnion.Server.Authentication.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      #- run: dotnet pack ./src/MagicOnion.Server.OpenTelemetry/MagicOnion.Server.OpenTelemetry.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.MSBuild.Tasks/MagicOnion.MSBuild.Tasks.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - run: dotnet pack ./src/MagicOnion.Generator/MagicOnion.Generator.csproj -c Release --no-build -p:VersionPrefix=${{ env.GIT_TAG }} -o ./publish
      - uses: actions/upload-artifact@v1
        with:
          name: nuget
          path: ./publish/
      # publish moc
      - run: dotnet publish ./src/MagicOnion.Generator/ -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true /p:IncludeSymbolsInSingleFile=true --self-contained -r win-x64 -o ./src/MagicOnion.Generator/bin/moc/win-x64
      - run: dotnet publish ./src/MagicOnion.Generator/ -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true /p:IncludeSymbolsInSingleFile=true --self-contained -r linux-x64 -o ./src/MagicOnion.Generator/bin/moc/linux-x64
      - run: dotnet publish ./src/MagicOnion.Generator/ -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true /p:IncludeSymbolsInSingleFile=true --self-contained -r osx-x64 -o ./src/MagicOnion.Generator/bin/moc/osx-x64
      - run: zip -r moc.${{ env.GIT_TAG }}.zip ./src/MagicOnion.Generator/bin/moc
      - uses: actions/upload-artifact@v1
        with:
          name: moc.${{ env.GIT_TAG }}.zip
          path: ./moc.${{ env.GIT_TAG }}.zip

  build-unity:
    needs: [update-packagejson]
    strategy:
      matrix:
        unity: ["2019.3.9f1"]
        include:
          - unity: 2019.3.9f1
            license: UNITY_2019_3
    env:
      GIT_TAG: ${{ github.event.inputs.tag }}
    runs-on: ubuntu-latest
    timeout-minutes: 15
    container:
      # https://hub.docker.com/r/gableroux/unity3d/tags
      image: gableroux/unity3d:${{ matrix.unity }}-linux-il2cpp
    steps:
      # Ubuntu 18.04 git is too old, use ppa latest git.
      - run: |
          apt-get update && apt-get install --no-install-recommends -y software-properties-common && add-apt-repository -y ppa:git-core/ppa
          apt-get update && apt-get install --no-install-recommends -y git
      - uses: actions/checkout@v2
        with:
          ref: ${{ needs.update-packagejson.outputs.sha }}
      # activate Unity from manual license file(ulf)
      - run: echo -n "$UNITY_LICENSE" >> .Unity.ulf
        env:
          UNITY_LICENSE: ${{ secrets[matrix.license] }}
      - name: Activate Unity, always returns a success. But if a subsequent run fails, the activation may have failed(if succeeded, shows `Next license update check is after` and not shows other message(like GUID != GUID). If fails not). In that case, upload the artifact's .alf file to https://license.unity3d.com/manual to get the .ulf file and set it to secrets.
        run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -manualLicenseFile .Unity.ulf || exit 0

      # execute scripts/Export Package
      - name: Export unitypackage
        run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
        working-directory: src/MagicOnion.Client.Unity
        env:
          UNITY_PACKAGE_VERSION: ${{ env.GIT_TAG }}

      # Store artifacts.
      - uses: actions/upload-artifact@v1
        with:
          name: MagicOnion.Client.Unity.${{ env.GIT_TAG }}.unitypackage
          path: ./src/MagicOnion.Client.Unity/MagicOnion.Client.Unity.${{ env.GIT_TAG }}.unitypackage

  create-release:
    if: github.event.inputs.dry_run == 'false'
    needs: [update-packagejson, build-dotnet, build-unity]
    runs-on: ubuntu-latest
    env:
      DOTNET_CLI_TELEMETRY_OPTOUT: 1
      DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
      NUGET_XMLDOC_MODE: skip
      GIT_TAG: ${{ github.event.inputs.tag }}
    steps:
      - uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 3.1.101
      # Create Release
      - uses: actions/create-release@v1
        id: create_release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ env.GIT_TAG }}
          release_name: Ver.${{ env.GIT_TAG }}
          commitish: ${{ needs.update-packagejson.outputs.sha }}
          draft: true
          prerelease: false
      - uses: actions/download-artifact@v2-preview
      # Upload to NuGet
      - run: dotnet nuget push "./nuget/*.nupkg" --skip-duplicate -s https://www.nuget.org/api/v2/package -k ${{ secrets.NUGET_KEY }}
      # Upload to Releases(generator)
      - uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: ./moc.${{ env.GIT_TAG }}.zip/moc.${{ env.GIT_TAG }}.zip
          asset_name: moc.${{ env.GIT_TAG }}.zip
          asset_content_type: application/octet-stream
      # Upload to Releases(unitypackage)
      - uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
{'fraction_non_alphanumeric': 0.14131218457101657, 'fraction_numerical': 0.008940158615717375, 'mean_word_length': 2.485675992628581, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1061910', 'n_tokens_mistral': 7337, 'n_tokens_neox': 6923, 'n_words': 1492}