From 6306374df89bc73d58250aab8fb19d874c8952fb Mon Sep 17 00:00:00 2001 From: SydZero <63630743+SydZero@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:14:01 -0700 Subject: [PATCH] reverted settings, deleted extra workflows --- backend/.github/workflows/codecov.yml | 49 ------- backend/.github/workflows/docker_image.yml | 54 ------- backend/.github/workflows/dotnet.yml | 28 ---- .../music-box-interactive-folder/prettier.yml | 32 ----- .../music-box-interactive-folder/test.yml | 27 ---- .../.github/workflows/musica/clang_format.yml | 54 ------- .../.github/workflows/musica/clang_tidy.yml | 59 -------- backend/.github/workflows/musica/docker.yml | 61 -------- .../musica/fetch_content_integration.yml | 44 ------ backend/.github/workflows/musica/gh_pages.yml | 134 ------------------ backend/.github/workflows/musica/mac.yml | 99 ------------- backend/.github/workflows/musica/pep8.yml | 45 ------ backend/.github/workflows/musica/pip.yml | 37 ----- backend/.github/workflows/musica/release.yml | 85 ----------- backend/.github/workflows/musica/ubuntu.yml | 82 ----------- backend/.github/workflows/musica/windows.yml | 124 ---------------- frontend/tsconfig.json | 7 +- 17 files changed, 2 insertions(+), 1019 deletions(-) delete mode 100644 backend/.github/workflows/codecov.yml delete mode 100644 backend/.github/workflows/docker_image.yml delete mode 100644 backend/.github/workflows/dotnet.yml delete mode 100644 backend/.github/workflows/music-box-interactive-folder/prettier.yml delete mode 100644 backend/.github/workflows/music-box-interactive-folder/test.yml delete mode 100644 backend/.github/workflows/musica/clang_format.yml delete mode 100644 backend/.github/workflows/musica/clang_tidy.yml delete mode 100644 backend/.github/workflows/musica/docker.yml delete mode 100644 backend/.github/workflows/musica/fetch_content_integration.yml delete mode 100644 backend/.github/workflows/musica/gh_pages.yml delete mode 100644 backend/.github/workflows/musica/mac.yml delete mode 100644 backend/.github/workflows/musica/pep8.yml delete mode 100644 backend/.github/workflows/musica/pip.yml delete mode 100644 backend/.github/workflows/musica/release.yml delete mode 100644 backend/.github/workflows/musica/ubuntu.yml delete mode 100644 backend/.github/workflows/musica/windows.yml diff --git a/backend/.github/workflows/codecov.yml b/backend/.github/workflows/codecov.yml deleted file mode 100644 index 765f02d..0000000 --- a/backend/.github/workflows/codecov.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Codecov Coverage - -on: - push: - branches: - - main - - codecov-workflows - pull_request: - branches: - - main - -jobs: - test: - runs-on: ubuntu-latest - - steps: - # Checkout code - - name: Checkout code - uses: actions/checkout@v2 - - # Setup .NET environment - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 6.0.x # Use the version your project requires - - # Restore dependencies - - name: Restore dependencies - run: dotnet restore - - # Build the project - - name: Build - run: dotnet build --no-restore - - # Step 5: Run tests and collect code coverage - - name: Test and calculate coverage - run: | - dotnet test --no-build --verbosity normal \ - /p:CollectCoverage=true /p:CoverletOutputFormat=opencover \ - /p:CoverletOutput=./TestResults/coverage.opencover.xml - - # Step 6: Upload the code coverage report to Codecov - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} # Add the Codecov token in the GitHub secrets - files: ./TestResults/coverage.opencover.xml # Ensure the correct path for the coverage file - flags: unittests - fail_ci_if_error: true \ No newline at end of file diff --git a/backend/.github/workflows/docker_image.yml b/backend/.github/workflows/docker_image.yml deleted file mode 100644 index a845ad3..0000000 --- a/backend/.github/workflows/docker_image.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Build and Deploy Docker Image - -on: - push: - branches: - - main - - docker_workflow - tags: - - 'v*.*.*' - workflow_dispatch: - -jobs: - build-and-push: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build Docker image - uses: docker/build-push-action@v4 - with: - context: . - file: Dockerfile - push: false - tags: ghcr.io/ncar/chemistry-cafe-api:build-temp - - - name: Build and push Docker image (latest) - if: github.ref == 'refs/heads/main' - uses: docker/build-push-action@v4 - with: - context: . - file: Dockerfile - push: true - tags: ghcr.io/ncar/chemistry-cafe-api:latest - - - name: Build and push Docker image (tagged) - if: startsWith(github.ref, 'refs/tags/') - uses: docker/build-push-action@v4 - with: - context: . - file: Dockerfile - push: true - tags: ghcr.io/ncar/chemistry-cafe-api:${{ github.ref_name }} \ No newline at end of file diff --git a/backend/.github/workflows/dotnet.yml b/backend/.github/workflows/dotnet.yml deleted file mode 100644 index 25f43e7..0000000 --- a/backend/.github/workflows/dotnet.yml +++ /dev/null @@ -1,28 +0,0 @@ -# This workflow will build a .NET project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net - -name: .NET - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 6.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --no-restore - - name: Test - run: dotnet test --no-build --verbosity normal diff --git a/backend/.github/workflows/music-box-interactive-folder/prettier.yml b/backend/.github/workflows/music-box-interactive-folder/prettier.yml deleted file mode 100644 index 815a2a1..0000000 --- a/backend/.github/workflows/music-box-interactive-folder/prettier.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Auto format javascript code with prettier - -on: - push: - branches: - - main - -jobs: - prettier: - runs-on: ubuntu-latest - steps: - - - name: Check out code - uses: actions/checkout@v3 - with: - ref: ${{ github.head_ref }} - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install packages - run: npm install - - - name: Format code - run: npm run format - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: prettier action fixes - title: Fixes by prettier action - body: This is an auto-generated PR with fixes by prettier. - branch: prettier-patches \ No newline at end of file diff --git a/backend/.github/workflows/music-box-interactive-folder/test.yml b/backend/.github/workflows/music-box-interactive-folder/test.yml deleted file mode 100644 index 5689ce7..0000000 --- a/backend/.github/workflows/music-box-interactive-folder/test.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Run Tests - -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Check out repository code - uses: actions/checkout@v2 - - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: 21 - - - name: Install dependencies - run: npm install - - - name: Run tests - run: npm run test \ No newline at end of file diff --git a/backend/.github/workflows/musica/clang_format.yml b/backend/.github/workflows/musica/clang_format.yml deleted file mode 100644 index 5b7c891..0000000 --- a/backend/.github/workflows/musica/clang_format.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Clang-Format - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - format: - name: Run Clang-Format - runs-on: ubuntu-latest - - steps: - - name: Install Clang-Format - run: sudo apt-get update && sudo apt-get install clang-format && clang-format --version - - - name: Check out code, run clang format, push changes - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Run clang-format - run: | - find include -type f \( -name '*.hpp' -or -name '*.h' \) -exec clang-format -i --style=file --verbose {} + - find src -type f \( -name '*.cpp' -or -name '*.c' \) -exec clang-format -i --style=file --verbose {} + - - - name: Check for changes - id: check-changes - run: git diff --exit-code - continue-on-error: true - - - name: Commit and push changes - # a failue of this step means changes were detected - if: steps.check-changes.outcome != 'success' - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git commit -am "Auto-format code using Clang-Format" || echo "No changes to commit" - - - name: Push changes to main-formatting branch - if: steps.check-changes.outcome != 'success' - run: git push origin HEAD:main-formatting - - - name: Create Pull Request - if: steps.check-changes.outcome != 'success' - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "Auto-format code using Clang-Format" - title: "Auto-format code changes" - body: "This is an automated pull request to apply code formatting using Clang-Format." - branch: main-formatting \ No newline at end of file diff --git a/backend/.github/workflows/musica/clang_tidy.yml b/backend/.github/workflows/musica/clang_tidy.yml deleted file mode 100644 index 59e815a..0000000 --- a/backend/.github/workflows/musica/clang_tidy.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Clang-Tidy - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - format: - name: Run clang-tidy - runs-on: ubuntu-latest - - steps: - - name: Install clang-tidy - run: sudo apt-get update && sudo apt-get install clang-tidy && clang-tidy --version - - - name: Check out code, run clang-tidy, push changes - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Run clang-tidy - # Currently disabled - if: false - run: | - find include -type f \( -name '*.hpp' -or -name '*.h' \) -exec clang-tidy --config-file="./.clang-tidy" --fix-errors {} + - find src -type f \( -name '*.cpp' -or -name '*.c' \) ! -path 'src/test/*' -exec clang-tidy --config-file="./.clang-tidy" --fix-errors {} + - find python -type f \( -name '*.cpp' -or -name '*.c' \) -exec clang-tidy --config-file="./.clang-tidy" --fix-errors {} + - - continue-on-error: true - - - name: Check for changes - id: check-changes - run: git diff --exit-code - continue-on-error: true - - - name: Commit and push changes - # a failue of this step means changes were detected - if: steps.check-changes.outcome != 'success' - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git commit -am "Auto-format code using clang-tidy" || echo "No changes to commit" - - - name: Push changes to clang-tidy-format branch - if: steps.check-changes.outcome != 'success' - run: git push origin HEAD:clang-tidy-format - - - name: Create Pull Request - if: steps.check-changes.outcome != 'success' - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "Auto-format code using clang-tidy" - title: "Auto-format code changes" - body: "This is an automated pull request to apply code formatting using clang-tidy." - branch: clang-tidy-format \ No newline at end of file diff --git a/backend/.github/workflows/musica/docker.yml b/backend/.github/workflows/musica/docker.yml deleted file mode 100644 index 58ac3bb..0000000 --- a/backend/.github/workflows/musica/docker.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Docker - -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true - -jobs: - docker-build-and-test: - name: Build and Test - ${{ matrix.dockerfile }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - dockerfile: - - Dockerfile - - Dockerfile.memcheck - - Dockerfile.fortran-gcc - - Dockerfile.openmp - - Dockerfile.mpi - - Dockerfile.mpi_openmp - - Dockerfile.python - - Dockerfile.pip - build_type: [Release, Debug] - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Delete huge unnecessary tools folder - run: rm -rf /opt/hostedtoolcache - - - name: Build Docker image - run: docker build -t musica -f docker/${{ matrix.dockerfile }} . --build-arg MUSICA_GIT_TAG=${{ github.sha }} --build-arg BUILD_TYPE=${{ matrix.build_type }} - - - name: Run tests in container - if: matrix.dockerfile != 'Dockerfile.coverage' && matrix.dockerfile != 'Dockerfile.pip' - run: docker run --name test-container -t musica bash -c 'make test ARGS="--rerun-failed --output-on-failure -j8"' - - - name: Run coverage tests in container - if: matrix.dockerfile == 'Dockerfile.coverage' - run: docker run --name test-container -t musica bash -c 'make coverage ARGS="--rerun-failed --output-on-failure -j8"' - - - name: Copy coverage from container - if: matrix.dockerfile == 'Dockerfile.coverage' - run: docker cp test-container:build/coverage.info . - - - name: Upload coverage report - if: matrix.dockerfile == 'Dockerfile.coverage' - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: coverage.info \ No newline at end of file diff --git a/backend/.github/workflows/musica/fetch_content_integration.yml b/backend/.github/workflows/musica/fetch_content_integration.yml deleted file mode 100644 index df04e84..0000000 --- a/backend/.github/workflows/musica/fetch_content_integration.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: FetchContentIntegration - -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true - -jobs: - docker-build-and-test: - name: Build and Test - ${{ matrix.dockerfile }} - runs-on: ubuntu-latest - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - dockerfile: - - Dockerfile.fortran-intel - - Dockerfile.fortran-gcc.integration - - Dockerfile.fortran-nvhpc - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Print branch name - run: echo "Branch name is $BRANCH_NAME" - - - name: Delete huge unnecessary tools folder - run: rm -rf /opt/hostedtoolcache - - - name: Build Docker image - run: docker build -t musica --build-arg MUSICA_GIT_TAG=${BRANCH_NAME} -f docker/${{ matrix.dockerfile }} . - - - name: Run tests in container - run: docker run --name test-container -t musica bash -c 'make test ARGS="--rerun-failed --output-on-failure -j8"' \ No newline at end of file diff --git a/backend/.github/workflows/musica/gh_pages.yml b/backend/.github/workflows/musica/gh_pages.yml deleted file mode 100644 index 3bd46fd..0000000 --- a/backend/.github/workflows/musica/gh_pages.yml +++ /dev/null @@ -1,134 +0,0 @@ -# Build and deploy documentation to GitHub Pages -name: GitHub Pages - -on: [ push, pull_request ] - -env: - DEFAULT_BRANCH: "release" - -jobs: - build-and-deploy: - name: Build and deploy to gh-pages - runs-on: ubuntu-24.04 - strategy: - matrix: - gcc-version: [13] - env: - CXX: g++-${{ matrix.gcc-version }} - CC: gcc-${{ matrix.gcc-version }} - FC: gfortran-${{ matrix.gcc-version }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - lfs: true - - - name: Debugging information - run: | - echo "github.ref:" ${{github.ref}} - echo "github.event_name:" ${{github.event_name}} - echo "github.head_ref:" ${{github.head_ref}} - echo "github.base_ref:" ${{github.base_ref}} - set -x - git rev-parse --abbrev-ref HEAD - git branch - git branch -a - git remote -v - python -V - pip list --not-required - pip list - - # Clone and set up the old gh-pages branch - - name: Clone old gh-pages - if: ${{ github.event_name == 'push' }} - run: | - set -x - git fetch - ( git branch gh-pages remotes/origin/gh-pages && git clone . --branch=gh-pages _gh-pages/ ) || mkdir _gh-pages - rm -rf _gh-pages/.git/ - mkdir -p _gh-pages/branch/ - - # If a push and default branch, copy build to _gh-pages/ as the "main" - # deployment. - - name: Build and copy documentation (default branch) - if: | - contains(github.event_name, 'push') && - contains(github.ref, env.DEFAULT_BRANCH) - run: | - set -x - mkdir -p _build/html/versions - - # create two copies of the documentation - # 1. the frozen version, represented as vX.X in the version switcher - docker build -t musica -f docker/Dockerfile.docs . - id=$(docker create musica) - docker cp $id:/build/docs/sphinx tmpdocs - docker rm -v $id - version=$(sed -nr "s/^release = f'v(.+)\{suffix\}'.*$/\1/p" docs/source/conf.py) - mv tmpdocs _build/html/versions/${version} - - # 2. stable, represented as vX.X (stable) in the version switcher - # edit conf.py to produce a version string that looks like vX.X (stable) - docker build -t musica -f docker/Dockerfile.docs --build-arg SUFFIX=" (stable)" . - id=$(docker create musica) - docker cp $id:/build/docs/sphinx tmpdocs - docker rm -v $id - mv tmpdocs _build/html/versions/stable - # Delete everything under _gh-pages/ that is from the - # primary branch deployment. Excludes the other branches - # _gh-pages/branch-* paths, and not including - # _gh-pages itself. - find _gh-pages/ -mindepth 1 ! -path '_gh-pages/branch*' ! -path '_gh-pages/versions*' -delete - rsync -a _build/html/versions/stable/* _gh-pages/ - mkdir -p _gh-pages/versions - rsync -a _build/html/versions/* _gh-pages/versions - # mv docs/switcher.json _gh-pages - - # If a push and not on default branch, then copy the build to - # _gh-pages/branch/$brname (transforming '/' into '--') - - name: Build and copy documentation (branch) - if: | - contains(github.event_name, 'push') && - !contains(github.ref, env.DEFAULT_BRANCH) - run: | - set -x - docker build -t musica -f docker/Dockerfile.docs . - id=$(docker create musica) - docker cp $id:/build/docs/sphinx tmpdocs - docker rm -v $id - brname="${{github.ref}}" - brname="${brname##refs/heads/}" - brdir=${brname//\//--} # replace '/' with '--' - rm -rf _gh-pages/branch/${brdir} - rsync -a tmpdocs/ _gh-pages/branch/${brdir} - - # Go through each branch in _gh-pages/branch/, if it's not a - # ref, then delete it. - - name: Delete old feature branches - if: ${{ github.event_name == 'push' }} - run: | - set -x - for brdir in `ls _gh-pages/branch/` ; do - brname=${brdir//--/\/} # replace '--' with '/' - if ! git show-ref remotes/origin/$brname ; then - echo "Removing $brdir" - rm -r _gh-pages/branch/$brdir/ - fi - done - - # Add the .nojekyll file - - name: nojekyll - if: ${{ github.event_name == 'push' }} - run: | - touch _gh-pages/.nojekyll - - # Deploy - # https://github.com/peaceiris/actions-gh-pages - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.event_name == 'push' }} - with: - publish_branch: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _gh-pages/ - force_orphan: true diff --git a/backend/.github/workflows/musica/mac.yml b/backend/.github/workflows/musica/mac.yml deleted file mode 100644 index b6a006c..0000000 --- a/backend/.github/workflows/musica/mac.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: Mac - -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true - -jobs: - c_cxx: - runs-on: macos-latest - continue-on-error: true - strategy: - matrix: - compiler: - - { cpp: g++-12, c: gcc-12, fc: gfortran-12} - - { cpp: g++-13, c: gcc-13, fc: gfortran-13} - - { cpp: g++-14, c: gcc-14, fc: gfortran-14} - - { cpp: clang++, c: clang, fc: gfortran-12} - - { cpp: g++-14, c: gcc-14, fc: gfortran-14} - build_type: [Release] - env: - CC: ${{ matrix.compiler.c }} - CXX: ${{ matrix.compiler.cpp }} - FC: ${{ matrix.compiler.fc }} - - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: brew install netcdf netcdf-fortran - - - uses: actions/setup-python@v5 - - run: pip install numpy --user - - - name: Run Cmake - if: matrix.compiler.cpp != 'g++-13' - run: | - PYTHON_PATH=$(which python) - cmake -S . -B build \ - -D CMAKE_CXX_FLAGS=-Wl,-ld_classic \ - -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -D MUSICA_GIT_TAG=${{ github.sha }} \ - -D MUSICA_ENABLE_PYTHON_LIBRARY=ON \ - -D Python3_EXECUTABLE=$PYTHON_PATH - - - name: Run Cmake - if: matrix.compiler.cpp == 'g++-13' - run: | - PYTHON_PATH=$(which python) - # for some reason gcc 13 was having issues finding the correct osx sdk - # it seems it was a known issue: https://github.com/actions/runner-images/issues/9997 - # for some reason, passing in an empty string for the osx sysroot fixed the issue - cmake -S . -B build \ - -D CMAKE_CXX_FLAGS=-Wl,-ld_classic \ - -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -D MUSICA_GIT_TAG=${{ github.sha }} \ - -D MUSICA_ENABLE_PYTHON_LIBRARY=ON \ - -D Python3_EXECUTABLE=$PYTHON_PATH \ - -D CMAKE_OSX_SYSROOT="" - - - name: Build - run: cmake --build build --verbose --parallel 10 - - - name: Run tests - run: | - cd build - ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose - - fortran: - runs-on: macos-latest - strategy: - matrix: - gcc_version: [13, 14] - build_type: [Release] - env: - FC: gfortran-${{ matrix.gcc_version }} - - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: brew install netcdf netcdf-fortran - - - name: Run Cmake - run: cmake -S . -B build -D CMAKE_CXX_FLAGS=-Wl,-ld_classic -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -D MUSICA_GIT_TAG=${{ github.sha }} -D MUSICA_BUILD_FORTRAN_INTERFACE=ON - - - name: Build - run: cmake --build build --verbose --parallel 10 - - - name: Run tests - run: | - cd build - ctest -E "tuvx_c_api|tuvx_fortran_api" -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose -j 10 \ No newline at end of file diff --git a/backend/.github/workflows/musica/pep8.yml b/backend/.github/workflows/musica/pep8.yml deleted file mode 100644 index 8f0268b..0000000 --- a/backend/.github/workflows/musica/pep8.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Pep8 - -on: - push: - branches: - - main - -jobs: - autopep8: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: autopep8 - uses: peter-evans/autopep8@v2 - with: - args: --recursive --in-place --aggressive --aggressive --max-line-length 120 . - - - name: Check for changes - id: check-changes - run: git diff --exit-code - continue-on-error: true - - - name: Commit and push changes - # a failue of this step means changes were detected - if: steps.check-changes.outcome != 'success' - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git commit -am "Auto-format code using Clang-Format" || echo "No changes to commit" - - - name: Push changes to main-autopep8 branch - if: steps.check-changes.outcome != 'success' - run: git push origin HEAD:main-autopep8 - - - name: Create Pull Request - if: steps.check-changes.outcome != 'success' - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "Auto-format code using autopep8" - title: "Auto-format code by autopep8" - body: "This is an auto-generated PR with fixes by autopep8." - branch: main-autopep8 \ No newline at end of file diff --git a/backend/.github/workflows/musica/pip.yml b/backend/.github/workflows/musica/pip.yml deleted file mode 100644 index 724bbc0..0000000 --- a/backend/.github/workflows/musica/pip.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Pip - -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -jobs: - build: - strategy: - fail-fast: false - matrix: - platform: [windows-latest, macos-13, ubuntu-latest] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - # python versions: https://devguide.python.org/versions/ - - runs-on: ${{ matrix.platform }} - - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Add requirements - run: python -m pip install --upgrade wheel setuptools - - - name: Build and install - run: pip install --verbose .[test] - - - name: Test - run: python -m unittest discover -v -s python/test \ No newline at end of file diff --git a/backend/.github/workflows/musica/release.yml b/backend/.github/workflows/musica/release.yml deleted file mode 100644 index d3857ea..0000000 --- a/backend/.github/workflows/musica/release.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: Publish Python Package - -on: - workflow_dispatch: - release: - types: - - published - -jobs: - build_sdist: - name: Build SDist - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - - name: Build SDist - run: pipx run build --sdist - - - name: Check metadata - run: pipx run twine check dist/* - - - uses: actions/upload-artifact@v4 - with: - name: cibw-sdist - path: dist/*.tar.gz - - build_wheels: - name: Build wheels on ${{ matrix.os }} with Python ${{ matrix.python-version }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.12"] - - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - uses: pypa/cibuildwheel@v2.17 - env: - CIBW_ARCHS_MACOS: arm64 x86_64 - CIBW_SKIP: cp27-* cp34-* cp35-* cp36-* *musllinux* - CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* - - - name: Verify clean directory - run: git diff --exit-code - shell: bash - - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: cibw-wheels-${{ matrix.os }}-py${{ matrix.python-version }} - path: wheelhouse/*.whl - - upload_all: - name: Upload release - needs: [build_wheels, build_sdist] - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/musica - permissions: - id-token: write - - steps: - - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - - uses: actions/download-artifact@v4 - with: - pattern: cibw-* - path: dist - merge-multiple: true - - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/backend/.github/workflows/musica/ubuntu.yml b/backend/.github/workflows/musica/ubuntu.yml deleted file mode 100644 index 7f28cc1..0000000 --- a/backend/.github/workflows/musica/ubuntu.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Ubuntu - -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true - -jobs: - c_cxx: - runs-on: ubuntu-24.04 - continue-on-error: true - strategy: - matrix: - compiler: - - { cpp: g++-12, c: gcc-12, fc: gfortran-12} - - { cpp: g++-13, c: gcc-13, fc: gfortran-13} - - { cpp: g++-14, c: gcc-14, fc: gfortran-14} - - { cpp: clang++, c: clang, fc: gfortran-12} - options: - - {python: ON, tuvx: OFF} - - {python: OFF, tuvx: ON} - build_type: [Release] - env: - CC: ${{ matrix.compiler.c }} - CXX: ${{ matrix.compiler.cpp }} - FC: ${{ matrix.compiler.fc }} - - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y liblapack-dev libblas-dev build-essential libnetcdf-dev libnetcdff-dev - sudo apt-get install -y python3-numpy - - - name: Run Cmake - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -D MUSICA_GIT_TAG=${{ github.sha }} -D MUSICA_ENABLE_PYTHON_LIBRARY=${{ matrix.options.python }} -D MUSICA_ENABLE_TUVX=${{ matrix.matrix.options.tuvx }} - - - name: Build - run: cmake --build build --verbose - - - name: Run tests - run: | - cd build - ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose - fortran: - runs-on: ubuntu-24.04 - continue-on-error: true - strategy: - matrix: - gcc_version: [14] - build_type: [Debug, Release] - env: - CXX: g++-${{ matrix.gcc_version }} - CC: gcc-${{ matrix.gcc_version }} - FC: gfortran-${{ matrix.gcc_version }} - - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y libnetcdf-dev netcdf-bin libnetcdff-dev liblapack-dev libblas-dev - - - name: Run Cmake - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -D MUSICA_GIT_TAG=${{ github.sha }} -D MUSICA_BUILD_FORTRAN_INTERFACE=ON - - - name: Build - run: cmake --build build --verbose --parallel 1 - - - name: Run tests - run: | - cd build - ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure . --verbose -j 10 \ No newline at end of file diff --git a/backend/.github/workflows/musica/windows.yml b/backend/.github/workflows/musica/windows.yml deleted file mode 100644 index db8ebc4..0000000 --- a/backend/.github/workflows/musica/windows.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: Windows - -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true - -jobs: - mingw: - runs-on: windows-2019 - strategy: - matrix: - architecture: [x64] - - steps: - - uses: actions/checkout@v4 - - name: Set up MinGW - uses: egor-tensin/setup-mingw@v2 - with: - platform: ${{ matrix.architecture }} - version: 12.2.0 # https://github.com/egor-tensin/setup-mingw/issues/14 - - - uses: actions/setup-python@v5 - - run: pip install numpy - - - name: Run Cmake - run: cmake -S . -B build -G "MinGW Makefiles" -D MUSICA_GIT_TAG=${{ github.sha }} -D MUSICA_ENABLE_TUVX=OFF -D MUSICA_ENABLE_PYTHON_LIBRARY=ON - - - name: Build - run: cmake --build build --parallel - - - name: Run tests - run: | - cd build - ctest -C Debug --rerun-failed --output-on-failure . --verbose - - msvc2022: - runs-on: windows-2022 - continue-on-error: true - strategy: - matrix: - build_type: [Release] - architecture: [Win32, x64] - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - if: ${{ matrix.architecture == 'Win32' }} - with: - python-version: '3.x' - architecture: x86 - - - run: pip install numpy - - - name: Run CMake - run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -D MUSICA_GIT_TAG=${{ github.sha }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -D MUSICA_ENABLE_TUVX=OFF -D MUSICA_ENABLE_PYTHON_LIBRARY=ON - - - name: Build - run: cmake --build build --config ${{ matrix.build_type }} --parallel - - - name: Test - run: cd build ; ctest -C ${{ matrix.build_type }} --output-on-failure --verbose - - clang: - runs-on: windows-2019 - continue-on-error: true - strategy: - matrix: - version: [11, 12, 13, 14, 15] - - steps: - - uses: actions/checkout@v4 - - - name: Install Clang - run: curl -fsSL -o LLVM${{ matrix.version }}.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ matrix.version }}.0.0/LLVM-${{ matrix.version }}.0.0-win64.exe ; 7z x LLVM${{ matrix.version }}.exe -y -o"C:/Program Files/LLVM" - - - uses: actions/setup-python@v5 - - run: pip install numpy - - - name: Run CMake - run: cmake -S . -B build -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" -DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang.exe" -G"MinGW Makefiles" -D MUSICA_GIT_TAG=${{ github.sha }} -D MUSICA_ENABLE_TUVX=OFF -D MUSICA_ENABLE_PYTHON_LIBRARY=ON - - - name: Build - run: cmake --build build --parallel - - - name: Test - run: cd build ; ctest -C Debug --output-on-failure --verbose - - clang-cl-11: - runs-on: windows-2019 - continue-on-error: true - strategy: - matrix: - architecture: [Win32, x64] - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - if: ${{ matrix.architecture == 'Win32' }} - with: - python-version: '3.x' - architecture: x86 - - - uses: actions/setup-python@v5 - - run: pip install numpy - - - name: Run CMake - run: cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -T ClangCL -D MUSICA_GIT_TAG=${{ github.sha }} -D MUSICA_ENABLE_TUVX=OFF -D MUSICA_ENABLE_PYTHON_LIBRARY=ON - - - name: Build - run: cmake --build build --config Debug --parallel - - - name: Test - run: cd build ; ctest -C Debug --output-on-failure --verbose diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 0fba55a..17cf55e 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -18,12 +18,9 @@ "jsx": "react-jsx", /* Linting */ - // TODO: revert unused locals and params - "noUnusedLocals": false, - "noUnusedParameters": false, "strict": true, - // "noUnusedLocals": true, - // "noUnusedParameters": true, + "noUnusedLocals": true, + "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, "include": ["src", "vitest.setup.ts"],