Skip to content

Conversation

@laldoroty
Copy link
Collaborator

No description provided.

@laldoroty laldoroty linked an issue Jul 8, 2025 that may be closed by this pull request
@laldoroty laldoroty marked this pull request as ready for review July 9, 2025 15:24
@laldoroty laldoroty requested review from rknop and wmwv July 9, 2025 15:24
Copy link
Collaborator

@wmwv wmwv left a comment

Choose a reason for hiding this comment

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

  1. Because I am old and boring, I suggest that this variable be called remove_temp_dir.
  2. Add test for this function, particularly given that changelog said "make it work".
  3. Documentation request: What is the relationship between scratch_dir and temp_dir?
    What is the relationship between keep_intermediate and remove_temp_dir?
    I think the behavior in this snippet below might be surprising to the user:
        if self.keep_intermediate:
            self.save_dir = pathlib.Path( self.config.value( 'photometry.phrosty.paths.scratch_dir' ) )
        elif not self.keep_intermediate:
            self.save_dir = pathlib.Path( self.config.value( 'photometry.phrosty.paths.temp_dir' ) )

I think whether or not I chose to keep something would be separate from where it was kept. (I do understand how the code ended up this way).

@laldoroty
Copy link
Collaborator Author

I did bring up the idea of merging scratch and intermediate in the past--I don't remember the reasoning for not rolling it all into one. @rknop do you remember?

@laldoroty laldoroty requested a review from wmwv July 9, 2025 16:38
@laldoroty
Copy link
Collaborator Author

Also... I think writing tests for anything in pipeline.py is a huge task right now--petition to punt this to the next photphest?

Copy link
Collaborator

@wmwv wmwv left a comment

Choose a reason for hiding this comment

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

Did you miss a push?
There are still some nuke_temp_dir that were not changed to remote_temp_dir.

SNLogger.warning( "nuke_temp_dir not implemented" )

self.keep_intermediate = self.config.value( 'photometry.phrosty.keep_intermediate' )
self.nuke_temp_dir = self.config.value( 'photometry.phrosty.nuke_temp_dir' )
Copy link
Collaborator

Choose a reason for hiding this comment

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

Updated to remove_temp_dir

(ruff or any other linter can't figure out that "photometry.phrosty.nuke_temp_dir" isn't going to be defined, so it didn't warn you.)

SNLogger.info( f"After make_lightcurve, memory usage = \
{tracemalloc.get_traced_memory()[1]/(1024**2):.2f} MB" )

if self.nuke_temp_dir:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change to remove_temp_dir.

@laldoroty
Copy link
Collaborator Author

Oops. Yes, missed a push.

@laldoroty laldoroty requested a review from wmwv July 9, 2025 18:49
@@ -0,0 +1 @@
Move nuke_temp_dir kwarg out of Pipeline function and into the phrosty_config.yaml file. Also, make it work instead of leaving it as an empty parameter.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Mention rename to remove_temp_dir

Copy link
Collaborator

@wmwv wmwv left a comment

Choose a reason for hiding this comment

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

Fix 97.feature.rst

@laldoroty laldoroty requested a review from wmwv July 9, 2025 19:03
Copy link
Collaborator

@wmwv wmwv left a comment

Choose a reason for hiding this comment

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

LGTM

@laldoroty laldoroty merged commit 78ae13d into main Jul 9, 2025
3 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 9, 2025
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.

Add nuke_temp_dir kwarg to phrosty_config.yaml

3 participants