-
Notifications
You must be signed in to change notification settings - Fork 5
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 #2 from niyue/feature/progress-bar
Support progress bar with different styles, and refactor the code to break the graph generation implementation into multiple files.
- Loading branch information
Showing
14 changed files
with
163 additions
and
43 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,18 +1,45 @@ | ||
#!/usr/bin/env just --justfile | ||
set dotenv-load := true | ||
|
||
sample_toml := "tests/url_shortener.toml" | ||
sample_md := "dist/url_shortener.md" | ||
sample_png := "dist/url_shortener.png" | ||
built_wheel := "./dist/skillmap-*-py3-none-any.whl" | ||
|
||
# build and install package into system python for every python file change | ||
dev: | ||
find skillmap -iname "*.py" -o -iname "*.cmake" -iname "pyproject.toml" | entr -s "poetry build && pip install ./dist/skillmap-*-any.whl --force-reinstall --no-dependencies" | ||
find skillmap -iname "*.py" -iname "pyproject.toml" | entr -s "poetry build && pip install {{ built_wheel }} --force-reinstall" | ||
|
||
# install package into system python | ||
setup: | ||
# install the library into system python | ||
rm -fr ./dist | ||
poetry build && pip install ./dist/skillmap-*-py3-none-any.whl --force-reinstall | ||
poetry build && pip install {{ built_wheel }} --force-reinstall | ||
|
||
# publish package to pypi | ||
publish: | ||
poetry build | ||
poetry publish | ||
|
||
build_sample src="tests/url_shortener.toml" dest="dist/url_shortener.md": | ||
echo '```mermaid' > {{ dest }} && skillmap {{ src }} >> {{ dest }} && echo '```' >> {{ dest }} | ||
# generate markdown from source toml file | ||
generate src dest: | ||
echo '```mermaid' > {{ dest }} && poetry run skillmap {{ src }} >> {{ dest }} && echo '```' >> {{ dest }} | ||
|
||
# generate png from source toml file | ||
png src dest: | ||
# mermaid cli (https://github.com/mermaid-js/mermaid-cli) needs to be installed | ||
poetry run skillmap {{ src }} | mmdc -o {{ dest }} | ||
|
||
# generate markdown for sample skillmap | ||
generate_sample: | ||
just generate {{ sample_toml }} {{ sample_md }} | ||
|
||
# generate png for sample skillmap | ||
png_sample: | ||
just png {{ sample_toml }} {{ sample_png }} | ||
|
||
# develop sample skillmap by hot reloading the file and generated results | ||
dev_sample: | ||
find "tests" -iname "*.toml" | entr -s "just generate_sample" | ||
|
||
dev_sample src="tests": | ||
find {{ src }} -iname "*.toml" | entr -s "just build_sample" | ||
|
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,30 @@ | ||
PROGRESS_BAR_STYLES = [ | ||
'□■', | ||
'▁█', | ||
'⣀⣿', | ||
'░█', | ||
'▒█', | ||
'□▩', | ||
'□▦', | ||
'▱▰', | ||
'▭◼', | ||
'▯▮', | ||
'◯⬤', | ||
'⚐⚑', | ||
'⬜⬛', | ||
'⬜🟩', | ||
'⬜🟦', | ||
'⬜🟧', | ||
'🤍💚', | ||
'🤍💙', | ||
'🤍🧡', | ||
'⚪⚫', | ||
'⚪🟢', | ||
'⚪🔵', | ||
'⚪🟠', | ||
'🌑🌕', | ||
'❕❗', | ||
'🥚🐣', | ||
'💣💥', | ||
'❌✅', | ||
] |
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
Oops, something went wrong.