Skip to content

refactor: extract acro_artifacts folder name to global constant#361

Closed
Simon99 wants to merge 3 commits intoAI-SDC:mainfrom
Simon99:refactor/artifacts-folder-constant
Closed

refactor: extract acro_artifacts folder name to global constant#361
Simon99 wants to merge 3 commits intoAI-SDC:mainfrom
Simon99:refactor/artifacts-folder-constant

Conversation

@Simon99
Copy link
Copy Markdown

@Simon99 Simon99 commented Mar 2, 2026

Summary

Replaces all hardcoded acro_artifacts strings with a global ARTIFACTS_DIR constant, improving code maintainability.

Changes

  • Added ARTIFACTS_DIR = "acro_artifacts" constant in acro/__init__.py
  • Updated all Python files to import and use the constant:
    • acro/acro_tables.py - replaced 10 occurrences
    • acro/record.py - replaced 3 occurrences
    • test/test_initial.py - replaced 3 occurrences
  • Updated log messages and comments to use the constant

Benefits

  • Easier maintenance: Change directory name in one place
  • Improved consistency: No risk of typos in different files
  • Better testability: Can easily override for testing

Fixes

Fixes #358

Chu Julung and others added 3 commits March 2, 2026 21:12
Replace all hardcoded 'acro_artifacts' strings with ARTIFACTS_DIR constant
defined in acro/__init__.py. This improves maintainability and makes it
easier to change the artifacts directory name in the future.

Changes:
- Added ARTIFACTS_DIR constant in acro/__init__.py
- Updated acro/acro_tables.py to import and use ARTIFACTS_DIR
- Updated acro/record.py to import and use ARTIFACTS_DIR
- Updated test/test_initial.py to import and use ARTIFACTS_DIR
- Updated log messages and comments to use the constant

Fixes AI-SDC#358
Signed-off-by: Richard Preen <rpreen@gmail.com>
@rpreen rpreen self-requested a review March 2, 2026 19:18
Copy link
Copy Markdown
Collaborator

@rpreen rpreen left a comment

Choose a reason for hiding this comment

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

Have you run the tests? This fails due to circular imports.

@rpreen
Copy link
Copy Markdown
Collaborator

rpreen commented Mar 11, 2026

closing this as stale and broken.

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.

[Refactor] acro_artifacts folder is hard coded all over the place

2 participants