Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .JuliaFormatter.toml

This file was deleted.

3 changes: 0 additions & 3 deletions .dev/Project.toml

This file was deleted.

75 changes: 0 additions & 75 deletions .dev/herb_format.jl

This file was deleted.

21 changes: 0 additions & 21 deletions .dev/setup.jl

This file was deleted.

4 changes: 3 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Migrate code style to SciML
02be3454903ae3d03e1b8062794d96adabbdd814
02be3454903ae3d03e1b8062794d96adabbdd814
# Migrate code style to Runic
05a1fec6e6809b7354ea851f6907312fe843aef3
19 changes: 0 additions & 19 deletions .githooks/pre-commit

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/JuliaFormatter.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Formatting Check

on:
push:
branches:
- master
tags: '*'
pull_request:

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
format:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
steps:
- uses: actions/checkout@v4
- uses: fredrikekre/runic-action@v1
with:
version: '1'
continue-on-error: ${{ github.event_name == 'pull_request' }}
- uses: reviewdog/action-suggester@v1
if: github.event_name == 'pull_request'
with:
tool_name: Runic
fail_level: warning
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/fredrikekre/runic-pre-commit
rev: v2.0.1
hooks:
- id: runic
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "HerbCore"
uuid = "2b23ba43-8213-43cb-b5ea-38c12b45bd45"
authors = ["Jaap de Jong <jaapdejong15@gmail.com>", "Nicolae Filat <N.Filat@student.tudelft.nl>", "Tilman Hinnerichs <t.r.hinnerichs@tudelft.nl>", "Sebastijan Dumancic <s.dumancic@tudelft.nl>"]
version = "1.0.0"
version = "1.1.0"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
60 changes: 30 additions & 30 deletions src/HerbCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,35 @@ include("constraint.jl")
include("indexing.jl")

export
AbstractRuleNode,
RuleNode,
@rulenode,
AbstractHole,
AbstractUniformHole,
UniformHole,
Hole,
HoleReference, depth,
node_depth,
rulesoftype,
contains_index,
swap_node,
get_rulesequence,
rulesonleft,
get_node_at_location,
get_path,
number_of_holes,
contains_hole,
contains_nonuniform_hole,
get_children,
get_rule,
isuniform,
isfilled,
hasdynamicvalue,
have_same_shape, AbstractConstraint,
AbstractGrammar,
print_tree,
update_rule_indices!,
is_domain_valid,
issame
AbstractRuleNode,
RuleNode,
@rulenode,
AbstractHole,
AbstractUniformHole,
UniformHole,
Hole,
HoleReference, depth,
node_depth,
rulesoftype,
contains_index,
swap_node,
get_rulesequence,
rulesonleft,
get_node_at_location,
get_path,
number_of_holes,
contains_hole,
contains_nonuniform_hole,
get_children,
get_rule,
isuniform,
isfilled,
hasdynamicvalue,
have_same_shape, AbstractConstraint,
AbstractGrammar,
print_tree,
update_rule_indices!,
is_domain_valid,
issame

end # module HerbCore
1 change: 1 addition & 0 deletions src/grammar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function Base.show(io::IO, grammar::AbstractGrammar)
for i in eachindex(grammar.rules)
println(io, i, ": ", grammar.types[i], " = ", grammar.rules[i])
end
return
end

Base.getindex(grammar::AbstractGrammar, typ::Symbol) = grammar.bytype[typ]
10 changes: 7 additions & 3 deletions src/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ function is_domain_valid end
"""
issame(a, b)

Returns whether the two given objects `a` and `b` (ex: [`RuleNode`](@ref),
[`Hole`](@ref) or [`AbstractConstraint`](@ref)) are the same.
!!! warning

This function is deprecated and should not be used. Use `==` instead.

"""
function issame(a, b)
false
return a == b
end

Base.@deprecate issame Base.:(==) false
Loading
Loading