Skip to content

Commit

Permalink
Deprecate the helper functions (#51)
Browse files Browse the repository at this point in the history
* Deprecate the helper functions

Since we are moving toward the symbol indexing.
Ref JuliaStats/TimeSeries.jl#377

* Update NEWS.md

* travis: add 1.0 to build matrix

- update doc deploy script
  • Loading branch information
iblislin authored Oct 11, 2018
1 parent 5be5cab commit 876f8df
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ os:

julia:
- 0.7
- 1.0

notifications:
email: false

sudo: false

script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone(pwd()); Pkg.build("MarketData"); Pkg.test("MarketData")'

after_success:
- julia -e 'Pkg.add("Documenter")'
- julia -e 'cd(Pkg.dir("MarketData")); include(joinpath("docs", "make.jl"))'
19 changes: 19 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
#### 0.9.0

* Deprecate the following helper functions,
since we are moving toward the Symbol indexing in TimeSeries.jl.
* `o`
* `h`
* `l`
* `c`

Using `ta[:Close]` or `ta.Close` is recommended.

#### 0.8.0

* Reexport TimeSeries.jl stuffs

#### 0.7.0

* Drop 0.5 support

#### 0.6.0

* added fred() and yahoo() methods
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ makedocs(

deploydocs(
repo = "github.com/JuliaQuant/MarketData.jl.git",
julia = "0.6",
julia = "1.0",
latest = "master",
target = "build",
deps = nothing, # we use the `format = :html`, without `mkdocs`
Expand Down
2 changes: 1 addition & 1 deletion src/const.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
const datetime1 = readtimearray(joinpath(DATADIR, "datetime1.csv"))
const datetime2 = readtimearray(joinpath(DATADIR, "datetime2.csv"),
format="yyyy-mm-dd HH:MM:SS")
const mdata = TimeArray(cl.timestamp, cl.values, cl.colnames, "Apple") # data with meta field occupied
const mdata = TimeArray(timestamp(cl), values(cl), colnames(cl), "Apple") # data with meta field occupied
6 changes: 1 addition & 5 deletions src/helpers.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
for (fn, name) in [(:o, "Open"), (:h, "High"), (:l, "Low"), (:c, "Close"), (:v, "Volume")]
@eval begin
function $fn(ta::TimeArray)
ta[$name]
end
end
@eval @deprecate $fn(ta::TimeArray) getindex(ta, $name)
end

0 comments on commit 876f8df

Please sign in to comment.