{ "info": { "author": "Daniel D'Avella", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "sphinx-asdf\n===========\n\n``sphinx-asdf`` is a plugin for `sphinx`_ that enables generation of\ndocumentation from `ASDF`_ schemas.\n\nInstallation\n------------\n\nThe latest development version is available from the ``master`` branch `on\ngithub`_. To clone the project:\n\n::\n\n $ git clone https://github.com/spacetelescope/sphinx-asdf\n\nTo install:\n\n::\n\n $ cd sphinx-asdf\n $ pip install .\n\nTo install in `development mode`_::\n\n $ pip install -e .\n\nUsage\n-----\n\nThe ``sphinx-asdf`` plugin provides two `sphinx directives`_,\n``asdf-autoschemas`` and ``asdf-schema``.\n\nThe plugin also provides several configuration variables:\n\n* ``asdf_schema_path``\n* ``asdf_schema_standard_prefix``\n* ``asdf_schema_reference_mappings``\n\nBasic Example\n*************\n\nConsider a package with the following layout as an example::\n\n mypackage/\n setup.py\n mypackage/\n schemas/\n example.org/\n custom/\n foo/\n a.yaml\n b.yaml\n c.yaml\n bar/\n x.yaml\n y.yaml\n z.yaml\n ...\n docs/\n conf.py\n schemas.rst\n\nThis package provides schemas with tags that all have the prefix of\n``tag:example.org/custom``. The layout of the schema directory reflects this\nnaming convention. We wish to provide documentation for all of our schemas.\n\nFirst, we will add configuration variables to our ``docs/conf.py`` file:\n\n.. code-block:: python\n\n # This variable indicates the top-level directory containing schemas.\n # The path is relative to the location of conf.py in the package\n asdf_schema_path = \"../mypackage/schemas\"\n # This variable indicates the standard prefix that is common to all schemas\n # provided by the package.\n asdf_schema_standard_prefix = \"example.org/custom\"\n\nThe variables set in the ``docs/conf.py`` file indicate to ``sphinx-asdf``\nwhere to locate the schemas based on the names we will use in the\ndocumentation.\n\nNow, we use the ``asdf-autoschemas`` directive in ``docs/schemas.rst`` to\ncreate a table of contents for the schema documentation::\n\n .. asdf-autoschemas::\n\n foo/a\n foo/b\n foo/c\n bar/x\n bar/y\n bar/z\n\nEach item in the list represents the name of a schema to be included in the\ndocuments. The names are **not** paths to the schema files and should not\ninclude the file extension. Resolution of the names to actual schema files is\nhandled by the ``asdf_schema_path`` and ``asdf_schema_standard_prefix``\nconfiguration variables.\n\nWe can also use multiple ``asdf-autoschemas`` directives if we wish::\n\n These schemas are part of foo:\n\n .. asdf-autoschemas::\n\n foo/a\n foo/b\n foo/c\n\n And these schemas are part of bar:\n\n .. asdf-autoschemas::\n\n bar/x\n bar/y\n bar/z\n\n\nWhen ``sphinx-build`` runs, the ``sphinx-asdf`` plugin will automatically\ngenerate schema documentation for each of the schemas listed in each\n``asdf-autoschemas`` directive. In the documentation, each ``asdf-autoschemas``\ndirective will be replaced with a table of contents that contains links to each\nof the listed schema documents.\n\n.. _Directive settings:\n\nDirective settings\n******************\n\nWhile the ``asdf_schema_path`` and ``asdf_schema_standard_prefix``\nconfiguration variables set global schema resolution settings, it is also\npossible to set per-directive settings. For example, we could have done the\nfollowing::\n\n .. asdf-autoschemas::\n :schema_root: ../mypackage/schemas\n :standard_prefix: example.org/custom\n\nThis would eliminate the need to set global settings. It also allows any\nglobal settings to be overridden on a per-directive basis.\n\n.. note::\n\n The ``:schema_root:`` argument requires a path that is relative to\n the ``sphinx`` configuration file.\n\nExternal References\n*******************\n\nSchema references to other schemas in the same package are automatically\nconverted to links in the generated documentation. (This assumes that all of\nthe references correspond to schemas that are explicitly generated by an\n``asdf-autoschemas`` directive). However, sometimes it is necessary to resolve\nreferences to schemas in other packages. The ``asdf_schema_reference_mapping``\nconfiguration variable is provided for this purpose. It enables a mapping\nbetween references that begin with a particular prefix to a URL indicating\nanother package's documentation.\n\nFor example, to enable references to the ASDF Standard documentation to be\nresolved as links, include the following in your ``docs/conf.py`` file:\n\n.. code-block:: python\n\n asdf_schema_reference_mappings = [\n ('tag:stsci.edu:asdf',\n 'http://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/'),\n ]\n\nInline documentation\n********************\n\nThe ``asdf-autoschemas`` directive automatically generates individual schema\ndocumentation pages and creates a table of contents. However, sometimes it may\nbe useful to include schema documentation inline inside another document. The\n``asdf-schema`` directive is provided for this purpose.\n\nUsing the package described above as an example, the ``asdf-schema`` directive\ncan be used to document a single schema inside of another document::\n\n .. asdf-schema::\n\n foo/a\n\nThe behavior of the ``asdf-schema`` directive is also governed by the\n``asdf_schema_path`` and ``asdf_schema_standard_prefix`` global configuration\nvariables. The directive also accepts the same ``:schema_root:`` and\n``:standard_prefix:`` arguments as ``asdf-autoschemas`` (see `Directive\nsettings`_ above) for per-directive configuration.\n\nContributing\n------------\n\nWe welcome feedback and contributions to the project. Contributions of\ncode, documentation, or general feedback are all appreciated. Please\nfollow the `contributing guidelines `__ to submit an\nissue or a pull request.\n\nWe strive to provide a welcoming community to all of our users by\nabiding to the `Code of Conduct `__.\n\n\n.. Links\n\n.. _ASDF: https://asdf-standard.readthedocs.io/en/latest\n.. _sphinx: https://www.sphinx-doc.org/en/master\n.. _on github: https://github.com/spacetelescope/sphinx-asdf\n.. _development mode: https://packaging.python.org/tutorials/distributing-packages/#working-in-development-mode\n.. _sphinx directives: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html\n.. _table of contents: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#table-of-contents", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/spacetelescope/sphinx-asdf", "keywords": "", "license": "BSD 3-Clause", "maintainer": "", "maintainer_email": "", "name": "sphinx-asdf", "package_url": "https://pypi.org/project/sphinx-asdf/", "platform": "", "project_url": "https://pypi.org/project/sphinx-asdf/", "project_urls": { "Homepage": "https://github.com/spacetelescope/sphinx-asdf" }, "release_url": "https://pypi.org/project/sphinx-asdf/0.1.0rc8/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Sphinx plugin for generating documentation from ASDF schemas", "version": "0.1.0rc8" }, "last_serial": 5183472, "releases": { "0.1.0rc1": [ { "comment_text": "", "digests": { "md5": "96176853fb0a842c569422440380a634", "sha256": "8444df831cf0f9549d0c9cc1fb4c647d01e50b699187a6bdfdd1ce72530a05c4" }, "downloads": -1, "filename": "sphinx-asdf-0.1.0rc1.tar.gz", "has_sig": true, "md5_digest": "96176853fb0a842c569422440380a634", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 12315, "upload_time": "2019-03-22T16:42:26", "url": "https://files.pythonhosted.org/packages/4f/46/092bcd80bd49a31ed4386f7dbf727289afbc93e30ffed8dffc0b6fe1e78c/sphinx-asdf-0.1.0rc1.tar.gz" } ], "0.1.0rc2": [ { "comment_text": "", "digests": { "md5": "0de095aeb7602e76c27bf1a2ce5410b2", "sha256": "51821668525b6454d6ea0314182e74a7f5501aa07c5697520483b0cdd1a8bdb4" }, "downloads": -1, "filename": "sphinx-asdf-0.1.0rc2.tar.gz", "has_sig": false, "md5_digest": "0de095aeb7602e76c27bf1a2ce5410b2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 12956, "upload_time": "2019-03-25T17:05:23", "url": "https://files.pythonhosted.org/packages/27/d9/25b324a408178bf3048404e392ffc3707540589acf6c87c34e315a5f9f93/sphinx-asdf-0.1.0rc2.tar.gz" } ], "0.1.0rc3": [ { "comment_text": "", "digests": { "md5": "4796d3df2301bd65477c9673c7f800e7", "sha256": "245783e4218d7c4b920d396db36cf8259f0d3583a69903c06ecb0bbdf999781d" }, "downloads": -1, "filename": "sphinx-asdf-0.1.0rc3.tar.gz", "has_sig": true, "md5_digest": "4796d3df2301bd65477c9673c7f800e7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 13065, "upload_time": "2019-03-26T14:26:08", "url": "https://files.pythonhosted.org/packages/53/d5/27e1060185bb806fecaf998c5d661249746f4fc9cb7d6d696f4d74001a5e/sphinx-asdf-0.1.0rc3.tar.gz" } ], "0.1.0rc4": [ { "comment_text": "", "digests": { "md5": "18759c3c488913ad90ac32b25a67f3fe", "sha256": "fc0e1b2b9241c689f5d59ff39ee0c68039df79f903131f2ea79f17cddcecafe5" }, "downloads": -1, "filename": "sphinx-asdf-0.1.0rc4.tar.gz", "has_sig": true, "md5_digest": "18759c3c488913ad90ac32b25a67f3fe", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 12937, "upload_time": "2019-03-29T15:30:47", "url": "https://files.pythonhosted.org/packages/98/7b/9976d485f3ef0cfb82879cb820360322ed7bcab2ec4fdf01fb07c5c6b94a/sphinx-asdf-0.1.0rc4.tar.gz" } ], "0.1.0rc5": [ { "comment_text": "", "digests": { "md5": "295a88551fc0f4ed01d4af648f34dfbe", "sha256": "ce0eea8385017b1fc39caed697e4e36d94ccb0441453d81b028612affc54c92b" }, "downloads": -1, "filename": "sphinx-asdf-0.1.0rc5.tar.gz", "has_sig": true, "md5_digest": "295a88551fc0f4ed01d4af648f34dfbe", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 12937, "upload_time": "2019-03-29T18:05:32", "url": "https://files.pythonhosted.org/packages/3f/14/6f7dae94372a1bc1c159df9b22849ee46e0d9583dee597344311c9b5adaf/sphinx-asdf-0.1.0rc5.tar.gz" } ], "0.1.0rc6": [ { "comment_text": "", "digests": { "md5": "7fe84d2e438728a96a9e2b80e494ad79", "sha256": "0eed7303662d35cbc15ecc9b88686208dec47d97410858006960e733a825f235" }, "downloads": -1, "filename": "sphinx-asdf-0.1.0rc6.tar.gz", "has_sig": true, "md5_digest": "7fe84d2e438728a96a9e2b80e494ad79", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 12961, "upload_time": "2019-04-01T16:44:45", "url": "https://files.pythonhosted.org/packages/36/02/7a43f9787d4d87d4477ddc7b92520171555f5359aba45b9ac89fd2771d27/sphinx-asdf-0.1.0rc6.tar.gz" } ], "0.1.0rc7": [ { "comment_text": "", "digests": { "md5": "b67fcf54ccf0a6a861a40aecbe93eba3", "sha256": "8e9e333c92d858cfdf29e1f647581d903b4425fe63b6f8205ed02a9b67bb3d11" }, "downloads": -1, "filename": "sphinx-asdf-0.1.0rc7.tar.gz", "has_sig": true, "md5_digest": "b67fcf54ccf0a6a861a40aecbe93eba3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 13187, "upload_time": "2019-04-02T15:12:40", "url": "https://files.pythonhosted.org/packages/f0/fa/901c35019e06360e858de40d112ec4fb1eaaa54dfd3e2822ca5645c22337/sphinx-asdf-0.1.0rc7.tar.gz" } ], "0.1.0rc8": [ { "comment_text": "", "digests": { "md5": "699ce96fd51fa1d671138ddbb698307d", "sha256": "4f81b36a29ffc2d48602a8134180cd9469aa1beb55357557320d6c37ca6cd6f7" }, "downloads": -1, "filename": "sphinx-asdf-0.1.0rc8.tar.gz", "has_sig": true, "md5_digest": "699ce96fd51fa1d671138ddbb698307d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 19817, "upload_time": "2019-04-24T17:14:59", "url": "https://files.pythonhosted.org/packages/fc/08/a5efac0f040a149e5432177baeeb0e636cc094c9862be03f3433606072ca/sphinx-asdf-0.1.0rc8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "699ce96fd51fa1d671138ddbb698307d", "sha256": "4f81b36a29ffc2d48602a8134180cd9469aa1beb55357557320d6c37ca6cd6f7" }, "downloads": -1, "filename": "sphinx-asdf-0.1.0rc8.tar.gz", "has_sig": true, "md5_digest": "699ce96fd51fa1d671138ddbb698307d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 19817, "upload_time": "2019-04-24T17:14:59", "url": "https://files.pythonhosted.org/packages/fc/08/a5efac0f040a149e5432177baeeb0e636cc094c9862be03f3433606072ca/sphinx-asdf-0.1.0rc8.tar.gz" } ] }