Skip to content
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

Issue 45 send back diagram image #51

Open
wants to merge 74 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
e9c2a90
add packages to get screenshot from live server
CopyDemon Aug 6, 2024
64a347b
add new function to return screenshot work save
CopyDemon Aug 7, 2024
5721b6c
update save diagram function with async playwright, add save path val…
CopyDemon Aug 21, 2024
6bdb1cf
react build
CopyDemon Aug 21, 2024
72d9faa
add id for download Icon to let playwright to select to hover
CopyDemon Aug 21, 2024
aa648f0
ignore this, this is format
CopyDemon Aug 21, 2024
b351971
add test for save svg and png
CopyDemon Sep 4, 2024
210a1a0
internal function save diagram should return diagram saved path for p…
CopyDemon Sep 7, 2024
889da65
add test diagram save path, work save now test default path
CopyDemon Sep 7, 2024
17f8851
add testing test save path
CopyDemon Sep 9, 2024
16f872f
add return for test, add if condation to log info to user about path …
CopyDemon Sep 9, 2024
c04feba
update package list now only use playwright and nest_asyncio these ar…
CopyDemon Sep 10, 2024
940c248
add Ipython to dependency for only return screenshot to user when use…
CopyDemon Sep 10, 2024
18a5a33
grammar error fix
CopyDemon Sep 10, 2024
5efba61
remove dependency fastapi uvicorn since these are not use
CopyDemon Sep 10, 2024
f562744
move playwright to required dependency
CopyDemon Sep 10, 2024
9d803f4
add install playwright step for CI
CopyDemon Sep 10, 2024
b5660f1
testing CI is not install playwright
CopyDemon Sep 10, 2024
aa904a0
move install playwright to core test why playwright is not installed
CopyDemon Sep 10, 2024
a045dc4
remove logging capture since not in use, and add log for save path as…
CopyDemon Sep 10, 2024
f26e529
update CI core add - name: Install playwright
CopyDemon Sep 10, 2024
eced697
update default path defination, it defined within fsvis _validate_and…
CopyDemon Sep 10, 2024
14b0ee5
update default path defination, it defined within fsvis _validate_and…
CopyDemon Sep 10, 2024
7b22859
_validate_and_create_save_path()now return default path for future us…
CopyDemon Sep 10, 2024
5ccccbc
windows show cant move file error and async_save_diagram function ret…
CopyDemon Sep 10, 2024
efb183d
use shutil replate os.rename in windows the os.rename is not working …
CopyDemon Sep 10, 2024
89ba63e
insted of os.rename or shutil.move now use read and write file to sav…
CopyDemon Sep 10, 2024
d026bf1
use platfrom and tempfile to create invalid path for windows and linux
CopyDemon Sep 10, 2024
5550b3b
add function arg description. add if condation default browser downlo…
CopyDemon Sep 10, 2024
89d3ec8
debug: try remove delete folder code to see if that broken download
CopyDemon Sep 10, 2024
4f799c5
increase waiting time for browser to fully load and restore delete do…
CopyDemon Sep 10, 2024
c07a712
continue increase browser waiting time for windows CI
CopyDemon Sep 10, 2024
3be7cb1
update browser use no sandbox mode
CopyDemon Sep 10, 2024
8403abe
debug update invalid path on window the CON:\ sames like can cause so…
CopyDemon Sep 10, 2024
8393687
update pint version 0.25, the idaes-pse 2.7.0.dev0 require 0.24.1
CopyDemon Oct 16, 2024
298a4f3
add utility tool use for cleanup screenshot folder
CopyDemon Oct 16, 2024
4cc93c6
merge main branch
CopyDemon Oct 16, 2024
5f49e0f
replace f string path with os.path.join to avoid windows \ path is di…
CopyDemon Oct 16, 2024
8ab01c3
cleanup make less code but same function, add cleanup screenshot file…
CopyDemon Oct 16, 2024
e7f13d8
fix another windows invalid path by using os.path.join
CopyDemon Oct 16, 2024
30c2157
increase timeout time
CopyDemon Oct 22, 2024
93a458a
add timeout for playwright load page, click and download to avoid CI …
CopyDemon Oct 23, 2024
5aa3e7f
revert timeout only left on load page and button click and test
CopyDemon Oct 23, 2024
19bdabb
increase timeout
CopyDemon Oct 23, 2024
2b24093
move import to top then use async playwright instead of sync playwright
CopyDemon Oct 23, 2024
a96ca43
max timeout 30s or it doesn't make sense
CopyDemon Oct 23, 2024
7392b80
add log to notice user what is timeout doing when they download image
CopyDemon Oct 23, 2024
cad9034
try new timeout 30000
CopyDemon Oct 23, 2024
b25b1c7
test, remove timeout
CopyDemon Oct 30, 2024
fc5c08a
remove test generated files
CopyDemon Oct 30, 2024
7e5a838
add test generated files to ignore
CopyDemon Oct 30, 2024
8cfcff3
update add test_diagram.json to ignore ... spell wrong
CopyDemon Oct 30, 2024
150fac4
update CI add pytest-asyncio for test async function
CopyDemon Oct 30, 2024
c422f05
update pytest screenshot
CopyDemon Oct 30, 2024
a651075
fix wrong way to add timeout
CopyDemon Oct 30, 2024
e7c1cf2
move save diagram screen to it's own file own class make sure fsvis i…
CopyDemon Oct 30, 2024
28ec442
update param in test
CopyDemon Oct 30, 2024
c0d98cf
make sure playwright browser is headless
CopyDemon Oct 30, 2024
c6e4838
add comment to save diagram function self
CopyDemon Oct 30, 2024
0963887
use idaes >= 2.7.0
CopyDemon Dec 3, 2024
48daef7
Merge branch 'main' into issue-45-send-back-diagram-image
CopyDemon Dec 3, 2024
13ef471
added export_flowsheet_diagram function
dangunter Dec 4, 2024
7ffe80b
tests for export_flowsheet_diagram
dangunter Dec 5, 2024
cdb7010
move returns back to try block not in finally
CopyDemon Dec 12, 2024
6bc4e05
remove close loop it will make upcoming test fail, and update bytes s…
CopyDemon Dec 12, 2024
3f6a28d
close the diagnostc test, the IDAES 2.7 has some changes that make di…
CopyDemon Dec 12, 2024
0aeb041
roll idaes-pse version back to git repo main
CopyDemon Dec 19, 2024
70c9fa0
instead of store visualize result as dict then call .save_diagram, di…
CopyDemon Dec 19, 2024
92d17ac
remove the async test, restore integration
CopyDemon Dec 19, 2024
615bdc3
replace the save path test with test_export_flowsheet_diagram
CopyDemon Dec 19, 2024
af93331
update IO or OS error base on windows or linux
CopyDemon Dec 19, 2024
eff594d
try just use oserror
CopyDemon Dec 19, 2024
195fdbc
take both OSError and IOError because window will try to create on ro…
CopyDemon Dec 19, 2024
ade46ca
windows continue fail on this test try to check how windows will show…
CopyDemon Dec 19, 2024
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
10 changes: 9 additions & 1 deletion .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,16 @@ jobs:
with:
variant: ${{ matrix.install-variant }}
python-version: ${{ matrix.python-version }}

- name: Install test dependencies
shell: bash -l {0}
run: |
pip install pytest-asyncio pytest-timeout
playwright install-deps
playwright install

- name: Run pytest
run: pytest -v --pyargs idaes_ui.fv
run: pytest -v -s --pyargs idaes_ui.fv --timeout=600

cypress:
name: cypress (${{ matrix.install-variant }}/py${{ matrix.python-version }}/${{ matrix.os }})
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,9 @@ shared_variable.json
saved_flowsheet/

# cypress
screenshots

# remove files related to test
screenshots/
test_diagram.json
test_diagram.png
test_diagram.svg
Loading
Loading