Commit c851128d authored by Ole Streicher's avatar Ole Streicher

New upstream RC 0.4rc1

parent 05c8aa9c
This diff is collapsed.
Metadata-Version: 1.1
Name: astropy
Version: 0.3.2
Version: 0.4rc1
Summary: Community-developed python astronomy tools
Home-page: http://astropy.org
Author: The Astropy Developers
Author-email: astropy.team@gmail.com
License: BSD
Download-URL: http://pypi.python.org/packages/source/a/astropy/astropy-0.3.2.tar.gz
Download-URL: http://pypi.python.org/packages/source/a/astropy/astropy-0.4rc1.tar.gz
Description:
Astropy is a package intended to contain core functionality and some
common tools needed for performing astronomy and astrophysics research with
......
This diff is collapsed.
......@@ -31,7 +31,7 @@ except ImportError:
__githash__ = ''
__minimum_numpy_version__ = '1.5.0'
__minimum_numpy_version__ = '1.5.1'
# The location of the online documentation for astropy
......@@ -74,13 +74,40 @@ if not _ASTROPY_SETUP_:
_check_numpy()
from .config import ConfigurationItem
from . import config as _config
import sys
UNICODE_OUTPUT = ConfigurationItem(
'unicode_output', False,
'Use Unicode characters when outputting values, and writing widgets '
'to the console.')
class Conf(_config.ConfigNamespace):
"""
Configuration parameters for `astropy`.
"""
unicode_output = _config.ConfigItem(
False,
'When True, use Unicode characters when outputting values, and '
'displaying widgets at the console.')
use_color = _config.ConfigItem(
sys.platform != 'win32',
'When True, use ANSI color escape sequences when writing to the console.',
aliases=['astropy.utils.console.USE_COLOR', 'astropy.logger.USE_COLOR'])
max_lines = _config.ConfigItem(
25, 'Maximum number of lines in the display if the terminal size can '
'not be automatically determined. Negative numbers mean no limit.',
aliases=['astropy.table.pprint.max_lines'])
max_width = _config.ConfigItem(
80, 'Maximum number of characters in the display if the terminal size '
'can not be automatically determined. Negative numbers mean no limit.',
aliases=['astropy.table.pprint.max_width'])
conf = Conf()
UNICODE_OUTPUT = _config.ConfigAlias(
'0.4', 'UNICODE_OUTPUT', 'unicode_output')
del sys
# set up the test command
......@@ -91,8 +118,8 @@ def _get_test_runner():
def test(package=None, test_path=None, args=None, plugins=None,
verbose=False, pastebin=None, remote_data=False, pep8=False,
pdb=False, coverage=False, open_files=False, parallel=0,
docs_path=None, skip_docs=False):
pdb=False, open_files=False, parallel=0, docs_path=None,
skip_docs=False):
"""
Run Astropy tests using py.test. A proper set of arguments is
constructed and passed to `pytest.main`.
......@@ -138,10 +165,6 @@ def test(package=None, test_path=None, args=None, plugins=None,
Turn on PDB post-mortem analysis for failing tests. Same as
specifying `--pdb` in `args`.
coverage : bool, optional
Generate a test coverage report. The result will be placed in
the directory htmlcov.
open_files : bool, optional
Fail when any tests leave files open. Off by default, because
this adds extra run time to the test suite. Works only on
......@@ -169,8 +192,8 @@ def test(package=None, test_path=None, args=None, plugins=None,
package=package, test_path=test_path, args=args,
plugins=plugins, verbose=verbose, pastebin=pastebin,
remote_data=remote_data, pep8=pep8, pdb=pdb,
coverage=coverage, open_files=open_files, parallel=parallel,
docs_path=docs_path, skip_docs=skip_docs)
open_files=open_files, parallel=parallel, docs_path=docs_path,
skip_docs=skip_docs)
# if we are *not* in setup mode, import the logger and possibly populate the
......@@ -221,7 +244,6 @@ def _initialize_astropy():
raise
# add these here so we only need to cleanup the namespace at the end
config_dir = None
config_dir = os.path.dirname(__file__)
try:
......
# -*- coding: utf-8 -*-
### CONSOLE SETTINGS
## Use Unicode characters when outputting values, and writing widgets to the
## console.
# unicode_output = False
## When True, use ANSI color escape sequences when writing to the console.
# use_color = True
## Maximum number of lines for the pretty-printer to use if it cannot determine
## the terminal size. Negative numbers mean no limit.
# max_lines = 25
## Maximum number of characters for the pretty-printer to use per line if it
## cannot determine the terminal size. Negative numbers mean no limit.
# max_width = 80
### CORE DATA STRUCTURES AND TRANSFORMATIONS
[nddata]
## Whether to issue a warning if NDData arithmetic is performed with
## uncertainties and the uncertainties do not support the propagation of
## correlated uncertainties.
# warn_unsupported_correlated = True
## Whether to issue a warning when the `~astropy.nddata.NDData` unit
## attribute is changed from a non-``None`` value to another value
## that data values/uncertainties are not scaled with the unit change.
# warn_setting_unit_directly = True
[table]
## The template that determines the name of a column if it cannot be
## determined. Uses new-style (format method) string formatting
# auto_colname = col{0}
### ASTRONOMY COMPUTATIONS AND UTILITIES
[vo]
## URL where VO Service database file is stored.
# vos_baseurl = http://stsdas.stsci.edu/astrolib/vo_databases/
## Conesearch database name.
# conesearch_dbname = conesearch_good
[vo.samp]
## Whether to allow astropy.vo.samp to use the internet, if available
# use_internet = True
[vo.validator]
## Cone Search services master list for validation.
# conesearch_master_list = http://vao.stsci.edu/directory/NVORegInt.asmx/VOTCapabilityPredOpt?predicate=1%3D1&capability=conesearch&VOTStyleOption=2
## Only check these Cone Search URLs.
# conesearch_urls =
## VO Table warning codes that are considered non-critical
# noncritical_warnings = W03, W06, W07, W09, W10, W15, W17, W20, W21, W22, W27, W28, W29, W41, W42, W48, W50
### NUTS AND BOLTS OF ASTROPY
[logger]
## Threshold for the logging messages. Logging messages that are less severe
## than this level will be ignored. The levels are 'DEBUG', 'INFO', 'WARNING',
## 'ERROR'
# log_level = INFO
## Whether to log warnings.warn calls
# log_warnings = True
## Whether to log exceptions before raising them
# log_exceptions = False
## Whether to always log messages to a log file
# log_to_file = False
## The file to log messages to. When '', it defaults to a file 'astropy.log' in
## the astropy config directory.
# log_file_path = ""
## Threshold for logging messages to log_file_path
# log_file_level = INFO
## Format for log file entries
# log_file_format = "%(asctime)r, %(origin)r, %(levelname)r, %(message)r"
[utils.data]
## URL for astropy remote data site.
# dataurl = http://data.astropy.org/
## Time to wait for remote data query (in seconds).
# remote_timeout = 3.0
## Block size for computing MD5 file hashes.
# hash_block_size = 65536
## Number of bytes of remote data to download per step.
# download_block_size = 65536
## Number of times to try to get the lock while accessing the data cache before
## giving up.
# download_cache_lock_attempts = 5
## If True, temporary download files created when the cache is inacessible will
## be deleted at the end of the python session.
# delete_temporary_downloads_at_exit = True
......@@ -2,7 +2,7 @@
"""
This module contains configuration and setup utilities for the
`astropy` project. This includes all functionality related to the
Astropy project. This includes all functionality related to the
affiliated package index.
"""
from __future__ import (absolute_import, division, print_function,
......
This diff is collapsed.
......@@ -5,6 +5,8 @@ data/cache files used by Astropy should be placed.
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from ..extern import six
import os
import sys
......@@ -27,9 +29,9 @@ def _find_home():
# this is used below to make fix up encoding issues that sometimes crop up
# in py2.x but not in py3.x
if sys.version_info[0] < 3: # pragma: py3
if six.PY2:
decodepath = lambda pth: pth.decode(sys.getfilesystemencoding())
else: # pragma: py2
elif six.PY3:
decodepath = lambda pth: pth
# First find the home directory - this is inspired by the scheme ipython
......
# Licensed under a 3-clause BSD style license - see LICENSE.rst
def get_package_data():
return {
str('astropy.config.tests'): ['data/*.cfg']
}
def requires_2to3():
return False
[coordinates.name_resolve]
name_resolve_timeout = 42.0
\ No newline at end of file
# Use Unicode characters when outputting values, and writing widgets to the
# console.
unicode_output = False
[utils.console]
# When True, use ANSI color escape sequences when writing to the console.
use_color = True
[logger]
# Threshold for the logging messages. Logging messages that are less severe
# than this level will be ignored. The levels are 'DEBUG', 'INFO', 'WARNING',
# 'ERROR'
log_level = INFO
# Whether to use color for the level names
use_color = True
# Whether to log warnings.warn calls
log_warnings = True
# Whether to log exceptions before raising them
log_exceptions = False
# Whether to always log messages to a log file
log_to_file = False
# The file to log messages to. When '', it defaults to a file 'astropy.log' in
# the astropy config directory.
log_file_path = ""
# Threshold for logging messages to log_file_path
log_file_level = INFO
# Format for log file entries
log_file_format = "%(asctime)r, %(origin)r, %(levelname)r, %(message)r"
[coordinates.name_resolve]
# The URL to Sesame's web-queryable database.
sesame_url = http://cdsweb.u-strasbg.fr/cgi-bin/nph-sesame/, http://vizier.cfa.harvard.edu/viz-bin/nph-sesame/
# This specifies the default database that SESAME will query when using the
# name resolve mechanism in the coordinates subpackage. Default is to search
# all databases, but this can be 'all', 'simbad', 'ned', or 'vizier'.
# Options: all, simbad, ned, vizier
sesame_database = all
# This is the maximum time to wait for a response from a name resolve query to
# SESAME in seconds.
name_resolve_timeout = 5
[table.pprint]
# Maximum number of lines for the pretty-printer to use if it cannot determine
# the terminal size. Negative numbers mean no limit.
max_lines = 25
# Maximum number of characters for the pretty-printer to use per line if it
# cannot determine the terminal size. Negative numbers mean no limit.
max_width = 80
[table.table]
# The template that determines the name of a column if it cannot be
# determined. Uses new-style (format method) string formatting
auto_colname = col{0}
[utils.data]
# URL for astropy remote data site.
dataurl = http://data.astropy.org/
# Time to wait for remote data query (in seconds).
remote_timeout = 3.0
# Block size for computing MD5 file hashes.
hash_block_size = 65536
# Number of bytes of remote data to download per step.
download_block_size = 65536
# Number of times to try to get the lock while accessing the data cache before
# giving up.
download_cache_lock_attempts = 5
# If True, temporary download files created when the cache is inacessible will
# be deleted at the end of the python session.
delete_temporary_downloads_at_exit = True
[io.fits]
# If True, enable support for record-valued keywords as described by FITS WCS
# Paper IV. Otherwise they are treated as normal keywords.
enabled_record_valued_keyword_cards = True
# If True, extension names (i.e. the EXTNAME keyword) should be treated as
# case-sensitive.
extension_name_case_sensitive = False
# If True, automatically remove trailing whitespace for string values in
# headers. Otherwise the values are returned verbatim, with all whitespace
# intact.
strip_header_whitespace = True
# If True, use memory-mapped file access to read/write the data in FITS files.
# This generally provides better performance, especially for large files, but
# may affect performance in I/O-heavy applications.
use_memmap = True
[io.votable.table]
# When True, treat fixable violations of the VOTable spec as exceptions.
pedantic = False
[cosmology.core]
# The default cosmology to use. Note this is only read on import, so changing
# this value at runtime has no effect.
default_cosmology = no_default
[nddata.nddata]
# Whether to issue a warning if NDData arithmetic is performed with
# uncertainties and the uncertainties do not support the propagation of
# correlated uncertainties.
warn_unsupported_correlated = True