From e0c74346746398548005fd3da04cd0f52280ee9b Mon Sep 17 00:00:00 2001 From: rohinsant Date: Mon, 3 Nov 2025 12:00:11 -0700 Subject: [PATCH 1/4] Created a ci.yml file that contains the CI pipeline --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fec86e4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.13"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install ruff pytest + python -m pip install -e . + - name: Lint with ruff + run: | + ruff check --select E,F --exclude ./demos + - name: Test with pytest + run: | + pytest \ No newline at end of file From 3a4ce2f1c911e57f97f75130b17727ed7372dd2e Mon Sep 17 00:00:00 2001 From: Nayera Abdessalam Date: Tue, 11 Nov 2025 15:12:23 -0700 Subject: [PATCH 2/4] Allow CI to run on 'ci_pipeline' branch manually --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fec86e4..662b122 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,10 +4,11 @@ name: CI on: + workflow_dispatch: push: - branches: [ "main" ] + branches: [ "main" , "ci_pipeline" ] pull_request: - branches: [ "main" ] + branches: [ "main" , "ci_pipeline"] jobs: build: @@ -34,4 +35,4 @@ jobs: ruff check --select E,F --exclude ./demos - name: Test with pytest run: | - pytest \ No newline at end of file + pytest From 5029b366dfb1b5f366c2e0e13c3393aaa560b4a2 Mon Sep 17 00:00:00 2001 From: Nayera Abdessalam Date: Tue, 11 Nov 2025 15:25:54 -0700 Subject: [PATCH 3/4] Revert CI pipeline to original version after successful manual testing within this branch removed workflow_dispatch and ci_pipeline branch option --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 662b122..9ae5093 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,10 @@ name: CI on: - workflow_dispatch: push: - branches: [ "main" , "ci_pipeline" ] + branches: [ "main" ] pull_request: - branches: [ "main" , "ci_pipeline"] + branches: [ "main" ] jobs: build: From 224fdee0e55da498b42c6eeb585a19e8dc8c1041 Mon Sep 17 00:00:00 2001 From: rohinsant Date: Fri, 14 Nov 2025 12:29:25 -0700 Subject: [PATCH 4/4] Changed the core and the init file fixing what ruff was complaining about in the CI pipeline --- mod/hallmark/__init__.py | 2 +- mod/hallmark/core.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mod/hallmark/__init__.py b/mod/hallmark/__init__.py index b96f40c..d7d33d8 100644 --- a/mod/hallmark/__init__.py +++ b/mod/hallmark/__init__.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -from .core import ParaFrame +from .core import ParaFrame as ParaFrame diff --git a/mod/hallmark/core.py b/mod/hallmark/core.py index e621501..eec2596 100644 --- a/mod/hallmark/core.py +++ b/mod/hallmark/core.py @@ -121,16 +121,16 @@ def ParaFrame(fmt, *args, debug=False, **kwargs): elif n > 0: print(f'{n} match, i.e., "{files[0]}"') else: - print(f'No match; please check format string') + print('No match; please check format string') # Parse list of file names back to parameters parser = parse.compile(fmt) - l = [] + frame = [] for f in files: r = parser.parse(f) if r is None: print(f'Failed to parse "{f}"') else: - l.append({'path':f, **r.named}) - return pd.DataFrame(l) + frame.append({'path':f, **r.named}) + return pd.DataFrame(frame)