diff --git a/.gitignore b/.gitignore index 57a4122..c3094c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -/cache -/__pycache__ +__pycache__ +/build +/dist +kosmorro.egg-info diff --git a/README.md b/README.md index cd5ccdb..67480bb 100644 --- a/README.md +++ b/README.md @@ -8,20 +8,32 @@ Kosmorro is a software that allows you to compute the ephemeris for a date, a mo ### Requirements -To use this software, you will need the following software: +Kosmorro requires the following software to work: - Python ≥ 3.7.0 - PIP -- [Pipenv](https://pypi.org/project/pipenv/) + +Note: Kosmorro currently only supports Linux operating system. macOS will follow soon. Windows probably. + +### Production environment + +If you are an end-user, you will prefer running Kosmorro as any other software on your machine. + +Install Kosmorro through PIP: `pip install kosmorro`. This will download and configure the last version of Kosmorro. +You will then be able to run it by invoking `kosmorro` in your terminal! + +### Development environment + +First, install [Pipenv](https://pypi.org/project/pipenv/). Clone this repository and run `pipenv sync` to install all the dependencies. +Then, run Kosmorro by invoking `pipenv run python kosmorro`. -# Running Kosmorro +For comfort, you may want to invoke `pipenv shell` first and then just `python kosmoro`. -Because it's still on an early-development stage, to run Kosmorro, you will need to prefix your commands `pipenv run`. -A `setup.py` file will come later to manage installation in the real world. +## Running Kosmorro -## Usage +### Usage ``` kosmorro.py [-h] [--latitude LATITUDE] [--longitude LONGITUDE] diff --git a/kosmorro.py b/kosmorro similarity index 100% rename from kosmorro.py rename to kosmorro diff --git a/kosmorrolib/core.py b/kosmorrolib/core.py index 4229337..b18dbd8 100644 --- a/kosmorrolib/core.py +++ b/kosmorrolib/core.py @@ -20,6 +20,8 @@ from skyfield.api import Loader from .data import Star, Planet, Satellite +VERSION = '0.1.0' + MONTHS = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'] ASTERS = [Star('Sun', 'SUN'), @@ -35,7 +37,7 @@ ASTERS = [Star('Sun', 'SUN'), def get_loader(): - return Loader('./cache') + return Loader('~/.kosmorro-cache') def get_timescale(): diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..3f1a762 --- /dev/null +++ b/setup.py @@ -0,0 +1,22 @@ +from kosmorrolib.core import VERSION +from setuptools import setup, find_packages +import pathlib + +HERE = pathlib.Path(__file__).parent +README = (HERE / 'README.md').read_text() + +setup( + name='kosmorro', + version=VERSION, + author='Jérôme Deuchnord', + author_email='jerome@deuchnord.fr', + url='https://kosmorro.astronewbie.space', + license='AGPL-3.0', + description='A program that computes the ephemerides.', + long_description=README, + long_description_content_type='text/markdown', + keywords='kosmorro astronomy ephemerides ephemeris', + packages=find_packages(), + scripts=['kosmorro'], + install_requires=['skyfield>=1.13.0,<2.0.0', 'tabulate', 'numpy>=1.17.0,<2.0.0'] +)