Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-8897

:example-source: tidying

    XMLWordPrintable

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • sdk3.2-backlog
    • None
    • None

    Description

      Two possibly related things to understand/tidy:

      1) what is

      // in modules/howtos/pages/full-text-searching-with-sdk.adoc:
       
      :example-source: 3.2@python-sdk:howtos:example$search_ops.py 

      not sure if/where that's used.

      2) Code examples are linked to github repo manually, rather than with `include::` automagically. Is this desired. e.g.

      // in modules/howtos/pages/n1ql-queries-with-sdk.adoc:
       
      The complete code for this page's example can be found at https://github.com/couchbase/docs-sdk-python/blob/release/3.2/modules/howtos/examples/n1ql_ops.py[n1ql_ops.py]. 

      But see also this from dotnet:

      // in modules/howtos/pages/kv-operations.adoc:
       
      // The complete code sample used on this page can be downloaded from
      //  xref::example$document.cs[here] 

      Does this even work? (e.g. link to github). It's commented out, so assuming not.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          richard.smedley Richard Smedley added a comment - In this particular case, it arrived this month in https://github.com/couchbase/docs-sdk-python/commit/6b10e8e75c8ed6d934324d24388e23f3b2b7d99f probably cargo-culted in from the 3.0 Java docs - e.g.  https://github.com/couchbase/docs-sdk-java/blame/release/3.0/modules/howtos/pages/analytics-using-sdk.adoc Like this one: https://github.com/couchbase/docs-sdk-java/pull/237  

          But having 

          :example-source:

          in the header (or imported from attributes.adoc)

          would enable a standard form of {example-source} in all of the code snippets....
          but this is of limited usefulness,
          so, unless we can find a good reason to keep it anywhere,

          should probably be removed.  

          richard.smedley Richard Smedley added a comment - But having  :example-source: in the header (or imported from attributes.adoc) would enable a standard form of {example-source} in all of the code snippets.... but this is of limited usefulness, so, unless we can find a good reason to keep it anywhere , should probably be removed.  

          2 works fine on several pages - see

          https://docs.couchbase.com/java-sdk/current/howtos/kv-operations.html

          for example   

          richard.smedley Richard Smedley added a comment - 2 works fine on several pages - see https://docs.couchbase.com/java-sdk/current/howtos/kv-operations.html for example   

          Was probably commented out because the code sample was not ready,

          and we just haven't got round to fixing.

          Perhaps this could be added to more pages at the same time as DOC-7077 work?

          richard.smedley Richard Smedley added a comment - Was probably commented out because the code sample was not ready, and we just haven't got round to fixing. Perhaps this could be added to more pages at the same time as DOC-7077  work?

          People

            hakim.cassimally Hakim Cassimally
            hakim.cassimally Hakim Cassimally
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty