Closed solresol closed 8 months ago
None
)[!TIP] I can email you next time I complete a pull request if you set up your email here!
The sandbox appears to be unavailable or down.
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
moonpos.py
✓ https://github.com/solresol/lunar-astronomy/commit/05645d81a034078791c03a33ffcfcc378c15723f Edit
Create moonpos.py with contents:
• Create a new Python file named `moonpos.py`.
• Import necessary libraries such as `argparse` for command-line argument parsing and `ephem` for astronomical computations.
• Define a function that takes an ISO formatted date and time as input and uses the `ephem` library to calculate the moon's position and phase at that time.
• In the main section of the program, use `argparse` to parse the `--when` command-line argument and pass it to the function defined above.
• Print the calculated moon position and phase.
.github/workflows/test.yml
✓ https://github.com/solresol/lunar-astronomy/commit/59c58f85d8bdeb1be736cd12503e0718737bf615 Edit
Create .github/workflows/test.yml with contents:
• Create a new YAML file in the `.github/workflows/` directory named `test.yml`.
• Define a workflow that runs on every push and pull request.
• In the workflow, define a job that runs on an Ubuntu-latest runner.
• In the job, checkout the repository, set up Python 3.8, and install the requirements using `pip install -r requirements.txt`.
• Run the `moonpos.py` program with a suitable date time as the `--when` argument.
requirements.txt
✓ https://github.com/solresol/lunar-astronomy/commit/2f09afad7037074b40e4fa289278dde81c65dfb5 Edit
Create requirements.txt with contents:
• Add the `ephem` library to the `requirements.txt` file as it is used in the `moonpos.py` program for astronomical computations.
I have finished reviewing the code for completeness. I did not find errors for sweep/lunar_position_program
.
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord
Details
Write a Python program
moonpos.py
that takes a --when command-line argument (which will be a ISO formatted date and time) and prints out where the moon was in the sky, and what phase it was in. Use whatever python libraries you need, just remember to add them to requirements.txt Create .github/workflows/test.yml which installs the python requirements, and runsmoonpos.py
with some suitable date time.Checklist
- [X] Create `moonpos.py` ✓ https://github.com/solresol/lunar-astronomy/commit/05645d81a034078791c03a33ffcfcc378c15723f [Edit](https://github.com/solresol/lunar-astronomy/edit/sweep/lunar_position_program/moonpos.py) - [X] Create `.github/workflows/test.yml` ✓ https://github.com/solresol/lunar-astronomy/commit/59c58f85d8bdeb1be736cd12503e0718737bf615 [Edit](https://github.com/solresol/lunar-astronomy/edit/sweep/lunar_position_program/.github/workflows/test.yml) - [X] Create `requirements.txt` ✓ https://github.com/solresol/lunar-astronomy/commit/2f09afad7037074b40e4fa289278dde81c65dfb5 [Edit](https://github.com/solresol/lunar-astronomy/edit/sweep/lunar_position_program/requirements.txt#L1-L1)