<commit_before>import React, {Component, PropTypes} from 'react'
import round from 'lodash/math/round'
import Button from './button'
import ProgressBar from './progress-bar'

export default class Notification extends Component {
	static propTypes = {
		hideButton: PropTypes.bool,
		id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
		max: PropTypes.number,
		message: PropTypes.string.isRequired,
		onClick: PropTypes.func.isRequired,
		type: PropTypes.string.isRequired,
		value: PropTypes.number,
	}

	render() {
		// console.log('Notification#render')
		const progressBar = (this.props.type === 'progress') && (
			<div className='progress-container'>
				<ProgressBar value={this.props.value} max={this.props.max} />
				<output>{round((this.props.value / this.props.max) * 100, 2)}%</output>
			</div>
		)

		return (
			<li className={`notification-capsule notification-type--${this.props.type}`}
				onClick={() => this.props.onClick(this.props.id)}>
				<div className='notification-content'>
					<h1 className='notification-message'>
						{this.props.message}
					</h1>
					{progressBar}
				</div>
				{!this.props.hideButton &&
				<Button className='close-notification'
					type='flat'
					title='Close'>
					×
				</Button>}
			</li>
		)
	}
}<commit_msg>Ask the progress bars to round to the nearest integer<commit_after>import React, {Component, PropTypes} from 'react'
import round from 'lodash/math/round'
import Button from './button'
import ProgressBar from './progress-bar'

export default class Notification extends Component {
	static propTypes = {
		hideButton: PropTypes.bool,
		id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
		max: PropTypes.number,
		message: PropTypes.string.isRequired,
		onClick: PropTypes.func.isRequired,
		type: PropTypes.string.isRequired,
		value: PropTypes.number,
	}

	render() {
		// console.log('Notification#render')
		const progressBar = (this.props.type === 'progress') && (
			<div className='progress-container'>
				<ProgressBar value={this.props.value} max={this.props.max} />
				<output>{round((this.props.value / this.props.max) * 100, 0)}%</output>
			</div>
		)

		return (
			<li className={`notification-capsule notification-type--${this.props.type}`}
				onClick={() => this.props.onClick(this.props.id)}>
				<div className='notification-content'>
					<h1 className='notification-message'>
						{this.props.message}
					</h1>
					{progressBar}
				</div>
				{!this.props.hideButton &&
				<Button className='close-notification'
					type='flat'
					title='Close'>
					×
				</Button>}
			</li>
		)
	}
}
{'fraction_non_alphanumeric': 0.15693707354056102, 'fraction_numerical': 0.004548900682335102, 'mean_word_length': 3.8333333333333335, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, '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': '5501187', 'n_tokens_mistral': 973, 'n_tokens_neox': 830, 'n_words': 167}