<commit_before>import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import compareProps from '../helpers/compare-props'
import CourseSearcher from '../components/course-searcher'

import {groupResults, sortResults, submitQuery, updateQuery} from '../redux/search/actions'

export class CourseSearcherContainer extends Component {
	static propTypes = {
		closeSearcher: PropTypes.func.isRequired,
		groupResults: PropTypes.func.isRequired,
		location: PropTypes.object, // redux
		search: PropTypes.shape({
			error: PropTypes.any.isRequired,
			groupBy: PropTypes.string.isRequired,
			hasQueried: PropTypes.bool.isRequired,
			inProgress: PropTypes.bool.isRequired,
			partial: PropTypes.object.isRequired,
			query: PropTypes.string.isRequired,
			results: PropTypes.array.isRequired,
			sortBy: PropTypes.string.isRequired,
		}).isRequired,
		sortResults: PropTypes.func.isRequired,
		submitQuery: PropTypes.func.isRequired,
		updateQuery: PropTypes.func.isRequired,
	};

	shouldComponentUpdate(nextProps, nextState) {
		return compareProps(this.props, nextProps) || compareProps(this.state !== nextState)
	}

	handleQuerySubmit = () => {
		this.props.submitQuery()
	};

	handleQueryChange = ev => {
		this.props.updateQuery(ev.target.value)
	};<commit_msg>add some comments to CourseSearcher's propTypes<commit_after>import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import compareProps from '../helpers/compare-props'
import CourseSearcher from '../components/course-searcher'

import {groupResults, sortResults, submitQuery, updateQuery} from '../redux/search/actions'

export class CourseSearcherContainer extends Component {
	static propTypes = {
		closeSearcher: PropTypes.func.isRequired,
		groupResults: PropTypes.func.isRequired,  // redux
		location: PropTypes.object, // redux
		search: PropTypes.shape({
			error: PropTypes.any.isRequired,
			groupBy: PropTypes.string.isRequired,
			hasQueried: PropTypes.bool.isRequired,
			inProgress: PropTypes.bool.isRequired,
			partial: PropTypes.object.isRequired,
			query: PropTypes.string.isRequired,
			results: PropTypes.array.isRequired,
			sortBy: PropTypes.string.isRequired,
		}).isRequired,  // redux
		sortResults: PropTypes.func.isRequired,  // redux
		submitQuery: PropTypes.func.isRequired,  // redux
		updateQuery: PropTypes.func.isRequired,  // redux
	};

	shouldComponentUpdate(nextProps, nextState) {
		return compareProps(this.props, nextProps) || compareProps(this.state !== nextState)
	}

	handleQuerySubmit = () => {
		this.props.submitQuery()
	};

	handleQueryChange = ev => {
		this.props.updateQuery(ev.target.value)
	};
{'fraction_non_alphanumeric': 0.11613603473227208, 'fraction_numerical': 0.0, 'mean_word_length': 4.946236559139785, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2627390', 'n_tokens_mistral': 861, 'n_tokens_neox': 842, 'n_words': 170}