Skip to content

Removed unused imports from all python files#14

Merged
jhoshiko merged 2 commits intomainfrom
jhoshiko/6-removed-imports
Jun 6, 2024
Merged

Removed unused imports from all python files#14
jhoshiko merged 2 commits intomainfrom
jhoshiko/6-removed-imports

Conversation

@jhoshiko
Copy link
Collaborator

@jhoshiko jhoshiko commented Jun 5, 2024

This PR removes all unused imports from the python files using VSCode and Flake8 to identify imports that are unused. I ran the simulation and didn't notice any issues, but please test this branch on your end and let me know if you have any concerns!

Closes #6

@jhoshiko jhoshiko added this to the Refactor Demos Code milestone Jun 5, 2024
@jhoshiko jhoshiko requested review from lijiyao919 and zihaolzh June 5, 2024 23:24
@jhoshiko jhoshiko self-assigned this Jun 5, 2024
@lijiyao919
Copy link
Contributor

could you remove out the last line in simulate.py: os.chown(output_fname, uid, gid)?

Have you pass the run? (refer to the run command in issue#2)

@jhoshiko
Copy link
Collaborator Author

jhoshiko commented Jun 6, 2024

@lijiyao919 I can yeah. Looks like we've ran into this issue before as documented in the windows installation instructions:

Use code 'python -u simulate.py -c -cf custom -l -r 06197001' in command prompt to run the project.
AttributeError: module 'os' has no attribute 'chown' will be given but the result file 'model_data_{year}.h5' will still be obatined.

I did run into this attribute error while running but it looks like I'm still getting outputs.

@lijiyao919
Copy link
Contributor

looks good.

@jhoshiko jhoshiko merged commit fb2e4eb into main Jun 6, 2024
@jhoshiko jhoshiko deleted the jhoshiko/6-removed-imports branch June 6, 2024 22:25
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.

Remove unused imports from all modules/scripts

2 participants