Skip to content

GEOPY-1029: Add datetime stamp to simpeg.log and simpeg.out file names#385

Merged
domfournier merged 8 commits intorelease/GA_4.8from
GEOPY-1029C
Apr 23, 2026
Merged

GEOPY-1029: Add datetime stamp to simpeg.log and simpeg.out file names#385
domfournier merged 8 commits intorelease/GA_4.8from
GEOPY-1029C

Conversation

@domfournier
Copy link
Copy Markdown
Collaborator

@domfournier domfournier commented Apr 22, 2026

GEOPY-1029 - Add datetime stamp to simpeg.log and simpeg.out file names

Copilot AI review requested due to automatic review settings April 22, 2026 23:12
@github-actions github-actions Bot changed the title GEOPY-1029 GEOPY-1029: Add datetime stamp to simpeg.log and simpeg.out file names Apr 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates SimPEG driver log/artifact naming to be based on the workspace filename stem (e.g., inversion_test.ui.log/.out) and bumps the mira-simpeg dependency to a revision that supports the new behavior.

Changes:

  • Rename generated log/output artifacts from fixed names (SimPEG.log/.out, ChiFactors.log) to workspace-stem-based names (<stem>.log/.out, <stem>.chi).
  • Adjust gravity run tests to assert against the new artifact names.
  • Update mira-simpeg git revision and refresh conda lockfiles accordingly.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/run_tests/driver_grav_test.py Updates assertions to use <workspace_stem>.log/.out names and reorders the memory-error test.
simpeg_drivers/driver.py Changes logger path generation to use <workspace_stem>.log and removes log file overwrite behavior.
simpeg_drivers/components/factories/directives_factory.py Passes workspace stem into log-saving directive and renames chi-factor file to <stem>.chi.
pyproject.toml Pins mira-simpeg to GEOPY-1029C to pick up required upstream changes.
py-3.13.conda-lock.yml Updates locked mira-simpeg source revision/hash.
py-3.12.conda-lock.yml Updates locked mira-simpeg source revision/hash.
environments/py-3.13-win-64.conda.lock.yml Refreshes env lock to new mira-simpeg commit.
environments/py-3.13-win-64-dev.conda.lock.yml Refreshes env lock to new mira-simpeg commit.
environments/py-3.13-linux-64.conda.lock.yml Refreshes env lock to new mira-simpeg commit.
environments/py-3.13-linux-64-dev.conda.lock.yml Refreshes env lock to new mira-simpeg commit.
environments/py-3.12-win-64.conda.lock.yml Refreshes env lock to new mira-simpeg commit.
environments/py-3.12-win-64-dev.conda.lock.yml Refreshes env lock to new mira-simpeg commit.
environments/py-3.12-linux-64.conda.lock.yml Refreshes env lock to new mira-simpeg commit.
environments/py-3.12-linux-64-dev.conda.lock.yml Refreshes env lock to new mira-simpeg commit.
Comments suppressed due to low confidence (1)

simpeg_drivers/driver.py:794

  • InversionLogger.start() no longer clears an existing log file, but write() always opens the log in append mode. Re-running in the same directory/workspace stem will silently mix logs from multiple runs, which can make debugging and any downstream parsing unreliable. Consider truncating/overwriting the log at the start of a run (e.g., open once in write mode, or explicitly delete/rotate the existing file) before writing the header.
    def start(self):
        self.write(
            f"Running simpeg-drivers {__version__}\n"
            f"Started {self.start_date_time}\n"
            f"{self.driver.params.title}\n"
        )

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread simpeg_drivers/driver.py Outdated
Copy link
Copy Markdown
Contributor

@MatthieuCMira MatthieuCMira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not merge with a toml file pointing to a branch.

Comment thread simpeg_drivers/driver.py Outdated
Comment thread tests/run_tests/driver_grav_test.py
Comment thread pyproject.toml Outdated
MatthieuCMira
MatthieuCMira previously approved these changes Apr 23, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.26%. Comparing base (a4d2a28) to head (2d69a78).
⚠️ Report is 9 commits behind head on release/GA_4.8.

Additional details and impacted files
@@                Coverage Diff                 @@
##           release/GA_4.8     #385      +/-   ##
==================================================
- Coverage           90.27%   90.26%   -0.01%     
==================================================
  Files                 132      132              
  Lines                6475     6469       -6     
  Branches              815      814       -1     
==================================================
- Hits                 5845     5839       -6     
  Misses                420      420              
  Partials              210      210              
Files with missing lines Coverage Δ
...drivers/components/factories/directives_factory.py 95.49% <ø> (ø)
simpeg_drivers/driver.py 87.34% <100.00%> (-0.19%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@domfournier domfournier merged commit 749ec6c into release/GA_4.8 Apr 23, 2026
17 checks passed
@domfournier domfournier deleted the GEOPY-1029C branch April 23, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants