From 25afa60e108bdbe75ea11881c3d76803629962de Mon Sep 17 00:00:00 2001 From: YangWu1227 Date: Tue, 18 Feb 2025 18:32:36 -0500 Subject: [PATCH 1/2] feat: generator workflow post-merge --- .../workflows/generate_solutions_files.yml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/generate_solutions_files.yml diff --git a/.github/workflows/generate_solutions_files.yml b/.github/workflows/generate_solutions_files.yml new file mode 100644 index 0000000..424b73a --- /dev/null +++ b/.github/workflows/generate_solutions_files.yml @@ -0,0 +1,46 @@ +name: Generate Solutions Files + +on: + push: + branches: + - master + paths: + - source/exercises100.ktx + +jobs: + generate_files: + runs-on: ubuntu-22.04 # Python 3.7 is not supported on latest Ubuntu + + permissions: + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.7' + cache: 'pip' + + - name: Install dependencies + run: pip3 install -r requirements.txt + + - name: Generate solutions files + run: python3 generators.py + + - name: Set environment variables + run: echo "SHA_SHORT=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_ENV + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "solutions update from ${{ env.SHA_SHORT }}" + file_pattern: > + 100_Numpy_exercises.ipynb + 100_Numpy_random.ipynb + 100_Numpy_exercises.md + 100_Numpy_exercises_with_hints.md + 100_Numpy_exercises_with_hints_with_solutions.md + 100_Numpy_exercises_with_solutions.md From 8077a2ef306d5e17c172428bb9e4eb0653565962 Mon Sep 17 00:00:00 2001 From: YangWu1227 Date: Wed, 19 Feb 2025 15:20:29 -0500 Subject: [PATCH 2/2] chore: update requirements --- requirements.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 488a34a..83c0eb8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,3 @@ -numpy==1.17.4 -pandas==0.25.3 -jupyter==1.0.0 -jupyterthemes==0.20.0 -mdutils==1.0.0 +numpy +mdutils +nbformat