<commit_before>import floppyforms as forms
from organization.models import Organization
from core.utils import CONCENTRATION_UNITS, VOLUME_UNITS, TIME_UNITS, SPEED_UNITS, TEMPERATURE_UNITS, MASS_UNITS, AMMOUNT_UNITS


class NodeForm(forms.Form):
    name = forms.CharField(max_length=100, required=False)
    technique_comment = forms.CharField(required=False, help_text='describe technique tips, help, comments, dont describe chemistry or biology')
    why = forms.CharField(required=False, help_text='scientific reason you\'re doing this?')


class OrganizationListForm(forms.Form):
    owner = forms.ChoiceField(required=True)#forms.CharField(max_length=100, required=False)


class ProtocolPublishForm(forms.Form):
    name = forms.BooleanField(label='Confirm')


class StepForm(NodeForm):
    name = forms.CharField(max_length=100, required=False, label='step number')
    verbatim_text = forms.CharField()


class ActionForm(NodeForm):

    name = forms.CharField(max_length=100, required=False, help_text = 'defaults to verb')
    tracking_object = forms.CharField(required=False, help_text='Sample mix | Buffer | Other mix')
    tube_label = forms.CharField(help_text ='copy label of tube', required=False)
    describe_where = forms.CharField(required = False, help_text = 'bench, desktop, rotator, etc')
    min_time = forms.FloatField(required=False, help_text='this is the minimal time this should take')
    max_time = forms.FloatField(required=False)
    time_units = forms.ChoiceField(required=False, choices=TIME_UNITS, help_text='in seconds' )
    time_comment = forms.CharField(required=False)
    min_temp = forms.FloatField(required=False)#, initial = 22.0)
    max_temp = forms.FloatField(required=False)#, initial = 22.0)
    temp_units = forms.ChoiceField(required=False, choices=TEMPERATURE_UNITS, help_text='in celcius')
    temp_comment = forms.CharField(required=False)
    physical_commitment = forms.ChoiceField(choices = (("N/A","unknown"),("Passive","You dont have to be here"),("Active","You are here"),('Setup', 'only required to start'), ('missing','no description present'),), required=False)

class VerbForm(forms.Form):
    has_component = False
    has_machine = False
    has_thermocycler = False
    has_manual = False
    layers = []

forms.VerbForm = VerbForm


class ComponentForm(NodeForm):

    #reagent_name = forms.CharField(max_length=100, required=False)                 # THIS IS COVERED WITH THE name FIELD
    min_conc = forms.FloatField(required=False)
    max_conc = forms.FloatField(required=False)
    conc_units = forms.ChoiceField(required=False, choices=CONCENTRATION_UNITS )
    conc_comment = forms.CharField(required=False)
    min_vol = forms.FloatField(required=False)
    max_vol = forms.FloatField(required=False)
    vol_units = forms.ChoiceField(required=False, choices=VOLUME_UNITS )
    vol_comment = forms.CharField(required=False)
    min_mass = forms.FloatField(required=False)
    max_mass = forms.FloatField(required=False)
    mass_units = forms.ChoiceField(required=False, choices = MASS_UNITS, initial = None)
    min_ammount = forms.FloatField(required=False)
    max_ammount = forms.FloatField(required=False)
    ammount_units = forms.ChoiceField(required=False, choices = AMMOUNT_UNITS, initial = None)
    source = forms.CharField(required=False, help_text='example: Invitrogen | protocol: RNA purification')
    ph = forms.FloatField(required=False, help_text='only if specified')
    tracking_object = forms.CharField(required=False, help_text='Name for tube: Sample | Mix | Buffer')
    tube_label = forms.CharField(help_text ='label of component, not sample', required=False)  
    # technique_comment = forms.CharField(required=False, help_text='describe technique tips, help, comments, dont describe chemistry or biology')
    # why = forms.CharField(required=False, help_text='scientific reason you\'re doing this?')
    # ph = forms.FloatField()


class MachineForm(NodeForm):

    name = forms.CharField(required=False)
    model = forms.CharField(required=False, help_text='only if it really matters')
    min_time = forms.FloatField(required=False)
    max_time = forms.FloatField(required=False)
    time_units = forms.ChoiceField(required=False, choices=TIME_UNITS, help_text='in seconds' )<commit_msg>text cleanup<commit_after>import floppyforms as forms
from organization.models import Organization
from core.utils import CONCENTRATION_UNITS, VOLUME_UNITS, TIME_UNITS, SPEED_UNITS, TEMPERATURE_UNITS, MASS_UNITS, AMMOUNT_UNITS


class NodeForm(forms.Form):
    name = forms.CharField(max_length=100, required=False)
    technique_comment = forms.CharField(required=False, help_text='describe technique tips, help, comments, dont describe chemistry or biology')
    why = forms.CharField(required=False, help_text='scientific reason you\'re doing this?')


class OrganizationListForm(forms.Form):
    owner = forms.ChoiceField(required=True)#forms.CharField(max_length=100, required=False)


class ProtocolPublishForm(forms.Form):
    name = forms.BooleanField(label='Confirm')


class StepForm(NodeForm):
    name = forms.CharField(max_length=100, required=False, label='step number')
    verbatim_text = forms.CharField()


class ActionForm(NodeForm):
    name = forms.CharField(max_length=100, required=False, help_text = 'defaults to verb')
    tracking_object = forms.CharField(required=False, help_text='Sample mix | Buffer | Other mix')
    tube_label = forms.CharField(help_text ='copy label of tube', required=False)
    describe_where = forms.CharField(required = False, help_text = 'bench, desktop, rotator, etc')
    min_time = forms.FloatField(required=False, help_text='this is the minimal time this should take')
    max_time = forms.FloatField(required=False)
    time_units = forms.ChoiceField(required=False, choices=TIME_UNITS, help_text='in seconds' )
    time_comment = forms.CharField(required=False)
    min_temp = forms.FloatField(required=False)#, initial = 22.0)
    max_temp = forms.FloatField(required=False)#, initial = 22.0)
    temp_units = forms.ChoiceField(required=False, choices=TEMPERATURE_UNITS, help_text='in celcius')
    temp_comment = forms.CharField(required=False)
    physical_commitment = forms.ChoiceField(choices = (("N/A","unknown"),("Passive","You dont have to be here"),("Active","You are here"),('Setup', 'only required to start'), ('missing','no description present'),), required=False)


class VerbForm(forms.Form):
    has_component = False
    has_machine = False
    has_thermocycler = False
    has_manual = False
    layers = []


forms.VerbForm = VerbForm


class ComponentForm(NodeForm):
    #reagent_name = forms.CharField(max_length=100, required=False)                 # THIS IS COVERED WITH THE name FIELD
    min_conc = forms.FloatField(required=False)
    max_conc = forms.FloatField(required=False)
    conc_units = forms.ChoiceField(required=False, choices=CONCENTRATION_UNITS )
    conc_comment = forms.CharField(required=False)
    min_vol = forms.FloatField(required=False)
    max_vol = forms.FloatField(required=False)
    vol_units = forms.ChoiceField(required=False, choices=VOLUME_UNITS )
    vol_comment = forms.CharField(required=False)
    min_mass = forms.FloatField(required=False)
    max_mass = forms.FloatField(required=False)
    mass_units = forms.ChoiceField(required=False, choices = MASS_UNITS, initial = None)
    min_ammount = forms.FloatField(required=False)
    max_ammount = forms.FloatField(required=False)
    ammount_units = forms.ChoiceField(required=False, choices = AMMOUNT_UNITS, initial = None)
    source = forms.CharField(required=False, help_text='example: Invitrogen | protocol: RNA purification')
    ph = forms.FloatField(required=False, help_text='only if specified')
    tracking_object = forms.CharField(required=False, help_text='Name for tube: Sample | Mix | Buffer')
    tube_label = forms.CharField(help_text ='label of component, not sample', required=False)  
    # technique_comment = forms.CharField(required=False, help_text='describe technique tips, help, comments, dont describe chemistry or biology')
    # why = forms.CharField(required=False, help_text='scientific reason you\'re doing this?')
    # ph = forms.FloatField()


class MachineForm(NodeForm):

    name = forms.CharField(required=False)
    model = forms.CharField(required=False, help_text='only if it really matters')
    min_time = forms.FloatField(required=False)
    max_time = forms.FloatField(required=False)
    time_units = forms.ChoiceField(required=False, choices=TIME_UNITS, help_text='in seconds' )
{'fraction_non_alphanumeric': 0.10983129726585224, 'fraction_numerical': 0.004886561954624782, 'mean_word_length': 5.5418569254185694, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2034', 'n_tokens_mistral': 2630, 'n_tokens_neox': 2549, 'n_words': 551}