diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b801db330..b768b307a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[skip ci]')" strategy: matrix: - python-version: ["3.9", "3.10"] + python-version: ["3.10"] steps: - name: Set up Python ${{ matrix.python-version }} @@ -43,10 +43,10 @@ jobs: # Run on a push to a tag or master if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') steps: - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: Install latest setuptools, wheel, pip run: python3 -m pip install -U pip setuptools wheel diff --git a/pfb/workers/main.py b/pfb/workers/main.py index 04987daee..0ae0b5dfa 100644 --- a/pfb/workers/main.py +++ b/pfb/workers/main.py @@ -10,4 +10,4 @@ def cli(): from pfb.workers import (init, grid, degrid, clean, restore, fwdbwd, spotless, model2comps, - forward,fastim) + forward, fastim) diff --git a/pfb/workers/model2comps.py b/pfb/workers/model2comps.py index e6336d495..1c8fbfe23 100644 --- a/pfb/workers/model2comps.py +++ b/pfb/workers/model2comps.py @@ -27,7 +27,10 @@ def model2comps(**kw): opts = OmegaConf.create(defaults) import time timestamp = time.strftime("%Y%m%d-%H%M%S") - pyscilog.log_to_file(f'model2comps_{timestamp}.log') + ldir = Path(opts.log_directory).resolve() + ldir.mkdir(parents=True, exist_ok=True) + pyscilog.log_to_file(f'{ldir}/model2comps_{timestamp}.log') + print(f'Logs will be written to {str(ldir)}/model2comps_{timestamp}.log', file=log) OmegaConf.set_struct(opts, True)