Skip to content

Support HEX colors for GeneProduct, Regulator, and Reporter - #3

Merged
Gonza10V merged 1 commit into
masterfrom
codex/enhance-geneproducts-to-accept-hex-colors
Jul 10, 2026
Merged

Gonza10V merged 1 commit into
masterfrom
codex/enhance-geneproducts-to-accept-hex-colors

Conversation

@Gonza10V

Copy link
Copy Markdown

Motivation

  • Gene products currently documented with named colors only; callers need to supply HEX color strings (e.g. #00FF00) for plotting and visualization.
  • Ensure Regulator and Reporter preserve and propagate caller-provided color values to the base GeneProduct for consistent drawing behavior.

Description

  • Documented a color parameter in src/loica/geneproduct.py describing Matplotlib-compatible values including HEX strings.
  • Updated Regulator.__init__ to forward color to the base GeneProduct initializer via keyword arguments (sbol_comp and color).
  • Updated Reporter.__init__ to forward color to the base initializer and removed a redundant self.color assignment so the base class owns the value.
  • Fixed a docstring escape issue by renaming type\_ to type_ and added unit tests in tests/test_geneproduct.py verifying HEX color preservation for GeneProduct, Regulator, and Reporter.

Testing

  • Ran pytest tests/test_geneproduct.py tests/test_sbol_export.py which completed successfully.
  • All automated tests passed: 10 passed (test suite run shown as 10 passed in 2.40s).

Codex Task

@Gonza10V
Gonza10V merged commit e7f76c5 into master Jul 10, 2026
4 checks passed
@Gonza10V
Gonza10V deleted the codex/enhance-geneproducts-to-accept-hex-colors branch July 10, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant