mmcdermott / MEDS_transforms

A simple set of MEDS polars-based ETL and transformation functions
MIT License
20 stars 5 forks source link

Updated the mimic iv tutorial #210

Closed Oufattole closed 1 week ago

Oufattole commented 1 month ago

Now the tutorial will always use the latest version of meds-transform by default (by checking pypi for the latest version), and I included downloads all necessary config files as some were missing which broke the tutorial.

Summary by CodeRabbit

coderabbitai[bot] commented 1 month ago

Walkthrough

The changes in the README.md file for the MIMIC-IV Example include updates to installation instructions, environment variable settings, and script execution commands. The installation command for the MEDS_transforms package has been revised to dynamically fetch the latest version from PyPI. Specific directory paths for raw data have replaced placeholders, and the default behavior for the do_unzip parameter has been changed. Additionally, the number of workers has been increased from 5 to 8, along with a shift from a distributed to a local processing approach.

Changes

File Change Summary
MIMIC-IV_Example/README.md - Updated installation instructions and environment variable settings.
- Modified installation command for MEDS_transforms to fetch the latest version dynamically.
- Replaced placeholder paths with actual directory paths for MIMIC-IV data.
- Changed do_unzip parameter from true to false.
- Increased number of workers from 5 to 8.
- Changed stage runner file from slurm_runner.yaml to local_parallelism_runner.yaml.

Possibly related PRs

Suggested reviewers

Poem

πŸ‡ In the garden where data blooms,
The README now clears all the glooms.
With paths set right and workers galore,
The MEDS transform opens the door!
So hop along, let’s code and play,
For MIMIC-IV shines brighter today! 🌼


πŸ“œ Recent review details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
πŸ“₯ Commits Reviewing files that changed from the base of the PR and between ca56037821ea7a033c001e5e6162dee26ee2b0f1 and e3046f798d7d9e938fa64fd1dac3ef921a3cbc88.
πŸ“’ Files selected for processing (1) * `MIMIC-IV_Example/README.md` (2 hunks)
πŸ”‡ Additional comments (2)
MIMIC-IV_Example/README.md (2) `11-14`: **Enhance version fetching mechanism with better error handling** The current implementation could fail silently if PyPI is unreachable. The previous review comment suggesting improvements to version handling is still valid and should be implemented. --- `26-26`: _:warning: Potential issue_ **Add URL validation before downloads** The URL construction depends on the fetched version, but there's no validation to ensure the URL is accessible before attempting downloads. Add URL validation before proceeding with downloads: ```diff export URL="https://raw.githubusercontent.com/mmcdermott/MEDS_transforms/$VERSION/MIMIC-IV_Example" + +# Validate URL before proceeding +if ! curl --output /dev/null --silent --head --fail "$URL/run.sh"; then + echo "Error: Invalid URL or repository path: $URL" + echo "Please check if version $VERSION exists in the repository" + exit 1 +fi ``` The previous review comment about validating downloaded files is also still valid and should be implemented.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❀️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
πŸͺ§ Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.17%. Comparing base (553250e) to head (e3046f7). Report is 8 commits behind head on main.

:white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #210 +/- ## ======================================= Coverage 99.17% 99.17% ======================================= Files 27 27 Lines 2055 2055 ======================================= Hits 2038 2038 Misses 17 17 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Oufattole commented 1 month ago

I think there were a few accidental modifications I pushed, I just removed them, so I think this shoud be ready to go @mmcdermott

mmcdermott commented 1 month ago

LGTM! Merge at your leisure.

mmcdermott commented 1 month ago

Actually, @Oufattole, if you don't mind waiting, this change would also likely be helpful on #207 and #203 as well

Oufattole commented 2 weeks ago

I think #207 and #203 were merged, do you want to merge this now @mmcdermott ?

mmcdermott commented 1 week ago

@Oufattole can we finish and merge or close this? Not sure which would be more appropriate, but I'd like to get it closed out rather than remaining indefinitely open. Thanks!

Oufattole commented 1 week ago

I resolved the merge conflict, should be good to go assuming tests pass.