<commit_before>//-------------------------------------------------------------------------------------
// Copyright (c) 2015 Ciena, Hewlett-Packard, Inocybe and others.  All rights reserved.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v1.0 which accompanies this distribution,
// and is available at http://www.eclipse.org/legal/epl-v10.html
//-------------------------------------------------------------------------------------
module intent-conditions {
    namespace "urn:opendaylight:intent:conditions";
    prefix "intent-conditions";

    import ietf-yang-types { prefix yang; revision-date "2013-07-15";}

    revision 2015-01-22 {
        description "Initial revision";
    }

    typedef time-of-day {
      type string {
        pattern '\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[\+\-]\d{2}:\d{2})';
      }
      description "Represents a time of day in IETF format with option time
          zone information.";
    }

    typedef duration {
      type string {
        pattern '[1-9][0-9]*[smdwMyx]';
      }
      description "Represents a duration and a duration unit.";
    }

    grouping condition {
        description "The condition (when) determines the conditions that determine
                when this intent will be applied.";
    }

    grouping scheduled {
      uses condition;

      leaf initiate {
        type yang:date-and-time;
        mandatory true;
      }
      leaf terminate {
        type yang:date-and-time;
        mandatory false;
      }

      description "Represents a schedule condition with a mandatory start
          time, but with an option end time.";
    }

    grouping weekly {
      uses condition;

      leaf days-of-week {
        type string {
          pattern "[xmM][xtT][xwW][xtT][xfF][xsS][xsS]";
        }
      }
      leaf every-n-weeks {
        type yang:counter32;
      }
      leaf start-time {
        type time-of-day;
      }
      leaf duration {
        type duration;
      }

      description "Represents a weekly recurring condition.";
    }

    grouping daily {
      uses condition;

      leaf start-time {
        type time-of-day;
      }
      leaf duration {
        type duration;
      }

      description "Represents a daily recurring condition.";
    }
}
<commit_msg>Add missing pattern for "hour" in duration<commit_after>//-------------------------------------------------------------------------------------
// Copyright (c) 2015 Ciena, Hewlett-Packard, Inocybe and others.  All rights reserved.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v1.0 which accompanies this distribution,
// and is available at http://www.eclipse.org/legal/epl-v10.html
//-------------------------------------------------------------------------------------
module intent-conditions {
    namespace "urn:opendaylight:intent:conditions";
    prefix "intent-conditions";

    import ietf-yang-types { prefix yang; revision-date "2013-07-15";}

    revision 2015-01-22 {
        description "Initial revision";
    }

    typedef time-of-day {
      type string {
        pattern '\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[\+\-]\d{2}:\d{2})';
      }
      description "Represents a time of day in IETF format with option time
          zone information.";
    }

    typedef duration {
      type string {
        pattern '[1-9][0-9]*[smhdwMyx]';
      }
      description "Represents a duration and a duration unit.";
    }

    grouping condition {
        description "The condition (when) determines the conditions that determine
                when this intent will be applied.";
    }

    grouping scheduled {
      uses condition;

      leaf initiate {
        type yang:date-and-time;
        mandatory true;
      }
      leaf terminate {
        type yang:date-and-time;
        mandatory false;
      }

      description "Represents a schedule condition with a mandatory start
          time, but with an option end time.";
    }

    grouping weekly {
      uses condition;

      leaf days-of-week {
        type string {
          pattern "[xmM][xtT][xwW][xtT][xfF][xsS][xsS]";
        }
      }
      leaf every-n-weeks {
        type yang:counter32;
      }
      leaf start-time {
        type time-of-day;
      }
      leaf duration {
        type duration;
      }

      description "Represents a weekly recurring condition.";
    }

    grouping daily {
      uses condition;

      leaf start-time {
        type time-of-day;
      }
      leaf duration {
        type duration;
      }

      description "Represents a daily recurring condition.";
    }
}

{'fraction_non_alphanumeric': 0.1687313114053823, 'fraction_numerical': 0.0149508756941478, 'mean_word_length': 1.6294216732172937, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5620941', 'n_tokens_mistral': 1305, 'n_tokens_neox': 1217, 'n_words': 376}