<commit_before>package com.conveyal.taui.models;

import java.util.BitSet;
import java.util.List;

import com.conveyal.geojson.GeometryDeserializer;
import com.conveyal.geojson.GeometrySerializer;
import com.conveyal.r5.model.json_serialization.BitSetDeserializer;
import com.conveyal.r5.model.json_serialization.BitSetSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.vividsolutions.jts.geom.LineString;

/**
 * Add a trip pattern.
 */
public class AddTripPattern extends Modification {
    public String name;

    @JsonDeserialize(using= GeometryDeserializer.class)
    @JsonSerialize(using= GeometrySerializer.class)
    public LineString geometry;
    // in theory these would be more efficient as bitsets but they'd get turned into
    // boolean[] when sent to mongo
    public boolean[] stops;
    public boolean[] controlPoints;

    /** stop IDs that particular points have been snapped to. will be mostly null, as most stops are generally not snapped */
    public String[] stopIds;

    public boolean bidirectional;

    public List<Timetable> timetables;

    public String getType() {
        return "add-trip-pattern";
    }

    public static class Timetable {
        /** Days of the week on which this service is active, 0 is Monday */
        @JsonDeserialize(using = BitSetDeserializer.class)
        @JsonSerialize(using = BitSetSerializer.class)
        public BitSet days;

        /** Speed, kilometers per hour */
        public int speed;

        /** hop times in seconds */
        public int[] hopTimes;

        /** dwell times in seconds */
        public int[] dwellTimes;

        /** is this a frequency entry? */
        public boolean frequency;

        /** start time (seconds since GTFS midnight) */
        public int startTime;

        /** end time for frequency-based trips (seconds since GTFS midnight) */
        public int endTime;

        /** Dwell time at each stop, seconds */
        public int dwellTime;

        /** headway for frequency-based patterns */
        public int headwaySecs;
    }
}
<commit_msg>switch to named fields for days of the week.<commit_after>package com.conveyal.taui.models;

import java.util.BitSet;
import java.util.List;

import com.conveyal.geojson.GeometryDeserializer;
import com.conveyal.geojson.GeometrySerializer;
import com.conveyal.r5.model.json_serialization.BitSetDeserializer;
import com.conveyal.r5.model.json_serialization.BitSetSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.vividsolutions.jts.geom.LineString;

/**
 * Add a trip pattern.
 */
public class AddTripPattern extends Modification {
    public String name;

    @JsonDeserialize(using= GeometryDeserializer.class)
    @JsonSerialize(using= GeometrySerializer.class)
    public LineString geometry;
    // in theory these would be more efficient as bitsets but they'd get turned into
    // boolean[] when sent to mongo
    public boolean[] stops;
    public boolean[] controlPoints;

    /** stop IDs that particular points have been snapped to. will be mostly null, as most stops are generally not snapped */
    public String[] stopIds;

    public boolean bidirectional;

    public List<Timetable> timetables;

    public String getType() {
        return "add-trip-pattern";
    }

    public static class Timetable {
        /** Days of the week on which this service is active */
        public boolean monday, tuesday, wednesday, thursday, friday, saturday, sunday;

        /** Speed, kilometers per hour */
        public int speed;

        /** hop times in seconds */
        public int[] hopTimes;

        /** dwell times in seconds */
        public int[] dwellTimes;

        /** start time (seconds since GTFS midnight) */
        public int startTime;

        /** end time for frequency-based trips (seconds since GTFS midnight) */
        public int endTime;

        /** Dwell time at each stop, seconds */
        public int dwellTime;

        /** headway for frequency-based patterns */
        public int headwaySecs;
    }
}

{'fraction_non_alphanumeric': 0.0860597439544808, 'fraction_numerical': 0.0011853959222380276, 'mean_word_length': 3.018095238095238, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '2979028', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1108, 'n_words': 375}