




"""simple docstring"""






import doctest
import logging
import os
import unittest
from pathlib import Path
from typing import List, Union

import transformers
from transformers.testing_utils import require_tf, require_torch, slow


lowercase__     						=						logging.getLogger()






@unittest.skip("""Temporarily disable the doc tests."""						)
@require_torch
@require_tf
@slow
class lowerCAmelCase__	(     unittest.TestCase						):






			'''simple docstring'''



			def 					A_    (  self  ,      lowercase  ,      lowercase = None  ,      lowercase = None  ,      lowercase = None  ,      lowercase = True  ,      ):
							_lowerCamelCase     :			Union[str, Any]    =    [file for file in os.listdir(lowercase  ) if os.path.isfile(os.path.join(lowercase  ,      lowercase  )  )]

							if identifier is not None:
											_lowerCamelCase     :			str    =    [file for file in files if identifier in file]

							if n_identifier is not None:
											if isinstance(lowercase  ,      lowercase  ):
															for n_ in n_identifier:
																			_lowerCamelCase     :			str    =    [file for file in files if n_ not in file]
											else:
															_lowerCamelCase     :			Dict    =    [file for file in files if n_identifier not in file]

							_lowerCamelCase     :			str    =    ignore_files or []
							ignore_files.append('__init__.py'  )
							_lowerCamelCase     :			Union[str, Any]    =    [file for file in files if file not in ignore_files]

							for file in files:
											# Open all files
											print('Testing'  ,      lowercase  )

											if only_modules:
															_lowerCamelCase     :			List[str]    =    file.split('.'  )[0]
															try:
																			_lowerCamelCase     :			Tuple    =    getattr(lowercase  ,      lowercase  )
																			_lowerCamelCase     :			List[Any]    =    doctest.DocTestSuite(lowercase  )
																			_lowerCamelCase     :			Optional[int]    =    unittest.TextTestRunner().run(lowercase  )
																			self.assertIs(len(result.failures  )  ,      0  )
															except AttributeError:
																			logger.info(F'''{module_identifier} is not a module.'''  )
											else:
															_lowerCamelCase     :			Any    =    doctest.testfile(str('..' / directory / file  )  ,      optionflags=doctest.ELLIPSIS  )
															self.assertIs(result.failed  ,      0  )
			def 					A_    (  self  ):
							_lowerCamelCase     :			int    =    Path('src/transformers'  )
							_lowerCamelCase     :			List[Any]    =    'modeling'
							_lowerCamelCase     :			Dict    =    [
							    'modeling_ctrl.py',
							    'modeling_tf_ctrl.py',
							]
							self.analyze_directory(lowercase  ,      identifier=lowercase  ,      ignore_files=lowercase  )
			def 					A_    (  self  ):
							_lowerCamelCase     :			int    =    Path('src/transformers'  )
							_lowerCamelCase     :			Tuple    =    'tokenization'
							self.analyze_directory(lowercase  ,      identifier=lowercase  )
			def 					A_    (  self  ):
							_lowerCamelCase     :			Optional[Any]    =    Path('src/transformers'  )
							_lowerCamelCase     :			int    =    'configuration'
							self.analyze_directory(lowercase  ,      identifier=lowercase  )
			def 					A_    (  self  ):
							_lowerCamelCase     :			int    =    Path('src/transformers'  )
							_lowerCamelCase     :			Any    =    ['configuration', 'modeling', 'tokenization']
							self.analyze_directory(lowercase  ,      n_identifier=lowercase  )






			def 					A_    (  self  ):
							_lowerCamelCase     :			int    =    Path('docs/source'  )
							_lowerCamelCase     :			List[str]    =    ['favicon.ico']
							self.analyze_directory(lowercase  ,      ignore_files=lowercase  ,      only_modules=lowercase  )



UpperCAmelCase_      : Optional[int]  					=       [4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
UpperCAmelCase_      : str  					=       [3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
UpperCAmelCase_      : str  					=       {
    0: 'Sunday',
    1: 'Monday',
    2: 'Tuesday',
    3: 'Wednesday',
    4: 'Thursday',
    5: 'Friday',
    6: 'Saturday',
}







def        SCREAMING_SNAKE_CASE_						(			__A :			int  ,    __A :			int  ,    __A :			int				)	->		str:

       """simple docstring"""

       assert len(str(__A				)				) > 2, "year should be in YYYY format"
       assert 1 <= month <= 12, "month should be between 1 to 12"
       assert 1 <= day <= 31, "day should be between 1 to 31"

       # Doomsday algorithm:
       a_					:		List[str]							=  year // 1_00
       a_					:		Optional[int]							=  (5 * (century % 4) + 2) % 7
       a_					:		List[str]							=  year % 1_00
       a_					:		str							=  centurian % 12
       a_					:		List[str]							=  (
           (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
       ) % 7
       a_					:		Any							=  (
           DOOMSDAY_NOT_LEAP[month - 1]
           if (year % 4 != 0) or (centurian == 0 and (year % 4_00) == 0)
           else DOOMSDAY_LEAP[month - 1]
       )
       a_					:		Any							=  (dooms_day + day - day_anchor) % 7
       return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
   import doctest

   doctest.testmod()


