Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate the helper functions #51

Merged
merged 3 commits into from
Oct 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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