Skip to content

Latest commit

 

History

History
122 lines (73 loc) · 2.21 KB

README.rst

File metadata and controls

122 lines (73 loc) · 2.21 KB

cadctools

Client tools and utilities for using Canadian Astronomy Data Centre services

Developers Guide

Requires pip.

Installing Packages

cd cadcutils && pip install -r ./dev_requirements.txt
cd cadcdata && pip install -r ./dev_requirements.txt
cd cadcetrans && pip install -r ./dev_requirements.txt
cd cadccutout && pip install -r ./dev_requirements.txt

Testing packages

Testing cadcutils

cd ./cadcutils
python setup.py test

Testing cadcdata

cd ./cadcdata
python setup.py test

Checkstyle

flake8 style checking is enforced on pull requests. Following commands should not report errors

flake8 cadcutils/cadcutils cadcdata/cadcdata cadcetrans/cadcetrans
cadccutout/cadccutout

Usage Example

In library mode

Write the following into a file named test.py

from cadcdata import CadcDataClient
from cadcutils import net

client = CadcDataClient(net.Subject())
print(client.get_file_info('GEMINI', '00AUG02_002'))

Then Run

python test.py

Direct Usage

After installing the cadcdata package, run

cadc-data get GEMINI 00AUG02_002

This will download the fits file to your current directory.

To see more information do

cadc-data put --help
cadc-data get --help
cadc-data info --help

Docker image

Rather than deploying a project environment, you could just use docker.

To use

  1. Install docker.

  2. Then run:

    docker build . -t cadc/cadctools
    docker run --name cadctools cadc/cadctools