Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noproj doesn't clean up all files #4813

Closed
acpaquette opened this issue Feb 18, 2022 · 7 comments
Closed

Noproj doesn't clean up all files #4813

acpaquette opened this issue Feb 18, 2022 · 7 comments
Labels
bug Something isn't working inactive Issue that has been inactive for at least 6 months

Comments

@acpaquette
Copy link
Collaborator

ISIS version(s) affected: 6.0.0 and Up

Description
As initial pointed out by @KrisBecker in #4808 there are various files that the Noproj application doesn't clean up after completion. This is likely due to not every file being accounted for when we go to remove various files that are created.

How to reproduce
The behavior seems to stem from auxiliary tables that are created by the match cube since it is created with an exploded/detached label (Where all tables and the label of the cube are detached from the cube).

Possible Solution
Solution provided by @KrisBecker
"This is an issue we also ran into when running noproj in the same directory. Stuart is right on about using the temporary name generation method in FileName and temporary directory.

The other problem we encountered was that some object files remained after processing. This is because noproj is very HiRISE specific in its cleanup. Here is some new code that shows how this can be generically handled using the match cube label:" - Kris Becker

Section of code that needs to be added to noproj along with the function referenced in the code

//  Cleanup by deleting the match files
QStringList detfiles = findAllDetachedFiles( label );
detfiles.append(matchLbl);

// Now actually remove the files
foreach (const QString &dfile, detfiles ) {
  std::string  dtf = dfile.toStdString();
  remove ( dtf.c_str() );
}
// Find all detached filenames specified in objects in the label
QStringList findAllDetachedFiles(const PvlObject &object) {

  // Check this object for a detached file spec
  QStringList detfiles;
  QString dfilename = "^" + object.name();
  if ( object.hasKeyword(dfilename) ) {
    QString detname = object[dfilename];
    detfiles.append(detname);
  }

  // Now check all objects contain in this object
  for (int i_obj = 0; i_obj <  object.objects(); i_obj++) {
    const PvlObject &obj = object.object(i_obj);
    QStringList files = findAllDetachedFiles(obj);
    if ( files.size() > 0 ) {
      detfiles.append(files);
    }
    
  }
  
  return ( detfiles );

}
@acpaquette acpaquette added the bug Something isn't working label Feb 18, 2022
@github-actions
Copy link

Thank you for your contribution!

Unfortunately, this issue hasn't received much attention lately, so it is labeled as 'stale.'

If no additional action is taken, this issue will be automatically closed in 180 days.

@github-actions github-actions bot added the inactive Issue that has been inactive for at least 6 months label Aug 18, 2022
@acpaquette
Copy link
Collaborator Author

This is still an issue

@github-actions github-actions bot removed the inactive Issue that has been inactive for at least 6 months label Aug 19, 2022
@github-actions
Copy link

Thank you for your contribution!

Unfortunately, this issue hasn't received much attention lately, so it is labeled as 'stale.'

If no additional action is taken, this issue will be automatically closed in 180 days.

@github-actions github-actions bot added the inactive Issue that has been inactive for at least 6 months label Feb 15, 2023
@acpaquette
Copy link
Collaborator Author

Still active

@jlaura
Copy link
Collaborator

jlaura commented Feb 15, 2023

@acpaquette This issue is being bumped with no other action. When does this issue stop getting bumped and start getting meaningful action?

@acpaquette
Copy link
Collaborator Author

When we can get it scheduled as a somewhat high priority issue. I will check if it is on the next support agenda and if not add it to the next one

@github-actions github-actions bot removed the inactive Issue that has been inactive for at least 6 months label Feb 16, 2023
@github-actions
Copy link

Thank you for your contribution!

Unfortunately, this issue hasn't received much attention lately, so it is labeled as 'stale.'

If no additional action is taken, this issue will be automatically closed in 180 days.

@github-actions github-actions bot added the inactive Issue that has been inactive for at least 6 months label Aug 16, 2023
kledmundson added a commit to kledmundson/ISIS3 that referenced this issue Jan 10, 2024
…ted) after call to cam2cam. Also reworked how these temporary files are identified. Addresses DOI-USGS#4813.
Kelvinrr pushed a commit that referenced this issue Jan 19, 2024
… completion (#5403)

* Fixed noproj bug where some temporary files were not cleaned up (deleted) after call to cam2cam. Also reworked how these temporary files are identified. Addresses #4813.

* Added copyright statement at top of source and header files. Addresses #4813.
acpaquette pushed a commit to acpaquette/ISIS3 that referenced this issue Apr 19, 2024
… completion (DOI-USGS#5403)

* Fixed noproj bug where some temporary files were not cleaned up (deleted) after call to cam2cam. Also reworked how these temporary files are identified. Addresses DOI-USGS#4813.

* Added copyright statement at top of source and header files. Addresses DOI-USGS#4813.
acpaquette added a commit that referenced this issue Apr 19, 2024
* Disable HRSC from spice server (#5270)

* Disable HRSC from spice server

* added docs

* Added test

* added changelog

* Update spiceinit URL (#5431)

* Update spiceinit URL

* added changelog

* Removed capital E that caused an error (#5466)

* Removed capital E that caused an error

* Updated changelog

* Updated references to isis_version.txt (#5464)

* Updated references to isis_version.txt

* Updated changelog

* Removed IrregularBodyCameraGroundMap.truth file. (#5462)

* Removed IrregularBodyCameraGroundMap.truth file. Had neglected to do so in original Tagcams instrument import PR. Addresses #5461.

* Changelog entry for removal of IrregularBodyCameraGroundMap truth file. Addresses #5461.

* Update HistogramTool to better support high dynamic range images (#5445)

* Updated histogram to create bin size based on dynamic range of window instead of full image

* Updated changelog

* Changed 'version' filename to honor reserved keyword. (#5434)

* Changed 'version' filename to honor cmake reserved keyword.

Changed 'version' filename to isis_version.txt. 'version' is a reserved
keyword in cmake.  Additionally, the extension should prevent this file
from being compiled as source, and eliminate the recompilation error.

* Updated changelog

* Reverted accidental change to version

* Updated version file name

* Fixed noproj bug where missing shapemodel-related keywords (RayTraceEngine, BulletParts, Tolerance) are dropped when the output label is created. (#5378)

* Fixed noproj bug where missing shapemodel-related keywords (RayTraceEngine, BulletParts, Tolerance) are dropped when the output label is created. This resulted in the Bullet collision detection engine not being used. Addresses #5377.

* Per review, moved changelog entry to the Unreleased section. Addresses #5377.

* Fixed bug in noproj where some temporary files were not deleted after completion (#5403)

* Fixed noproj bug where some temporary files were not cleaned up (deleted) after call to cam2cam. Also reworked how these temporary files are identified. Addresses #4813.

* Added copyright statement at top of source and header files. Addresses #4813.

* Fixed Underscore Env Var Expansion (#5402)

* Fixed env var expansion to include underscores

* Added test to cover change

* Added changelog entry

* Renamed tests

* Fixes match cube default to NULL (#5429)

* Updated rclone.conf to point to naif archived kernels (#5442)

* naif source includes /pub/naif, _naifkernels point to archived locations if available

* https for naif

* naif kernel fix description in changelog

* Fits Import fix (#5469)

* Fixed FitsToJson subprocess error

* Added changelog entry

* Update Hayabusa2 translation (#5433)

* Add spacecraft name trn

* Update changelog

* Added hyb2onc2isis test

---------

Co-authored-by: Kelvin Rodriguez <krodriguez@usgs.gov>

* Added Code.json entry

* Update CHANGELOG.md

* Update version in meta.yaml

* Update version in CMakeLists.txt

---------

Co-authored-by: Amy Stamile <74275278+amystamile-usgs@users.noreply.github.com>
Co-authored-by: Austin Sanders <arsanders@usgs.gov>
Co-authored-by: kledmundson <6842706+kledmundson@users.noreply.github.com>
Co-authored-by: Jacob Cain <115182890+jrcain-usgs@users.noreply.github.com>
Co-authored-by: Christine Kim <125395064+chkim-usgs@users.noreply.github.com>
Co-authored-by: Kelvin Rodriguez <krodriguez@usgs.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working inactive Issue that has been inactive for at least 6 months
Projects
None yet
Development

No branches or pull requests

2 participants