Onset and development of turbulence in two-dimensional periodic shear flows