autogen icon indicating copy to clipboard operation
autogen copied to clipboard

Use hidden filename for temporary code file

Open BeibinLi opened this issue 1 year ago • 4 comments

The temporary file name should be a hidden file, such that the ls command would not list the unwanted temporary file.

Why are these changes needed?

Related issue number

Checks

  • [ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
  • [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
  • [ ] I've made sure all auto checks have passed.

BeibinLi avatar Jan 10 '24 18:01 BeibinLi

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (b548e55) 30.38% compared to head (7326b0e) 40.44%. Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1200       +/-   ##
===========================================
+ Coverage   30.38%   40.44%   +10.06%     
===========================================
  Files          32       32               
  Lines        4302     4302               
  Branches      994     1045       +51     
===========================================
+ Hits         1307     1740      +433     
+ Misses       2901     2436      -465     
- Partials       94      126       +32     
Flag Coverage Δ
unittests 40.37% <100.00%> (+10.04%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jan 10 '24 18:01 codecov-commenter

There is an issue #1069 due to the filename is being used as docker's tag name so it cannot start with a period (https://docs.docker.com/engine/reference/commandline/tag/). PR #1127 looks to fix it. Still, under the current behavior this PR will cause error.

I see. It makes sense. I will try another way to get around.

BeibinLi avatar Jan 11 '24 20:01 BeibinLi

There is an issue #1069 due to the filename is being used as docker's tag name so it cannot start with a period (https://docs.docker.com/engine/reference/commandline/tag/). PR #1127 looks to fix it. Still, under the current behavior this PR will cause error.

I see. It makes sense. I will try another way to get around.

why not just use tempfile instead?

bitnom avatar Jan 16 '24 13:01 bitnom

One thing several people have asked me is how can they find the code file that was generated -- they want to take a look and maybe use it. So I think we should keep the files, and maybe have an option to remove them.

ekzhu avatar Jan 16 '24 18:01 ekzhu