Skip to content

Commit

Permalink
Merge ead2b73 into 179c759
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-neal committed Aug 13, 2018
2 parents 179c759 + ead2b73 commit d009210
Show file tree
Hide file tree
Showing 34 changed files with 936 additions and 4,816,286 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data/resampled/*
data/results/*
data/PHOENIX-ACES_spectra/Z*
data/atmmodel/Average_TAPAS_2014_visible.txt
data/atmmodel/Average_TAPAS_2014.txt
data/atmmodel/Average_TAPAS_2014*.txt
data/test_data/*

# updated_files data
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ repos:
language_version: python3.6

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.3.0 # Use the ref you want to point at
rev: v1.4.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: check-executables-have-shebangs
# - id: check-executables-have-shebangs # Doesn't work on windows
- id: check-merge-conflict
- id: check-json
- id: check-added-large-files
Expand Down
2 changes: 2 additions & 0 deletions .shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ install:
- mv tests/config.yaml config.yaml
# Generate data
- make_test_data.py
# Prepare atmosphere models
- make atmos

build:
# pre_ci:
Expand Down
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ cache:
install:
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment

# Install heavy science packages
- travis_retry conda install --yes astropy cython emcee h5py matplotlib scikit-learn scipy

# Install eniric requirements
- travis_retry pip install -r requirements.txt
- travis_retry pip install -r requirements_dev.txt

# Install Starfish
- cd $HOME
- travis_retry git clone https://github.com/iancze/Starfish.git
Expand All @@ -46,6 +46,12 @@ before_script:

# Generate data
- make_test_data.py

# Prepare atmosphere models
- make atmos V=1
# - python eniric_scripts/split_atmmodel.py -b K H J Y Z TEST
# - python eniric_scripts/bary_shift_atmmodel.py -b K H J Y Z TEST

script:
- pytest --cov=eniric --cov-report term-missing --durations 5
- coverage xml -i
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ help:
@echo " Remove test data."
@echo " data"
@echo " Create test data."
@echo " atmos"
@echo " Prepare atmosphere model data."
@echo " isort"
@echo " Sort import statements."
@echo " lint"
@echo " Check style with flake8."
@echo " test"
@echo " Run py.test"
@echo " init"
@echo " Initalize by installing requirements"
@echo " Initialise by installing requirements"
@echo " init-dev"
@echo " Initalize by installing normal and dev requirements"
@echo " Initialise by installing normal and dev requirements"
@echo " cov"
@echo " Produce coverage report"
@echo " mypy"
Expand All @@ -40,6 +42,10 @@ clean-data:
data:
python eniric_scripts/make_test_data.py

atmos:
split_atmmodel.py -b ALL
bary_shift_atmmodel.py -b ALL

clean-build:
rm --force --recursive build/
rm --force --recursive dist/
Expand Down
5 changes: 5 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ install:
# Setup config and make data
# This is not the best place to put this but before_test didn't work.
- cmd: "move tests\\config.yaml config.yaml"

# Generate data
- cmd: "%PYTHON%\\python.exe eniric_scripts\\make_test_data.py"

# Prepare atmosphere models
- cmd: "%PYTHON%\\python.exe eniric_scripts\\split_atmmodel.py -b ALL"
- cmd: "%PYTHON%\\python.exe eniric_scripts\\bary_shift_atmmodel.py -b ALL"

build: off

test_script:
Expand Down
11 changes: 8 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@ paths:
cache:
cachedir: [".joblib"]

atmmodel:
# Base name of telluric model
base: "Average_TAPAS_2014"

bands:
all: [None, "VIS", "K", "H", "J", "Y", "Z", "CONT", "NIR", "GAP", "CARMENES_NIR", "CARMENES_VIS"]
all: ["VIS", "K", "H", "J", "Y", "Z", "CONT", "NIR", "GAP", "CARMENES_NIR", "CARMENES_VIS", "TEST"]

# Add your custom band limits here
custom_bands:
CARMENES_NIR: (0.96, 1.71),
CARMENES_VIS: (0.52, 0.96),
CARMENES_NIR: [0.96, 1.71]
CARMENES_VIS: [0.52, 0.96]
TEST: [2.1,2.2]
# g: ()
# r: ()
# z: ()
Expand Down
Binary file not shown.

0 comments on commit d009210

Please sign in to comment.