Commit Graph

69 Commits

Author SHA1 Message Date
Gerardo Salazar 2033c7873b Update outdated DotNetZip dependency in nuspec files 2019-07-02 18:02:23 -07:00
Martin Molinero f6b5e92a96 Add conditional optimization flag 2019-06-19 16:11:15 -03:00
Gerardo Salazar 340cc3a330 Upgrade dependency DotNetZip to version 1.13.3 to fix security issue 2019-06-11 11:03:37 -07:00
Stefano Raggi 28ee5026af Fix incorrect return value in Compression.GetBytes 2019-02-14 12:13:20 +01:00
Michael Handschuh 58c384509b Keep directory structure in Compression.UnzipToFolder
The implementation here was stripping out the directories and unzipping to
a flat structure. This is not required and was breaking python algorithms by
messing up their folder based imports. Also, all consumers currently utilize
the return value which is a full list of the unzipped files including the sub
directories, so no changes were needed elsewhere.
2018-06-19 12:42:43 -04:00
Juan José D'Ambrosio bda5b11cc2 Nuspec files added for all projects.
Launcher project is packed as `QuantConnect.Lean`but as a mean ot having all Lean features just calling one package. 

In the same sense, `QuantConnect.Algorithm.CSharp` is included as package and added as dependecy in the `QuantConnect.Lean` package just to have a working example aailable out-of-the-box.
2018-04-13 07:28:34 -03:00
Jared Broad 0eae2e3da9 Path encoding 2017-10-24 03:50:47 -04:00
andrewhart098 ba565e2b11 Merge pull request #1047 from QuantConnect/option-chain-provider
Option Chain Providers
2017-08-08 11:15:53 -04:00
Andrew e116709b24 Specify <LangVersion> of 6 in all csproj files 2017-08-07 15:27:26 -04:00
Stefano Raggi e6ba94b102 Add GetZipEntryFileNames method to QuantConnect.Compression 2017-08-02 22:43:10 +02:00
Stefano Raggi 6d160533c3 Upgrade DotNetZip to version 1.10.1 2017-07-07 23:37:09 +02:00
Stefano Raggi e463ccf088 Upgrade all projects to target .NET Framework 4.5.2
In the advanced build settings, Language version was also upgraded from C# 5.0 to C# 6.0. The minimum Visual Studio version required will now be VS2015.
2017-07-07 22:49:17 +02:00
Andrew 63ac67f3b7 Added method for testing whether a zip archive is corrupted 2017-03-24 16:59:24 -04:00
Andrew 672e134939 Removed ApiDataProvider
Refactored IHistoryProvider interface order of parameters
2017-02-16 15:47:06 -05:00
Andrew b6171cc9d5 Renamed IDataFileProvider to IDataProvider using resharper
Refactored IDataProvider interface to return stream. The IDataProvider
Fetch method now only takes a key.  The IDataProvider
has been reshuffled to be at the bottom of the LeanDataStack.  It provides
data to the rest of the Lean stack. The default implementation of IDataProvider reads
data from disc.

All IDataCacheProviders now have constructors which take IDataProviders
and use them to find data on disc.

Renamed DataCacheProvider to ZipDataCacheProvider

Added comments to IDataProvider and it's implementations

Added comments to IDataCacheProvider and it's implementations
2017-02-15 12:16:50 -05:00
Andrew ed2107132e IHistoryProvider.Initialize() requires a DataCacheProvider
Fixed bug where DataCacheProvider was returning a stream without closing
the stream.  Also, ZipFiles returned from ZipFileCacheProvider are
effectively disposed.

Removed date field from IDataCacheProvider interface
2017-02-15 12:16:49 -05:00
Andrew 952e1d19e3 Added interface IDataCacheProvider that defines a mechanism for caching data
This interface was built around the existing implementation of the
DataCacheProvider.  It's purpose is to define a method for caching data
files.  Currently, most data files are either read from disc or retrieved
remotely. The IDataChceProvider returns returns a Stream and can handle
many types of data. The IDataFileCacheProvider is needed because keeping data in memory will improve performance and overcome certain File read/write limitations (such as sharing violations) currently experienced by Lean.

There are two implementations of this interface.  The first is the
SingleZipEntryDataCache.  This is the default implementation. It does not
cache and returns the first entry found within a ZipFile.  The second is
the ZipEntryCacheProvider.  This is a rework of the existing
DataCachePrivider.  It caches ZipFiles for up to 10 seconds.  It can
return specific entries for option and future ZipFiles.  Otherwise, it
returns the first entry in a ZipFile.

Added IDataFileCacheProvider as parameter to IHistoryProvider.Initialize()

The IDataFileCacheProvider is very useful for the IHistoryProvider in that it can eliminate the need for history request to touch disc.  This can greatly improve peerformance and eliminate disc bugs associated with disc read/writes. To minimize changes throughtout Lean, the default value for the IDataFileCacheProvider is null in the IHistoryProvider.Initialize method.

IDataCacheProviders are passed down the Lean stack. Each instance of a Subscription Enumerator factory decides what cache it
will use.  In other words, the IDataCacheProvider is not configurable from
config.json.  The IDataCacheProvider is passwed down the stack form the
Enumerator factory to the IStreamReader where it is used to retrieve data.

Added useful helper method to Unizp files into a Stream.
2017-02-15 12:16:49 -05:00
quant1729 4382821ae7 Removed reference to System.IO.Compression zip library in Compression.Unzip() and DataFileCacheProvider.cs, as in mono this namespace is implemented using SharpCompress. Reverted back to Ionic zip library. 2017-01-22 00:20:57 +08:00
quant1729 6ba1ae899a Removed UnzipCached() method and its usages. Updated Zip() method. 2017-01-11 12:57:03 +08:00
quant1729 48721125dc Revert "Fixed bug with static zip archive caching. Added new caching data file provider. Refactored IDataFileProvider interface."
This reverts commit c59743dc42.
2017-01-11 11:27:28 +08:00
quant1729 c59743dc42 Fixed bug with static zip archive caching. Added new caching data file provider. Refactored IDataFileProvider interface. 2017-01-08 09:25:26 +08:00
quant1729 f2f93ef85c Better cache for ZipArchive 2016-12-27 15:18:39 +01:00
quant1729 705024cd89 Merge branch 'futures'
Conflicts:
	Common/QuantConnect.csproj
2016-12-20 15:53:24 +01:00
quant1729 2570f4c99f Optimizing options backtesting (zipper). First cut. 2016-12-19 16:41:42 +01:00
Michael Handschuh 0bf79b901c Refactor overload of Compression.Zip
This new overload allows the caller to specify every piece of data used by the
zip routine, allowing specification of the entry name, destination path, and
whether or not to delete the original file.
2016-12-08 21:16:41 -05:00
quant1729 1141cd21e6 Merge branch 'futures' into master
Conflicts:
	Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj
	Algorithm/QCAlgorithm.cs
	Brokerages/InteractiveBrokers/InteractiveBrokersBrokerage.cs
	Common/QuantConnect.csproj
	Common/Securities/Option/Option.cs
	Data/equity/usa/factor_files/aapl.csv
	Data/symbol-properties/symbol-properties-database.csv
	Engine/DataFeeds/Enumerators/Factories/BaseDataSubscriptionEnumeratorFactory.cs
	Engine/DataFeeds/Enumerators/Factories/OptionChainUniverseSubscriptionEnumeratorFactory.cs
	Engine/DataFeeds/SubscriptionDataReader.cs
	ToolBox/QuantConnect.ToolBox.csproj
2016-11-07 16:18:11 +01:00
Michael Handschuh 8062cdf108 Use .NET zip implementation
The replaced zip implementation had issues in high performance,
multi-threaded scenarios. The exact cause of the issue was not
determined, but invalid zip were being generated when using this
method directly.

The replacement uses the built in .NET zip archive implementation
which should (in theory) have better cross-platform characteristics
than 3rd party implementations.

The unit test was also update as it made incorrect usage of the
Compression.Unzip routine. It has been replaced with a more reliable
method that unzips the first entry and returns a stream reader.
2016-10-30 20:32:01 -04:00
quant1729 5803115548 Option splits and renames in backtesting. Added regression tests. 2016-10-26 21:20:03 +02:00
jaredbroad 9453118e2e Tidy create zip from file collection 2016-09-07 19:26:18 -04:00
Stefano Raggi 1e7536a333 Merge pull request #524 from QuantConnect/fundamental
Fundamental data support and coarse/fine universe selection
2016-08-16 00:05:36 +02:00
jaredbroad 99b634e9f2 Added CNY currency, added .gz unzipper 2016-08-02 21:16:20 -04:00
Stefano Raggi ce6001bb75 Added filename in Compression.Unzip log error message 2016-06-28 23:15:39 +02:00
Michael Handschuh 35158c4677 Log error instead of throwing if zip entry not found
This follows the behavior of logging when the file doesn't exist as well.
This is very common in options trade data, since it's often there are no trades for a contract
2016-04-07 14:18:17 -04:00
Michael Handschuh a6d263bed9 Adds Compression.Unzip overload supporting zip entry name 2016-03-17 09:47:45 -04:00
Michael Handschuh 5639909de5 Adds Compression.ZipBytes - in memory zip 2016-02-11 23:46:27 -05:00
Michael Handschuh 278785260d Update ZipStreamWriter to override Flush 2016-02-10 14:40:13 -05:00
Michael Handschuh cf1258708a Move zip file name gen to LeanData 2016-02-09 18:20:54 -05:00
Michael Handschuh 40d47d5523 Set c# language version to 5.0 2016-01-29 17:41:20 -05:00
Stefano Raggi 84eef2ee43 Fixes zip file naming for CFD support 2016-01-13 15:51:02 -05:00
snugs c31cdde376 Adds overwrite to Compression.Unzip 2016-01-05 16:04:20 -05:00
snugs 6b4465f18d Adds Compression.Unzip to folder 2015-12-30 17:58:27 -05:00
snugs 4edb40fc13 Adds include root flag Compression.ZipDirectory 2015-12-29 23:53:20 -05:00
snugs 7caae8c8ee Use .Net zip for Compression.ZipDirectory 2015-12-29 19:58:48 -05:00
snugs 49e09bbc36 Adds Compression.ZipDirectory 2015-12-29 14:35:03 -05:00
snugs be950e756a Log full errors/stack traces
Many places in the code used Log.Error(err.Message) or equivalent which
strips out all the really useful information, such as the stack trace
and inner exceptions. Using Log.Error(exception) is the correct way to
log an error as it will correctly write all the message details, also,
by passing the full Exception object we can improve the logging in this
one place and all call sites will automatically benefit from the improvements
2015-12-02 12:35:33 -05:00
snugs 7c2261f172 Removed warnings as errors for obsoletes
This is causing issues for mono users, seems to be something different
in the compilers (mono vs msft) with method resolution in ambiguos situations.
2015-11-24 18:56:21 -05:00
snugs 0ae568d980 Remove warnings as errors from Release
This is a temporary fix until we figure out why travis complains about implicits but visual studio doesn't
2015-11-23 15:45:24 -05:00
snugs 7689ae505d Update warnings as error 612 (obsolete w/ no msg) 2015-11-19 20:36:59 -05:00
snugs b6603ffd01 Set Obsolete warnings as errors 2015-11-18 13:42:40 -05:00
snugs 64bdfaf42c Adds overload for Compression.Zip accepting entry name 2015-11-17 16:51:44 -05:00