Giter Club home page Giter Club logo

asteroidpy's Introduction

AsteroidPy

A simple tool to manage Asteroid observations and misurements

GitHub Contributor Covenant

Description

AsteroidPy is a simple tool to help astronomers to Schedule and manage asteroidal observation and misurements. It uses the main sources in minor planets research to provide punctual prevision of ephemerides and Neocp candidates.

Features

  • Weather forecast
  • Observation scheduling
  • NeoCP Candidates Listing
  • Object ephemeris
  • Twilight, Sun and Moon times
  • Virtual Horizon simulation

Getting Started

Using AsteroidPy is very easy. Here you can find instructions

Requirements

  • Python 3.x installed and configured
  • Pip installed

Installation

From Source:

  • Clone the repository in your directory git clone https://github.com/ziriuz84/asteroipy
  • Enter the folder with the command of your choice, usually cd asteroidpy
  • (Optional) create a Virtualenv for your installation virtualenv env
  • Install AsteroidPy pip install .

Execution

Simply launch the command

asteroidpy

Release History

Library used

  • Requests
  • BeautifoulSoup 4
  • Configparser
  • Astropy
  • Astroquery
  • Astroplan
  • LXML

Data provenience

Contributing contributions welcome

Thank you for considering contributing to Your Project Name!

Please first note we have a code of conduct, please follow it in all your interactions with the project.

We welcome any type of contribution, not only code. You can help with:

  • QA: File bug reports, the more details you can give the better (e.g. screenshots with the console open)
  • Community: Presenting the project at meetups, organizing a dedicated meetup for the local community
  • Code: Take a look at the open issues. Even if you can't write the code yourself, you can comment on them, showing that you care about a given issue matters. It helps us triage them

TODO

  • NEOcp alert integration
  • Observation registration

asteroidpy's People

Contributors

ziriuz84 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

deserticko

asteroidpy's Issues

Refactor scheduling.py:observing_target_list(config)

I've selected scheduling.py:observing_target_list(config) for refactoring, which is a unit of 81 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Add Twilight times

It will be very useful to add Twilight times to know when to operate. Maybe it's also useful Moon Phase, Moon rising and Moon set

Refactor interface.py:scheduling_menu(config)

I've selected interface.py:scheduling_menu(config) for refactoring, which is a unit of 16 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor interface.py:observatory_config_menu(config)

I've selected interface.py:observatory_config_menu(config) for refactoring, which is a unit of 33 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor scheduling.py:weather(config)

I've selected scheduling.py:weather(config) for refactoring, which is a unit of 37 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Sphinx doesn't recognize asteroid query

When I launch make html in docs folder the output is like this


Running Sphinx v1.8.5
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 0 source files that are out of date
updating environment: [] 0 added, 1 changed, 0 removed
Downloading https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat                                                                                               
|==========================================================================================================================| 1.3k/1.3k (100.00%)         0s
Downloading https://www.ietf.org/timezones/data/leap-seconds.list [Done]
WARNING: IERSStaleWarning: leap-second file is expired. [astropy.utils.iers.iers]

WARNING: autodoc: failed to import module 'asteroidpy' from module 'asteroidpy'; the following exception was raised:
No module named 'astroquery'
WARNING: autodoc: failed to import module 'configuration' from module 'asteroidpy'; the following exception was raised:
No module named 'astroquery'
WARNING: autodoc: failed to import module 'interface' from module 'asteroidpy'; the following exception was raised:
No module named 'astroquery'
WARNING: autodoc: failed to import module 'scheduling' from module 'asteroidpy'; the following exception was raised:
No module named 'astroquery'
WARNING: autodoc: failed to import module 'asteroidpy'; the following exception was raised:
No module named 'astroquery'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] modules                                                                                                                                
generating indices... genindex
writing additional pages... search
copying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 5 warnings.

The HTML pages are in build/html.

Refactor interface.py:scheduling_menu(config)

I've selected interface.py:scheduling_menu(config) for refactoring, which is a unit of 64 lines of code and 7 branch points. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Simple Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the number of branch points (if, for, while, etc.) per unit to 4.
  • Whyโ“
    Keeping the number of branch points low makes units easier to modify and test.
  • How ๐Ÿ”ง
    Split complex units with a high number of branch points into smaller and simpler ones.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor interface.py:observatory_config_menu(config)

I've selected interface.py:observatory_config_menu(config) for refactoring, which is a unit of 33 lines of code and 6 branch points. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Simple Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the number of branch points (if, for, while, etc.) per unit to 4.
  • Whyโ“
    Keeping the number of branch points low makes units easier to modify and test.
  • How ๐Ÿ”ง
    Split complex units with a high number of branch points into smaller and simpler ones.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Full gettext integration

AsteroidPy is ready for translation, there are pot files and all important strings are translatable. But Gettext is not configured.

TODO

  • Integrate gettext
  • Add language code support to configuration file
  • Add language changing in config menu

Pip package

Until now AsteroidPy is a simple python script. It will be easier to install and use as a pip package

TODO

  • Write setup.py
  • Write requirements.txt
  • Install test
  • Upload to Pypi repository
  • Setup github action to upload automatically every new release

Refactor scheduling.py:observing_target_list(config,payload)

I've selected scheduling.py:observing_target_list(config,payload) for refactoring, which is a unit of 39 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor interface.py:observatory_config_menu(config)

I've selected interface.py:observatory_config_menu(config) for refactoring, which is a unit of 33 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Better network error handling

When the program encounter network error it fails and crashes. I need some try-except to handle them without crashing

Refactor scheduling.py:observing_target_list(config,payload)

I've selected scheduling.py:observing_target_list(config,payload) for refactoring, which is a unit of 33 lines of code and 7 branch points. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Simple Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the number of branch points (if, for, while, etc.) per unit to 4.
  • Whyโ“
    Keeping the number of branch points low makes units easier to modify and test.
  • How ๐Ÿ”ง
    Split complex units with a high number of branch points into smaller and simpler ones.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor scheduling.py:weather(config)

I've selected scheduling.py:weather(config) for refactoring, which is a unit of 37 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor interface.py:scheduling_menu(config)

I've selected interface.py:scheduling_menu(config) for refactoring, which is a unit of 88 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Horizon simulation

It'll be awesome to have a model of the horizon, so we can limit altitude differently in every direction

Ephemerids doesn't function

Describe the bug
When I search for ephemerids of an object it crashes completely

To Reproduce

  1. Go to Object Ephemerids
  2. Insert a known object like 12P

Expected behavior
It gives ephemerids of object

Traceback (most recent call last):
  File "/home/sirio/Projects/asteroidpy/env/bin/asteroidpy", line 33, in <module>
    sys.exit(load_entry_point('AsteroidPy', 'console_scripts', 'asteroidpy')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sirio/Projects/asteroidpy/asteroidpy/__init__.py", line 24, in main
    interface.interface(config)
  File "/home/sirio/Projects/asteroidpy/asteroidpy/interface.py", line 511, in interface
    main_menu(config)
  File "/home/sirio/Projects/asteroidpy/asteroidpy/interface.py", line 496, in main_menu
    scheduling_menu(config)
  File "/home/sirio/Projects/asteroidpy/asteroidpy/interface.py", line 465, in scheduling_menu
    object_ephemeris_menu(config)
  File "/home/sirio/Projects/asteroidpy/asteroidpy/interface.py", line 564, in object_ephemeris_menu
    ephemeris = scheduling.object_ephemeris(config, object_name, step)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sirio/Projects/asteroidpy/asteroidpy/scheduling.py", line 534, in object_ephemeris
    str(object_name).upper(), location=location, step=step, number=30
                                                      ^^^^
UnboundLocalError: cannot access local variable 'step' where it is not associated with a value

Refactor interface.py:main_menu(config)

I've selected interface.py:main_menu(config) for refactoring, which is a unit of 16 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.