Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pds-api#169 api user guide #171

Closed
wants to merge 8 commits into from
Closed

Conversation

ramesh-maddegoda
Copy link
Contributor

@ramesh-maddegoda ramesh-maddegoda commented Mar 23, 2022

🗒️ Summary

Brief summary of changes if not sufficiently described by commit messages.

⚙️ Test Data and/or Report

One of the following should be included here:

  • Reference to regression test included in code (preferred wherever reasonable)
  • Attach test data here + outputs of tests

♻️ Related Issues

#169

open(markdown_filename, 'wb').write(r.content)

with open(markdown_filename, 'r') as f:
html_text = markdown(f.read(), output_format='html4')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incompatible parameter type: Expected typing.Union[typing_extensions.Literal['html'], typing_extensions.Literal['xhtml'], None] for 2nd parameter output_format to call markdown.core.markdown but got typing_extensions.Literal['html4'].

(at-me in a reply with help or ignore)

@jordanpadams jordanpadams marked this pull request as ready for review April 14, 2022 22:20
@jordanpadams jordanpadams requested a review from a team as a code owner April 14, 2022 22:20
@jordanpadams jordanpadams changed the title Pds api 169 api user guide pds-api#169 api user guide Apr 14, 2022
from markdown import markdown
import pdfkit
import requests
# import pypandoc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When code's commented-out, I like to see a comment explaining why. Otherwise, just delete it—with extreme prejudice! 💥

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed unwanted comments

=========================

The Planetary Data System is a federated system of nodes that archive planetary science data. The PDS Application Programming
Interface (API) is an attempt at provide a consistent interface for sharing archival data and services across PDS, among
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just say:

The PDS Application Programming Interface (API) provides a consistent way discover and share archival data across PDS…

The wording of "attempt to provide" makes it sound weak 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed and reworded.

Copy link
Member

@nutjob4life nutjob4life left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

open(markdown_filename, 'wb').write(r.content)

with open(markdown_filename, 'r') as f:
html_text = markdown(f.read(), output_format='html4')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incompatible parameter type: Expected typing.Union[typing_extensions.Literal['html'], typing_extensions.Literal['xhtml'], None] for 2nd parameter output_format to call markdown.core.markdown but got typing_extensions.Literal['html4'].

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramesh-maddegoda should this be output_format='html' instead of html4?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the previous reference of the markdown library I checked had html4. The latest https://python-markdown.github.io/reference/ has html as follows in output formats.

output_format:
   Format of output.

    Supported formats are:

    "xhtml": Outputs XHTML style tags. Default.
    "html5": Outputs HTML style tags.

The values can be in either lowercase or uppercase.

However, I changed the output_format to html to avoid this sonatype-lift issue.

…cation related files and fix sonartype-lift issues

Refer to the task #169
@jordanpadams
Copy link
Member

updates added to this PR: #184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants