Skip to content

Comments

Remove environment file#47

Merged
PaulCooperWorkJustice merged 9 commits intodevelopfrom
feature/remove-env-file
Dec 1, 2025
Merged

Remove environment file#47
PaulCooperWorkJustice merged 9 commits intodevelopfrom
feature/remove-env-file

Conversation

@samgibsonmoj
Copy link
Contributor

Fixes #5, #45 and #46.

This pull request makes several changes focused on cleaning up configuration management, improving logging setup, and refactoring the Blocking service for better maintainability and clarity. The most notable updates include removing obsolete configuration files and related code, refactoring the Blocking service's configuration classes, and enhancing logging for the API service.

Configuration and Environment Management:

  • Removed the development.local.env file and all related references from Directory.Build.props and the solution file, centralizing configuration management and eliminating reliance on local environment files.
  • Removed the DotNetEnv package from dependencies, as environment variable loading from .env files is no longer required.

Blocking Service Refactoring:

  • Deleted unused and obsolete configuration classes and enums in the Blocking/ConfigurationModels folder, including BlockingConfigurationDefaults, BlockingField, BlockingFieldGroup, BlockingFieldsConfig, CleaningConfig, DatabaseTable, TCleaningType, TFieldType, and TableField, simplifying the codebase and reducing confusion.
  • Refactored the DatabaseInsert class in the Blocking service to use dependency injection for configuration and options, improving testability and maintainability. [1] [2]
  • Cleaned up the Blocking.csproj file by removing Docker settings and references to Python interop files, reflecting the current architecture and dependencies.

Logging Improvements:

  • Added new Serilog packages to API.csproj and enhanced the logging configuration in appsettings.json for more robust and structured logging, including improved file paths and enrichment options. [1] [2]

General Clean-up and Naming Consistency:

  • Updated project names in Aspire extension methods for consistency (e.g., "api""Api", "visualiser""Visualiser"). [1] [2]
  • Minor fix to the README to clarify the pipeline step as "Blocking/Matching" instead of just "Matching".

These changes collectively improve configuration management, code clarity, and logging, while removing legacy and unused components to streamline future development.

@samgibsonmoj samgibsonmoj requested review from a team as code owners December 1, 2025 10:39
     - Remove DotNetEnv package dependency and development.local.env file
     - Move configuration to appsettings.json with environment variable overrides
     - Consolidate logging setup with UseDmsSerilog() extension method
     - Create AddDmsCoreWorkerService() bundle for common worker service configuration
     - Simplify RabbitMQ configuration to use connection strings only
     - Remove ConnectionStrings wrapper class in favor of standard GetConnectionString()
     - Standardize Serilog file paths to use Path.Combine for cross-platform compatibility
     - Add try/catch/finally error handling to Meow Program.cs
     - Clean up redundant configuration registrations across all projects
@samgibsonmoj samgibsonmoj force-pushed the feature/remove-env-file branch from 2a268e2 to abd019c Compare December 1, 2025 11:41
Copy link

@PaulCooperWorkJustice PaulCooperWorkJustice left a comment

Choose a reason for hiding this comment

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

Changes look good and complete

@PaulCooperWorkJustice PaulCooperWorkJustice merged commit 0b226af into develop Dec 1, 2025
2 checks passed
@PaulCooperWorkJustice PaulCooperWorkJustice deleted the feature/remove-env-file branch December 1, 2025 12:22
ryankearsley-moj pushed a commit that referenced this pull request Dec 5, 2025
* Refactor: migrate from .env file to standard .NET configuration

     - Remove DotNetEnv package dependency and development.local.env file
     - Move configuration to appsettings.json with environment variable overrides
     - Consolidate logging setup with UseDmsSerilog() extension method
     - Create AddDmsCoreWorkerService() bundle for common worker service configuration
     - Simplify RabbitMQ configuration to use connection strings only
     - Remove ConnectionStrings wrapper class in favor of standard GetConnectionString()
     - Standardize Serilog file paths to use Path.Combine for cross-platform compatibility
     - Add try/catch/finally error handling to Meow Program.cs
     - Clean up redundant configuration registrations across all projects

* Cleanup connection string usage and remove unused files

* Add placeholders for required ConnectionStrings

* Remove unused launchSettings for non ASP.NET apps

* Remove unused docker configurations

* Include RabbitMQ clarification for Meow

* Cleanup project references

* Make Aspire service naming consistent

* Remove .env file
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.

2 participants