foxops 2.6.0__tar.gz → 2.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {foxops-2.6.0 → foxops-2.7.0}/PKG-INFO +1 -1
  2. {foxops-2.6.0 → foxops-2.7.0}/pyproject.toml +1 -1
  3. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/services/change.py +28 -7
  4. {foxops-2.6.0 → foxops-2.7.0}/LICENSE +0 -0
  5. {foxops-2.6.0 → foxops-2.7.0}/README.md +0 -0
  6. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/__init__.py +0 -0
  7. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/__main__.py +0 -0
  8. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/__init__.py +0 -0
  9. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/engine.py +0 -0
  10. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/repositories/__init__.py +0 -0
  11. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/repositories/change/__init__.py +0 -0
  12. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/repositories/change/errors.py +0 -0
  13. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/repositories/change/model.py +0 -0
  14. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/repositories/change/repository.py +0 -0
  15. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/repositories/incarnation/__init__.py +0 -0
  16. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/repositories/incarnation/errors.py +0 -0
  17. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/repositories/incarnation/model.py +0 -0
  18. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/repositories/incarnation/repository.py +0 -0
  19. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/database/schema.py +0 -0
  20. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/dependencies.py +0 -0
  21. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/__init__.py +0 -0
  22. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/__main__.py +0 -0
  23. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/custom_filters.py +0 -0
  24. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/errors.py +0 -0
  25. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/initialization.py +0 -0
  26. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/models/__init__.py +0 -0
  27. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/models/incarnation_state.py +0 -0
  28. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/models/template_config.py +0 -0
  29. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/patching/__init__.py +0 -0
  30. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/patching/git_diff_patch.py +0 -0
  31. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/rendering.py +0 -0
  32. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/engine/update.py +0 -0
  33. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/error_handlers.py +0 -0
  34. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/errors.py +0 -0
  35. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/external/__init__.py +0 -0
  36. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/external/git.py +0 -0
  37. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/hosters/__init__.py +0 -0
  38. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/hosters/gitlab.py +0 -0
  39. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/hosters/local.py +0 -0
  40. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/hosters/types.py +0 -0
  41. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/logger.py +0 -0
  42. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/middlewares.py +0 -0
  43. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/models/__init__.py +0 -0
  44. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/models/change.py +0 -0
  45. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/models/errors.py +0 -0
  46. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/models/incarnation.py +0 -0
  47. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/openapi.py +0 -0
  48. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/routers/__init__.py +0 -0
  49. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/routers/auth.py +0 -0
  50. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/routers/changes.py +0 -0
  51. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/routers/incarnations.py +0 -0
  52. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/routers/not_found.py +0 -0
  53. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/routers/version.py +0 -0
  54. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/services/__init__.py +0 -0
  55. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/services/incarnation.py +0 -0
  56. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/settings.py +0 -0
  57. {foxops-2.6.0 → foxops-2.7.0}/src/foxops/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: foxops
3
- Version: 2.6.0
3
+ Version: 2.7.0
4
4
  Summary: Foxops 🦊
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -1,7 +1,7 @@
1
1
  [tool.poetry]
2
2
  name = "foxops"
3
3
  # managed by poetry-dynamic-versioning, do not change.
4
- version = "2.6.0"
4
+ version = "2.7.0"
5
5
  description = "Foxops 🦊"
6
6
  license = "Apache-2.0"
7
7
  authors = [
@@ -772,15 +772,36 @@ def _construct_merge_request_conflict_description(
772
772
  return "\n\n".join(description_paragraphs)
773
773
 
774
774
 
775
+ def _load_fengine_reset_ignore(directory: Path) -> frozenset[Path]:
776
+ """Load the content of .fengine-reset-ignore file from the given directory.
777
+ The file contains a list of file/folder names (one per line) that should be
778
+ skipped during file deletion in delete_all_files_in_local_git_repository.
779
+ """
780
+ ignore_file = directory / ".fengine-reset-ignore"
781
+ if not ignore_file.exists():
782
+ return frozenset()
783
+
784
+ content = ignore_file.read_text()
785
+ return frozenset(Path(line.strip()) for line in content.splitlines() if line.strip())
786
+
787
+
788
+ def _is_ignored(path: Path, directory: Path, ignore_list: frozenset[Path]) -> bool:
789
+ relative = path.relative_to(directory)
790
+ return any(relative == ignored or relative.is_relative_to(ignored) for ignored in ignore_list)
791
+
792
+
775
793
  def delete_all_files_in_local_git_repository(directory: Path) -> None:
776
- for file in directory.glob("*"):
777
- if file.name == ".git":
778
- continue
794
+ ignore_list = _load_fengine_reset_ignore(directory)
779
795
 
780
- if file.is_dir():
781
- shutil.rmtree(file)
782
- else:
783
- file.unlink()
796
+ for root, dirs, files in directory.walk(top_down=True):
797
+ if ".git" in dirs:
798
+ dirs.remove(".git")
799
+
800
+ # Delete files that aren't ignored
801
+ for name in files:
802
+ path = root / name
803
+ if not _is_ignored(path, directory, ignore_list):
804
+ path.unlink()
784
805
 
785
806
 
786
807
  def generate_foxops_branch_name(prefix: str, target_directory: str, template_repository_version: str) -> str:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes