Skip to content

Commit

Permalink
allow Vector{Symbol} in spaceFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed Sep 27, 2024
1 parent 02c5579 commit 3a37142
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 0.7.0

- heta-compiler updated to 0.9.0
- changes in `load_platform`: add `spaceFilter`

## 0.6.2

- added aarch64 macos support
Expand Down
6 changes: 5 additions & 1 deletion src/heta_cli/connect.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ function load_platform(
target_dir::AbstractString;
rm_out::Bool = true,
dist_dir::String = ".",
spaceFilter::Union{String, Nothing} = nothing,
spaceFilter::Union{String, Vector{:Symbol}, Nothing} = nothing,
kwargs...
)
if spaceFilter isa Vector{String}
spaceFilter = "^(" * join(spaceFilter, "|") * ")\$"
end

export_ = isnothing(spaceFilter) ? "{format:Julia,filepath:$MODEL_DIR}" : "{format:Julia,filepath:$MODEL_DIR,spaceFilter:'$spaceFilter'}"
# convert heta model to julia
build_res = heta_build(target_dir; dist_dir = dist_dir, export_ = export_, kwargs...)
Expand Down

0 comments on commit 3a37142

Please sign in to comment.