-
Notifications
You must be signed in to change notification settings - Fork 2
Set up project
Content:
Target .NET Standard is 2.0 for libraries, .NET Core is 2.2 for web services and .NET Framework is 4.7.2 for desktop app. Version of C# is 7.1.
You can install all dependencies using NuGet package manager.
Download and install .NET Framework 4.7.2.
Download and install .NET Core 2.2. Feel free to install any minor version of .NET Core but we recommend to use .NET Core SDK latest version that is compatible with Visual Studio 2017.
Note: also this .NET Core SDK allows you to create .NET Standard libraries.
Note 2: if you change ports and addresses of .NET Core projects, do not forget to also change same options in App.config files (ConfigurationWebService, Core, ConsoleApp, DesktopApp).
ThingAppraiser uses MS SQL database to store some intermediate data during appraising. That means you should install Microsoft SQL Server. You can install any edition that you want but we use MS SQL Server 2017 Express. All instructions can be found here.
After installation you should create database with name "thing_appraiser" and run SQL script from folder:
Then specify your connection string (i.e. node which key is "ConnectionString" and value is content of connection string, example you can see here) in files:
- ThingAppraiser/WebServices/ConfigurationWebService/App.config
- ThingAppraiser/Libraries/Core/App.config
- ThingAppraiser/Applications/ConsoleApp/App.config
- ThingAppraiser/Applications/DesktopApp/App.config
Note: we recommend to install SQL Server Management Studio because it actually makes it much easier to work with MS SQL Server.
One of option to load user data is Google Drive. We use OAuth 2.0 Protocol to interact with it. You should read instructions how to acquire client IDs and secrets here. Choose "Installed application client IDs" and follow the steps. When you get credentials download it as json-file and rename to "credentials.json". Put this file to:
Finally, when users (or you during debugging) connect to Google Drive at first time they should enter their account login and password and allow ThingAppraiser app use files from Google Drive if they want to load data from Google Drive directly.
Depends on what services you want to use, almost always you need to get API keys/tokens for them. All keys and tokens set as environment variable value with key "ThingAppraiser" (we are going to add other ways to configure service later). Further you can find some instructions how to get credentials for some of the services with which the ThingAppraiser can interact.
You should set environment variable for project on your machine. Variable name (key) is "ThingAppraiser", variable value is depend on services and should separate from each other by ";" symbol. Example of some services keys/tokens format (for Windows): "BotToken=YOUR_BOT_TOKEN;TmdbApiKey=YOUR_TMDB_API_KEY;OmdbApiKey=YOUR_OMDB_API_KEY;SteamApiKey=YOUR_STEAM_API_KEY".
Note: you also can set almost variables in Options class but some values can be placed in other "Options" classes (e.g. you can set bot token in BotConfiguration class and so on).
If you want to use Telegram bot as one of the ThingAppraiser means of communication with the user, you should create bot and set token in environment variable values (remember that variable name (key) is "ThingAppraiser"). Official guide how to create bot and get token. Example: "BotToken=YOUR_BOT_TOKEN".
Next step is set Webhook because it is the way in which Telegram sends notifications and other messages to ThingAppraiser services. Full instruction you can read here.
Note: in addition, Telegram is banned in some countries. So you should configure your VPN or Proxy to get around the lockdown (now we does not support such option).
For movie and series processing ThingAppraiser can use TMDB service. Official introduction guide you can read here. Also you should set your API key in environment variable values (remember that variable name (key) is "ThingAppraiser"). Example: "TmdbApiKey=YOUR_TMDB_API_KEY".
Note: please, do not forget that such services as TMDB (or OMDB) have own limits on API calls per day or month. More information you can read in official resources of services that you use in ThingAppraiser.
Other way to work with movie and series for ThingAppraiser is OMDB. Official guide you can read here. Set your API key in environment variable values (remember that variable name (key) is "ThingAppraiser"). Example: "OmdbApiKey=YOUR_OMDB_API_KEY".
It is important to mention that ThingAppraiser do not use Steam API key for API calls because Steam allows some calls without specifying key. But if you want to use all opportunities of Steam API, which is not officially documented by the way, you should get API key. Instructions you can find here. Set your API key in environment variable values (remember that variable name (key) is "ThingAppraiser"). Example: "SteamApiKey=YOUR_STEAM_API_KEY".
You can note that one of our appraisers call MATLAB runtime to compute rating of Things. This appraiser use Fuzzy Logic Toolbox based on trained model for movies. Looking at results feature works pretty good.
Unfortunately, MATLAB runtime consumes a lot of memory and first calls are really slow (at this point of time, may be we will try to optimize it). That is why we do not recommend use this appraiser in service. But if no matter what you decide to use FuzzyAppraiser, further you can find steps to configure MATLAB environment for this feature.
-
Install and Configure the MATLAB Runtime. Complete this step only if you have not installed the MATLAB Runtime while installing the .NET Assembly.
-
Configure the .NET Environment. You can find all necessary libs in ThingAppraiser/ThingAppraiser/Libraries/FuzzyLogicSystem/MATLAB libs/. Add reference to all three libs in this folder to Appraisers project.
Note: you can compile project with MATLAB only in "x64" solution platform. Check that you set up right platform in your project properties.
ThingAppraiser has three ways of communication with user:
Desktop app and Telegram bot service cannot appraise data and used for data visualization. They send requests to ThingAppraiser Web services and process responses. On the other hand, Console app uses ThingAppraiser Libraries directly (at this moment). That is why you should launch desktop app and Telegram bot service with Web services but Console can be started without other services.