Create project that is not in the default path in DataSpell - jetbrains-ide

I tried the new DataSpell today, but fail to create a project. Every time I try to attach a directory, it has been marked as a library. And it seems like the Project is always in
C:\Users\XXX\AppData\Roaming\JetBrains\DataSpell2021.3\projects\workspace
What's more, the intended project root folder (i.e., Test_2) is marked as a Module,
What's more, I can not mark the directory as well as all the subdrectories within it:
Does anyone know how to create a PyCharm like project in DataSpell?

Related

Merge schemas of custom dialog - Error conflicting definitions

I am following the steps of this page:
https://learn.microsoft.com/en-us/composer/how-to-create-custom-actions
and have reached to the part where it is required to merge the two schemas: bots and your custom one. However when running the powershell script found inside the created project template (CoreAssistant template) I have the following error:
Error conflicting definitions of HelpDialog.dialog :
C:\Users\user\source\repos\AvanadeCoreAssistant\AvanadeCoreAssistant\dialogs\imported\Microsoft.Bot.Components.HelpAndCancel\HelpDialog\HelpDialog.dialog
Microsoft.Bot.Components.HelpAndCancel:
C:\Users\user.nuget\packages\microsoft.bot.components.helpandcancel\1.1.2\exported\HelpDialog\HelpDialog.dialog
Error conflicting definitions of HelpDialog.en-us.lu.dialog :
C:\Users\user\source\repos\AvanadeCoreAssistant\AvanadeCoreAssistant\dialogs\imported\Microsoft.Bot.Components.HelpAndCancel\HelpDialog\recognizers\HelpDialog.en-us.lu.dialog
Microsoft.Bot.Components.HelpAndCancel:
C:\Users\user.nuget\packages\microsoft.bot.components.helpandcancel\1.1.2\exported\HelpDialog\recognizers\HelpDialog.en-us.lu.dialog
Error conflicting definitions of HelpDialog.lu.dialog
HelpDialog is a predefined dialog that was already present. I have installed NodeJs and #botframework-cli package because it was required from the powershell script in order to run bf dialog:merge and now it seems these two sources have some kind of conflict.
To add to other answers, changes that worked for me are as follows:
update-schema.ps1, line 11, change "!**/generated" to "!../generated" and add "!../dialogs/imported"
Also, make sure that your custom action project is INSIDE of your bot directory, it should be a folder next to the "schemas" folder for the script to find it.
Note/Edit: Having the project nested inside the bot works to get the script working, though I do not recommend it due to causing other errors. Oddly, I found it was best to move the whole custom solution up a level, next to the bot project. You may have to edit the [botName].sln file in notepad to reference the location of the project, as well as editing the bot project's project reference.
I fixed it by changing the script. I noticed the script was trying to ignore the folder imported and generated but the error message indicated it was not doing so. So I changed it from !**/generated to !../generated.
I experienced the same issue.
To fix this problem you could simply delete the corresponding dialogs in the "imported" folder. Note that this will, however, delete these dialogs in your bot, which is not optimal but should be of little concern for a sample application.

Reconcile links and pathfiles for the Kaldi recipes

I'm using the Kaldi toolset for speech recognition from a computer in which I don't have the rights to modify the contents of the install in /var/kaldi. The directory contains a folder of scripts that are provided as a sample of utilisation, the scripts are also heavily linked to each other.
The structure is as follows, the main scripts folder for dataset mydataset is found in /var/kaldi/egs/mydataset/v1/, where scripts such as run.sh or path.sh are located. In particular, the user is expected to run the run.shscript which then calls path.sh which then exports a KALDI_ROOT variable:
export KALDI_ROOT=`pwd`/../../..
The scripts folder also contains many links that point to folders in other scripts' locations, so that scripts can be re-used if the're not changed. An example would be for the local entry in v2 to point to the local folder in v1 as follows:
IntxLNK^A.^#.^#/^#v^#1^#/^#l^#o^#c^#a^#l^#/^#
or
../v1/local/
I have to run the scripts from a folder I've been given somewhere else in the sytem as inmyfolder/egs/mydataset/v2/.
How can I modify path.sh and/or link to the installation folder so that I can run everything located in the intended kaldi root /var/kaldi, but also link to the rest of the scripts in myfolder/egs?
After talking with the admin of the system, the solution is to rebuild each link one by one to point to the new scripts locations. I'll leave the answer unanswered in case someone wants to add something else. Also, feel free to delete the question if you believe it not to be useful.
What I do is make a ProgramFiles directory in home i.e. ~/ProgramFiles
There I make folders for all programs I want to install or git-clone.
In path.sh I always use the whole /home//ProgramFiles/kaldi as root. Defnining absolute path helps overcome many errors along the way. You may have to define DATA_ROOT at some points in your path.sh

Access test resources within Haskell tests

This is probably a basic question but I've been Googling for a while on it... I have a Cabal-ized Haskell project and I'm in the process of writing integration tests for it. I want to be able to include test resources for my project in the same repo and access them in tests. For example, here are a couple things I want to accomplish:
1) Check a dummy database instance into my repo, including a shell script that spins up a database process. I want to write an Hspec integration test that spins up the database process, makes some calls to it, and then shuts it down. So I need to be able to find the shell script so I can use System.Process.createProcess on it.
2) Check in paired "input" and "output" files. My test should process each of the input files and compare them to a corresponding output file to make sure they match. (I've read about "golden" but it doesn't seem to solve the problem of finding/reading the input files in the first place?)
In short, how can I go about creating a "resources" folder in the root folder of my Haskell project and find the path to it inside tests?
Have a look at an existing project that uses input and output file.
For example, take haddock, the source code is at https://github.com/haskell/haddock. They have the test files under a folder (https://github.com/haskell/haddock/tree/master/html-test/ref) and they are referenced as extra-source-files in the cabal file (https://github.com/haskell/haddock/blob/master/haddock.cabal). Then the test code (https://github.com/haskell/haddock/blob/master/html-test/run.lhs) uses some CPP macro (__FILE__) to get the current directory, and can then resolve the files relative to that folder.

Modifying project with multiple solutions files and multiple project files referencing each other

I have a project structure like -
proj_Main
proj_A(directory)
somefile.cs(etc.)
proj_A.csproj
proj_B(dir)
somefile.cs
proj_B.csproj
proj_C(dir)
somefile.cs
proj_C.csproj
proj_D(dir)
somefile.cs
proj_D.csproj
proj_Main(dir)
other dirs etc.
some.cs files
proj_Main.csproj
proj_Main.csproj.user
proj_Main2010.csproj
proj_Main2010.csproj.user
proj_Main2010.v11.suo
proj_A.sln
proj_B.sln
proj_C.sln
proj_D.sln
proj_Main.sln
proj_Main2010.sln
(There are actually more than 10 solutions inside it, to keep it simple, I have depicted 4 above.)
While opening it in VS 2012 I have opened proj_Main2010.sln and it shows other linked projects with it, opens them inside the solution. This proj_Main refers the dll of other projects from those other projects. So far fine.
Now I have to modify the code from all project files, but if I do that, the previously referenced classes and code stops working, and throws errors of all sort -
Error 2 The type or namespace name 'XXXX' could not be found (are you missing a using directive or an assembly reference?)
I am not sure, If this is the correct way to depict the scenario, my apologies for that.
My problem is, I am not sure If I am opening the right file to work on this solution or if I am trying to modify the files safely.
Any suggestions would be appreciated.
p.s. I also have a setup project in it ( but I guess its related to deploying an application not useful while developing /redeveloping it)

csrun loses executable from .csx package

I am having a hard time with a seemingly simple Azure program.
My exercise is to create WorkerRole that spawns "helloworld.exe"
- which does just that - prints "hello world" and exits.
I am using Visual Studio to create a project,
then added new folder to project solution "bin2" where I put hello.exe
using menu option "Add Existing Item".
then created local storage bin2 in ServiceDefinition.csdef:
so I can find my executable with RoleEnvironment:
string baseDir = RoleEnvironment.GetLocalResource("bin2").RootPath.Replace('\', '/');
string command = Path.Combine(baseDir, #"hello.exe");
then ran cspack.exe to create .csx directory.
Resulting .csx package got hello.exe in the correct location:
WorkerRole1.csx\roles\WorkerRole1\approot\bin2\hello.exe
then I started local development fabric with csrun.exe and get error from the parent process that bin2/hello.exe is missing.
Do I need to do something else to make csrun to copy hello.exe into "bin2".
Any ideas?
Thank you in advance,
Ivgard
I'm pretty sure I answered this question already (probably on the MSDN forum)? But the local resource you declare will give you a path entirely different from where you're putting your hello.exe. When you add the file to your project, it gets included with the rest of the code for your role. When you look up the local resource, you get a path to an empty directory which you can use to write and read data. Those two are completely separate and unrelated locations.
If you want to find your hello.exe that's under bin2, just look for the relative path, or use %RoleRoot%\approot\bin2 (or maybe it's %RoleRoot%\approot\bin\bin2?).

Resources