conf.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # -*- coding: utf-8 -*-
  2. from sphinx_celery import conf
  3. globals().update(conf.build_config(
  4. 'celery', __file__,
  5. project='Celery',
  6. version_dev='5.0',
  7. version_stable='4.0',
  8. canonical_url='http://docs.celeryproject.org',
  9. webdomain='celeryproject.org',
  10. github_project='celery/celery',
  11. author='Ask Solem & contributors',
  12. author_name='Ask Solem',
  13. copyright='2009-2016',
  14. publisher='Celery Project',
  15. html_logo='images/celery_512.png',
  16. html_favicon='images/favicon.ico',
  17. html_prepend_sidebars=['sidebardonations.html'],
  18. extra_extensions=[
  19. 'sphinx.ext.napoleon',
  20. 'celery.contrib.sphinx',
  21. 'celerydocs',
  22. ],
  23. extra_intersphinx_mapping={
  24. 'cyanide': ('https://cyanide.readthedocs.io/en/latest', None),
  25. },
  26. apicheck_ignore_modules=[
  27. 'celery.five',
  28. 'celery.__main__',
  29. 'celery.task',
  30. 'celery.contrib.testing',
  31. 'celery.contrib.testing.tasks',
  32. 'celery.task.base',
  33. 'celery.bin',
  34. 'celery.bin.celeryd_detach',
  35. 'celery.contrib',
  36. r'celery.fixups.*',
  37. 'celery.local',
  38. 'celery.app.base',
  39. 'celery.apps',
  40. 'celery.canvas',
  41. 'celery.concurrency.asynpool',
  42. 'celery.utils.encoding',
  43. r'celery.utils.static.*',
  44. ],
  45. ))
  46. settings = {}
  47. ignored_settings = {
  48. # Deprecated broker settings (replaced by broker_url)
  49. 'broker_host',
  50. 'broker_user',
  51. 'broker_password',
  52. 'broker_vhost',
  53. 'broker_port',
  54. 'broker_transport',
  55. # deprecated task settings.
  56. 'chord_propagates',
  57. # MongoDB settings replaced by URL config.,
  58. 'mongodb_backend_settings',
  59. # Database URL replaced by URL config (result_backend = db+...).
  60. 'database_url',
  61. # Redis settings replaced by URL config.
  62. 'redis_host',
  63. 'redis_port',
  64. 'redis_db',
  65. 'redis_password',
  66. # Old deprecated AMQP result backend.
  67. 'result_exchange',
  68. 'result_exchange_type',
  69. # Experimental
  70. 'worker_agent',
  71. # Deprecated worker settings.
  72. 'worker_pool_putlocks',
  73. }
  74. def configcheck_project_settings():
  75. from celery.app.defaults import NAMESPACES, flatten
  76. settings.update(dict(flatten(NAMESPACES)))
  77. return set(settings)
  78. def is_deprecated_setting(setting):
  79. try:
  80. return settings[setting].deprecate_by
  81. except KeyError:
  82. pass
  83. def configcheck_should_ignore(setting):
  84. return setting in ignored_settings or is_deprecated_setting(setting)