Skip to content
Snippets Groups Projects
Commit 4b675437 authored by James Tocknell's avatar James Tocknell
Browse files

Merge branch 'get-ready-for-pypi' into 'main'

Get things ready for PyPI upload

See merge request !6
parents 562c5d2b 07fc37b1
Branches
Tags v0.1
1 merge request!6Get things ready for PyPI upload
Pipeline #5527 failed
......@@ -2,9 +2,9 @@ include:
- project: 'datacentral/gitlab-ci-templates'
ref: main
file: '/dc-internal-python-package.yml'
- project: 'datacentral/gitlab-ci-templates'
ref: main
file: '/release-to-pypi.yml'
pylint:
allow_failure: true
checkreadme:
allow_failure: true
......@@ -5,6 +5,7 @@ include pytest.ini
include tox.ini
include tests
include .gitlab-ci.yml
include pypi-intro.rst
recursive-include tests *.py
recursive-include tests/data *
recursive-exclude tests/__pycache__ *
......
eso-downloader
==============
A python package which provides an easy way to download data for a given ESO
observational program ID.
Getting started
...............
To run eso-downloader, you will need to add your ESO portal username and
password to the system keyring (the secure place to store login details), and
create a config file detailing where to put the data.
Storing passwords/credentials
-----------------------------
This package uses the keyring package (https://pypi.org/project/keyring) to
store passwords and other credentials. If keyring is unable to find a place to
store and read secrets from, see how to configure keyring at
https://keyring.readthedocs.io/en/stable/#configuring.
To add your password to the keyring on your system, run::
keyring set eso-downloader <your ESO portal username>
and enter your ESO portal password (in the future, we hope that there will be
long-lasting tokens so that we do not need to store the portal password
directly).
To confirm that the password is saved, run::
keyring get eso-downloader <your ESO portal username>
Creating a config file
----------------------
An initial starter config file (in ``.ini`` format) would be::
[DEFAULT]
username = <your ESO portal username>
base_dir = <where you want to save the downloaded data>
If you need to use different paths or different usernames for particular
programs, you can add sections for specific programs e.g.::
[103.20AX.101]
username = <some other username>
or::
[98.13BA.215]
base_dir = <some other directory>
Running the script
------------------
The script will use the config file and the list of program IDs passed to it to
download in parallel all the files needed for the reduction of the found science
files, skipping those already downloaded (see algorithm below).
Doing::
eso-downloader --config <path_to_config_file> <program_id> <program_id> ...
will start the download. If sent `SIGTERM`, the script will stop requesting new
files, and finish downloading the files it was working on.
......@@ -2,14 +2,14 @@ import setuptools
import versioneer
#DESCRIPTION_FILES = ["pypi-intro.rst"]
#
#long_description = []
#import codecs
#for filename in DESCRIPTION_FILES:
# with codecs.open(filename, 'r', 'utf-8') as f:
# long_description.append(f.read())
#long_description = "\n".join(long_description)
DESCRIPTION_FILES = ["pypi-intro.rst"]
long_description = []
import codecs
for filename in DESCRIPTION_FILES:
with codecs.open(filename, 'r', 'utf-8') as f:
long_description.append(f.read())
long_description = "\n".join(long_description)
setuptools.setup(
......@@ -29,7 +29,7 @@ setuptools.setup(
author = "James Tocknell",
author_email = "james.tocknell@mq.edu.au",
description = "Downloader for public and proprietary ESO archive data",
#long_description = long_description,
long_description = long_description,
license = "3-clause BSD",
keywords = "ESO archive download astronomy astropy",
url = "https://eso_downloader.readthedocs.io",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment