-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* spec testing * run spec tests in CI * spec tests on mac runner * brew install graphviz * ignore ID's in spec comparison * shape/style update for specs * test on python 3.12 on macos 13
- Loading branch information
Showing
51 changed files
with
23,477 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Spec Test | ||
on: push | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
spec-test: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
id: cpython3 | ||
with: | ||
python-version: "3.12" | ||
cache: pip | ||
cache-dependency-path: requirements.txt | ||
- run: brew install graphviz | ||
- run: pip install -r requirements.txt | ||
- name: Run specs tests script | ||
run: | | ||
mkdir tmp_out | ||
./test_specs.sh test/ specs/ tmp_out/ |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
tmp_out/ | ||
|
||
# C extensions | ||
*.so | ||
|
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,2 +1,2 @@ | ||
[files] | ||
extend-exclude = ["test/**"] | ||
extend-exclude = ["test/**", "specs/**"] |
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,33 @@ | ||
#!/bin/bash | ||
|
||
# Check if the correct number of arguments is provided | ||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: $0 <source_directory> <specs_directory>" | ||
exit 1 | ||
fi | ||
|
||
# Assign arguments to variables | ||
source_dir="$1" | ||
specs_dir="$2" | ||
|
||
# Ensure source_dir doesn't end with a slash | ||
source_dir="${source_dir%/}" | ||
|
||
# Find all .gv.txt files in the source directory and its subdirectories | ||
find "$source_dir" -type f -name "*.gv.txt" | while read -r file; do | ||
# Get the relative path of the file from the source directory | ||
rel_path="${file#$source_dir/}" | ||
|
||
# Create the output filename, preserving the directory structure | ||
output_file="$specs_dir/${rel_path%.gv.txt}.xml" | ||
|
||
# Create the directory structure if it doesn't exist | ||
mkdir -p "$(dirname "$output_file")" | ||
|
||
# Run the command | ||
python3 -m graphviz2drawio "$file" -o "$output_file" | ||
|
||
echo "Processed: $file -> $output_file" | ||
done | ||
|
||
echo "All .gv.txt files have been processed." |
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
Oops, something went wrong.