Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion mod/hallmark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions mod/hallmark/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)