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

Added the APOD object parser +fixed some MD022 and MD005 issues #46

Merged
merged 13 commits into from
Nov 12, 2020

Conversation

akionsight
Copy link
Contributor

added the APOD parser. for more info
check the APOD parser's github page
https://github.com/akionsight/APOD

fixed some MD022 and MD005 issues in the README.md

added the APOD parser. for more info
check the APOD parser's github page
https://github.com/akionsight/APOD

fixed some MD022 and MD005 issues in the readme
@lgtm-com
Copy link

lgtm-com bot commented Jul 13, 2020

This pull request introduces 1 alert when merging 0023126 into 983420d - view on LGTM.com

new alerts:

  • 1 for Unused import

@akionsight
Copy link
Contributor Author

the unused import for urllib has been removed

@akionsight
Copy link
Contributor Author

will this pull request be merged ?

@JustinGOSSES JustinGOSSES self-assigned this Aug 10, 2020
@JustinGOSSES
Copy link
Contributor

JustinGOSSES commented Aug 10, 2020

Hi @akionsight can you describe what you view as the reason for your code contribution? I want to make sure I understand how you see it relating to the existing code base.

Are you trying to provide a python file to call the APOD API that exists on api.nasa.gov directly in python and parse the returned object without having standing up the API itself?

@akionsight
Copy link
Contributor Author

Hi @akionsight can you describe what you view as the reason for your code contribution? I want to make sure I understand how you see it relating to the existing code base.

Are you trying to provide a python file to call the APOD API that exists on api.nasa.gov directly in python and parse the returned object without having standing up the API itself?

Hi @JustinGOSSES,
I have created a python file that will help a user to quickly get and parse the information the data provided by the APOD API without spending additional time making a system like that. This will NOT interfere with the existing code base and is independent. It is also not the APOD API itself but it is a parser for the APOD api. It will parse the returned object without having standing up the API itself and It will not exist on api.nasa.gov.

@JustinGOSSES
Copy link
Contributor

Thank you. Can you add a description like that and maybe a few lines of examples of how to use it to the readme and commit those changes to this pull request. There's a risk of confusion here, but I think it will be fine as well as things are explained well in the README.

Added Information about the APOD API parser including documentation
Added more info about the apod_object_parser including Usage and Docs
@akionsight
Copy link
Contributor Author

Thank you. Can you add a description like that and maybe a few lines of examples of how to use it to the readme and commit those changes to this pull request. There's a risk of confusion here, but I think it will be fine as well as things are explained well in the README.

Done !!

@JustinGOSSES
Copy link
Contributor

Looking good. I only had time to take a quick look tonight. I'll clone and run the code on Monday or Tuesday and will likely merge it afterwards.

Only one more request. Can you move the documentation that is currently on your repository to this fork as well? I totally get wanting to link back to your github account. Unfortunately, the US federal government has policies against "endorsing". Having some of the instructions for a repository on your site is probably treading too close to that line. As a compromise, I could call out external contributors under the "Authors" section of the README and link to https://github.com/nasa/apod-api/graphs/contributors . After the merge request, you'll be listed there.

@akionsight
Copy link
Contributor Author

Looking good. I only had time to take a quick look tonight. I'll clone and run the code on Monday or Tuesday and will likely merge it afterwards.

Only one more request. Can you move the documentation that is currently on your repository to this fork as well? I totally get wanting to link back to your github account. Unfortunately, the US federal government has policies against "endorsing". Having some of the instructions for a repository on your site is probably treading too close to that line. As a compromise, I could call out external contributors under the "Authors" section of the README and link to https://github.com/nasa/apod-api/graphs/contributors . After the merge request, you'll be listed there.

I totally understand that. I have now moved the apod_object_parser into a separate folder which also contains the README.md for the apod_object_parser. the folder is named apod_parser

Changed the way how `convert_image` function works so that it works on all operating systems.
Minor changes to the download_image function. Now raises a FileExistsError if the specified file exists
@akionsight
Copy link
Contributor Author

akionsight commented Aug 20, 2020

this is some code to quickly test it out

import apod_object_parser

data = apod_object_parser.get_data(##your api key)
# print(data)
title = apod_object_parser.get_title(data)
exp = apod_object_parser.get_explaination(data)
media_type = apod_object_parser.get_media_type(data)
date = apod_object_parser.get_date(data)
hdurl = apod_object_parser.get_hdurl(data)
url = apod_object_parser.get_url(data)
ser_version = apod_object_parser.get_service_version(data)

print(title, "\n", exp, "\n", media_type, "\n", date, "\n", hdurl, "\n", url, "\n", ser_version, "\n")

#apod_object_parser.download_image(url, date)
#apod_object_parser.convert_image(date)

@akionsight
Copy link
Contributor Author

will this PR be merged?

@JustinGOSSES
Copy link
Contributor

Sorry for the delay. Other things offline were/are on fire. Adding to the thread so it doesn't get lost.

@JustinGOSSES
Copy link
Contributor

Apologies for the delayed review. I played around with it locally and made some very small edits to documentation. Looks good.

@JustinGOSSES JustinGOSSES merged commit 370f7f6 into nasa:master Nov 12, 2020
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.

2 participants