-
Notifications
You must be signed in to change notification settings - Fork 8
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
Python integration #317
Merged
Merged
Python integration #317
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
32a4128
add hashcode tests
HLWeil 92c72ee
array fixes in python compilation
HLWeil 2d35cfb
update Fable and pyxpecto
HLWeil f0bb78d
switch towards using .venv for running transpiled python
HLWeil aa30389
move json schema validation to json tests
HLWeil 93b6d94
replace mocha and expecto with pyxpecto
HLWeil 688c628
work on json io support in python
HLWeil 3dfaad7
adjustments to web and validation to allowe for python transpilation
HLWeil 2540056
small fix for compressed json io stringtable conversion
HLWeil c534acf
fix and test comment regex handling for python
HLWeil 556e2bf
fix http requests in python
HLWeil b5eaaed
hotfix fable python hashing of person
HLWeil 66b83a2
several small changes to test stack
HLWeil 9385d06
small fixes in python and setup instructions
HLWeil f75ce4d
small python tests hotfix
HLWeil 4262833
hotfix js webrequest
HLWeil 89aa3c2
fixed python tests to work on all platforms
floWetzels df663cb
include python setup in CI
HLWeil b0186f4
small fix to CI
HLWeil 3e403cd
small fix to CI
HLWeil 890048e
set ci fail-fast to false and fix py encoding in windows
HLWeil 8becc67
update build project for releasing python package
HLWeil 19d850e
several small cleanups according to PR #317 comments
HLWeil 78914e0
bump to 1.2.0
HLWeil b6e2eca
small change to semver in npm
HLWeil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚀 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a note for minimal 3.11.x