Client tools and utilities for using Canadian Astronomy Data Centre services
Requires pip.
Note: might need to escape chars in your shell
cd cadcutils && pip install -e .[test] cd cadcdata && pip install -e .[test] cd cadctap && pip install -e .[test]
cd ./cadcutils pytest cadcutils
cd ./cadcdata pytest cadcdata
cd ./cadcdata pytest cadctap
flake8 style checking is enforced on pull requests. Following commands should not report errors
flake8 cadcutils/cadcutils cadcdata/cadcdata
If tox, the generic virtual environment tool, is available it can be used to test with different versions of python is isolation. For example, to test on all supported versions of Python in cadcdata (assuming that they are available in the system):
cd ./cadcdata && tox
To test a specific version:
cd ./cadcdata && tox -e py3.9
To list all the available environments:
cd ./cadcdata && tox -a
Write the following into a file named test.py
from cadcdata import StorageInventoryClient print(StorageInventoryClient().cadcinfo('cadc:IRIS/I429B4H0.fits'))
Then Run
python test.py
After installing the cadcdata package, run
cadcget cadc:IRIS/I429B4H0.fits
This will download the fits file to your current directory.
To see more information do
cadcput --help cadcget --help cadcinfo --help cadcremove --help
Rather than deploying a project environment, you could just use docker.
To use
Install docker.
Then run:
docker build . -t cadc/cadctools docker run --name cadctools cadc/cadctools