Skip to content

Commit

Permalink
Merge pull request #1224 from AllenNeuralDynamics/1184-20-remove-all-…
Browse files Browse the repository at this point in the history
…uses-of-xvalue-create_unit_with_value

refactor: replace create_unit_with_value with field/field_unit
  • Loading branch information
dbirman authored Jan 13, 2025
2 parents e6d7f9b + c8e68aa commit e55e7e3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/aind_data_schema/core/procedures.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
TimeUnit,
UnitlessUnit,
VolumeUnit,
create_unit_with_value,
)
from aind_data_schema_models.brain_atlas import CCFStructure
from pydantic import Field, SkipValidation, field_serializer, field_validator, model_validator
Expand Down Expand Up @@ -202,10 +201,8 @@ class Stain(Reagent):
"""Description of a non-oligo probe stain"""

stain_type: StainType = Field(..., title="Stain type")
# TODO: It might be easier to maintain to avoid dynamic model creation
concentration: create_unit_with_value("concentration", Decimal, ConcentrationUnit, ConcentrationUnit.UM) = Field(
..., title="Concentration (uM)"
)
concentration: Decimal = Field(..., title="Concentration")
concentration_unit: ConcentrationUnit = Field(default=ConcentrationUnit.UM, title="Concentration unit")


class HybridizationChainReaction(AindModel):
Expand Down

0 comments on commit e55e7e3

Please sign in to comment.