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

Lint: Utils module #350

Open
wants to merge 37 commits into
base: develop
Choose a base branch
from
Open

Conversation

ssolson
Copy link
Contributor

@ssolson ssolson commented Sep 4, 2024

Modifies MHKiT to make the utils module PyLint compatible and enforces compatibility via GitHub Actions.

Additionally this PR modifies the GitHub Actions testing environment to use the conda environment.yml file.

@ssolson ssolson self-assigned this Sep 4, 2024
@ssolson ssolson added utils module Clean Up Improve code consistency and readability labels Sep 4, 2024
Comment on lines +123 to +126
hash_params,
cache_dir,
cache_content={"data": None, "metadata": None, "write_json": write_json},
clear_cache_file=clear_cache,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +171 to +176
handle_caching(
hash_params,
cache_dir,
cache_content={"data": data, "metadata": None, "write_json": None},
clear_cache_file=clear_cache,
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +96 to +100
handle_caching(
self.hash_params,
self.cache_dir,
cache_content={"data": self.data, "metadata": None, "write_json": None},
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +121 to +132
handle_caching(
self.hash_params,
self.cache_dir,
cache_content={"data": self.data, "metadata": None, "write_json": None},
)

retrieved_data, _, _ = handle_caching(
self.hash_params,
self.cache_dir,
cache_content={"data": None, "metadata": None, "write_json": None},
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +149 to +153
handle_caching(
self.hash_params,
cache_dir,
cache_content={"data": self.data, "metadata": None, "write_json": None},
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +486 to +490
handle_caching(
hash_params,
cache_dir,
cache_content={"data": data, "metadata": meta, "write_json": None},
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +210 to +215
data, _, _ = handle_caching(
hash_params,
cache_dir,
cache_content={"data": None, "metadata": None, "write_json": None},
clear_cache_file=clear_cache,
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +388 to +391
hash_params,
cache_dir,
cache_content={"data": None, "metadata": None, "write_json": None},
clear_cache_file=clear_cache,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +435 to +441
hash_params,
cache_dir,
cache_content={
"data": ndbc_data[buoy_id][year],
"metadata": None,
"write_json": None,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +32 to +34
- name: Run Pylint on mhkit/utils/
run: |
pylint mhkit/utils/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add utils module to the linting enforcement

@ssolson ssolson marked this pull request as ready for review September 6, 2024 19:09
@ssolson ssolson requested a review from akeeste September 6, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Up Improve code consistency and readability utils module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant