-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #317 from nfdi4plants/python_integration
Python integration
- Loading branch information
Showing
93 changed files
with
1,058 additions
and
822 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
@echo off | ||
|
||
set PYTHONIOENCODING=utf-8 | ||
dotnet tool restore | ||
cls | ||
dotnet run --project ./build/build.fsproj %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
module GenerateIndexPy | ||
|
||
open System | ||
open System.IO | ||
open System.Text.RegularExpressions | ||
|
||
|
||
open System.Text | ||
|
||
let createImportStatement path (classes : string []) = | ||
let classes = classes |> Array.reduce (fun acc x -> acc + ", " + x) | ||
sprintf "from %s import %s" path classes | ||
|
||
let writePyIndexfile (path: string) (content: string) = | ||
let filePath = Path.Combine(path, "arctrl.py") | ||
File.WriteAllText(filePath, content) | ||
|
||
let generateIndexFileContent (classes : (string*string) []) = | ||
classes | ||
|> Array.groupBy fst | ||
|> Array.map (fun (p,a) -> createImportStatement p (a |> Array.map snd)) | ||
|
||
let classes = | ||
[| | ||
"__future__", "annotations" | ||
"collections.abc", "Callable" | ||
"typing", "Any" | ||
".ISA.ISA.JsonTypes.comment", "Comment" | ||
".ISA.ISA.JsonTypes.ontology_annotation","OntologyAnnotation"; | ||
".ISA.ISA.JsonTypes.person", "Person"; | ||
".ISA.ISA.JsonTypes.publication", "Publication"; | ||
".ISA.ISA.ArcTypes.composite_header", "IOType" | ||
".ISA.ISA.ArcTypes.composite_header", "CompositeHeader"; | ||
".ISA.ISA.ArcTypes.composite_cell", "CompositeCell" | ||
".ISA.ISA.ArcTypes.composite_column", "CompositeColumn" | ||
".ISA.ISA.ArcTypes.arc_table", "ArcTable" | ||
".ISA.ISA.ArcTypes.arc_types", "ArcAssay"; | ||
".ISA.ISA.ArcTypes.arc_types", "ArcStudy"; | ||
".ISA.ISA.ArcTypes.arc_types", "ArcInvestigation"; | ||
".Templates.template", "Template" | ||
".Templates.templates", "Templates" | ||
".Templates.template", "Organisation" | ||
".arc","ARC" | ||
|] | ||
|
||
let ARCtrl_generate (rootPath: string) = | ||
generateIndexFileContent classes | ||
|> Array.reduce (fun a b -> a + "\n" + b) | ||
|> writePyIndexfile rootPath |
Oops, something went wrong.