astronomy icon indicating copy to clipboard operation
astronomy copied to clipboard

missing directory and files after installing with "pip install astronomy-engine"

Open francis-dalaudier opened this issue 1 year ago • 1 comments

Hello, I use a MacBook with MacOS 10.13.6 and Python Python 3.12.0 I installed astronomy-engine through pip (see title) I looked, downloaded (in a local directory) . and tried various demo scripts at https://github.com/cosinekitty/astronomy/blob/master/demo/python/ I could then write my own python program and run it with success (thanks !!)

The issue is with stars_near_moon.py the line with open('../../generate/hyg_v36_1.csv') as starfile: gives an error since there is no "generate" directory and no "hyg_v36_1.csv file"

I searched in various places with no success. I then downloaded https://github.com/cosinekitty/astronomy/blob/master/generate/run and run it. the result is shown below: `€ ./run

Local file not found: lnxp1600p2200.405 Attempting download from: https://github.com/cosinekitty/ephemeris/raw/master/lnxp1600p2200.405

2024-06-29 09:09:47 URL:https://raw.githubusercontent.com/cosinekitty/ephemeris/master/lnxp1600p2200.405 [55900416/55900416] -> "lnxp1600p2200.405" [1] wget successfully downloaded the file. ./run: line 61: ./checksum.py: No such file or directory lnxp1600p2200.405 ERROR(./run): Detected corrupt file: failed sha256 check. ` I then checked again for directory "generate" but could not find it.

the line with open('../../generate/hyg_v36_1.csv') as starfile: seems to assumes some current working directory. How can this work ?

I found an issue entitled " Rewrite entire build process in Python #295 " is my question related ?

with my best regards

note: I know nothing about how to use GitHub. Please be explicit

francis-dalaudier avatar Jun 29 '24 08:06 francis-dalaudier

hello again.

After searching for the missing file on GitHub, I think I have a broad answer to my "issue". This file (and directory) is not intended to be automatically installed. It is a kind of "home work" for the user of the package. This file is "huge" or at least very large. Please tell me where I can find the recommended version (or may be a stripped-down version). I will try to get it locally on my machine.

Finally, asking the question about install helped me to find an answer.

Best regards. Francis

francis-dalaudier avatar Jun 29 '24 12:06 francis-dalaudier

I'm sorry for the long delay in responding. I think you ran into the problem with checksum.py because you need to execute the run script while you are inside the generate directory. For example:

cd generate
./run

But using this script requires you to install a lot of extra packages as documented here. The generate/run script is intended for myself and contributors who are making changes to Astronomy Engine. Most developers using Astronomy Engine don't need to do all this.

I suppose it is strange for a demo program to have an external dependency like that, and I'm wondering if the confusion is really worth its existence, LOL!

Again, I apologize for the long time it took me to respond. I got distracted and forgot about it until now. :(

cosinekitty avatar Jul 17 '24 16:07 cosinekitty

Hello Don, Thank you for your answer. As you can guess from my previous comment, my investigations gave me the general (not detailed) answer to my question. All what I needed was some version of generate/hyg_v36_1.csv (preferably a striped down one). Can you tell me where I could find it (without installing "everything") ? Anyway, thanks again. Francis

francis-dalaudier avatar Jul 18 '24 06:07 francis-dalaudier