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

Modifications to have file_watcher.py work on mac (or windows) machine #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Anas321
Copy link

@Anas321 Anas321 commented Jan 18, 2025

I made the modifications to make the file_watcher.py work on my mac (or windows) machine. It was verified to work on the mac machine but did not fully work on the windows one.

@Anas321
Copy link
Author

Anas321 commented Jan 18, 2025

Here are the modifications we made with the filewatcher to make it work in my machine (mac).

  1. Updated requirements.txt:
    I used Python 3.9 and the following dependencies:

silx==1.1.2
pyFAI==2023.9.0
h5py==3.9.0
fabio==2023.6.0
numpy==1.26.4
Pillow==10.0.1
scipy==1.13.0
tiled[all]==0.1.0a116
matplotlib==3.8.0
pyyaml==6.0.1
python-dotenv==1.0.0
prefect==2.13.4
astropy==5.3.4
gpcam==8.1.7
BaselineRemoval==0.1.6
griffe>=0.49.0,<1.0.0

  1. Changes in file_watcher.py:
    I commented out the following lines to avoid issues:

Lines 26 and 27:

# # parameters = JSON.load("2017-10-17-gisaxs-horizontal-cut").value
# parameters = JSON.load("2017-10-23-gisaxs-horizontal-cut").value

Lines 34-40:
# parameters["input_uri_data"] = input_file_uri
# logger.info(f"Scheduling flows with {input_file_uri}")
# await _schedule(
# deployment_name="horizontal_cut_automatic_fit/automatic_cut_and_fit",
# flow_run_name=input_file_uri,
# parameters=parameters,
# )

  1. In file_handling.py, changing line 288 from if scan_filepath(".edf"): to if scan_filepath.endswith(".edf"):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant