오픈 소스 Python 프로젝트를 곧 시작하고 문서화 문자열을 작성하는 방법을 미리 결정하려고합니다. 분명한 대답은 autodoc을 사용하여 reStructuredText와 Sphinx를 사용하는 것입니다. 왜냐하면 I 정말은 내 문서 문자열에 내 코드를 올바르게 문서화 한 다음 Sphinx가 자동으로 API 문서를 구성하기 때문입니다.Python 문서화를위한 reStructuredText의 실제 대안이 있습니까?
문제는 사용하는 reStructuredText 구문입니다. 렌더링되기 전에 완전히 읽을 수없는 것 같습니다. 예를 들어 :
:param path: The path of the file to wrap :type path: str :param field_storage: The :class:`FileStorage` instance to wrap :type field_storage: FileStorage :param temporary: Whether or not to delete the file when the File instance is destructed :type temporary: bool
당신은 에 정말 천천히 그 구문 뒤범벅에서 어떤 의미를 만들기 위해 분 정도 걸릴 수 있습니다.
Args: path (str): The path of the file to wrap field_storage (FileStorage): The FileStorage instance to wrap temporary (bool): Whether or not to delete the file when the File instance is destructed
방법 좋네요 : 나는 훨씬 더 다음과 같습니다 위의 대응 구글 방법 (Google Python Style Guide)를, 좋아! 그러나 물론, 스핑크스는 그 중 하나도 가지지 않을 것이고, "Args :"뒤에 모든 텍스트를 하나의 긴 줄로 표현할 것입니다.
그래서 요약하기 전에이 reStructuredText 구문을 사용하여 코드베이스를 더럽 히기 전에 필자 자신의 API doc을 작성하는 것만으로도 스핑크스와 스핑크스를 사용하는 것에 대한 실질적인 대안이 있는지 알고 싶습니다. 예를 들어 Google Style Guide의 문서화 스타일을 처리하는 Sphinx 확장 프로그램이 있습니까?
Google 길도 처음부터 사용합니다. 그것은 훨씬 명확하다 –