conf.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import, unicode_literals
  3. from sphinx_celery import conf
  4. globals().update(conf.build_config(
  5. 'celery', __file__,
  6. project='Celery',
  7. version_dev='4.0',
  8. version_stable='3.1',
  9. canonical_url='http://docs.celeryproject.org',
  10. webdomain='celeryproject.org',
  11. github_project='celery/celery',
  12. author='Ask Solem & contributors',
  13. author_name='Ask Solem',
  14. copyright='2009-2016',
  15. publisher='Celery Project',
  16. html_logo='images/celery_128.png',
  17. html_favicon='images/favicon.ico',
  18. html_prepend_sidebars=['sidebardonations.html'],
  19. extra_extensions=[
  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.task.base',
  31. 'celery.bin',
  32. 'celery.bin.celeryd_detach',
  33. 'celery.contrib',
  34. r'celery.fixups.*',
  35. 'celery.local',
  36. 'celery.app.base',
  37. 'celery.apps',
  38. 'celery.canvas',
  39. 'celery.concurrency.asynpool',
  40. 'celery.utils.encoding',
  41. ],
  42. ))
  43. settings = {}
  44. ignored_settings = {
  45. 'worker_agent',
  46. 'worker_pool_putlocks',
  47. 'broker_host',
  48. 'broker_user',
  49. 'broker_password',
  50. 'broker_vhost',
  51. 'broker_port',
  52. 'broker_transport',
  53. 'chord_propagates',
  54. 'mongodb_backend_settings',
  55. 'redis_host',
  56. 'redis_port',
  57. 'redis_db',
  58. 'redis_password',
  59. }
  60. def configcheck_project_settings():
  61. from celery.app.defaults import NAMESPACES, flatten
  62. settings.update(dict(flatten(NAMESPACES)))
  63. return set(settings)
  64. def is_deprecated_setting(setting):
  65. try:
  66. return settings[setting].deprecate_by
  67. except KeyError:
  68. pass
  69. def configcheck_should_ignore(setting):
  70. return setting in ignored_settings or is_deprecated_setting(setting)