Skip to content

mojo_csv#89

Merged
carolinefrasca merged 30 commits intomodular:mainfrom
Phelsong:main
Jun 24, 2025
Merged

mojo_csv#89
carolinefrasca merged 30 commits intomodular:mainfrom
Phelsong:main

Conversation

@Phelsong
Copy link
Copy Markdown
Contributor

@Phelsong Phelsong commented Mar 12, 2025

Checklist

  • [*] My recipe.yaml file specifies which version(s) of MAX is compatible with my project (see here for an example). If not, my package is compatible with both 24.5 and 24.6.
  • [*] License file is packaged (see here for an example).
  • [*] Set the build number to 0 (for new packages, or if the version changed).
  • [*] Bumped the build number (if the version is unchanged).

Csv lib, mostly rfc-4180 compliant while handling trailing commas.
https://www.rfc-editor.org/rfc/rfc4180

https://github.com/Phelsong/mojo_csv

@Phelsong
Copy link
Copy Markdown
Contributor Author

added the test files here after reading some comments on another MR... setup to run after package is built, if i understood it correctly.

@Phelsong
Copy link
Copy Markdown
Contributor Author

Let me know whats required to fix this. The test file is in the recipe folder and the source repo, so the error doesn't make sense to me.

@carolinefrasca
Copy link
Copy Markdown
Member

Hi @Phelsong, can you try removing the quotation marks around the test invocation?

@carolinefrasca
Copy link
Copy Markdown
Member

@Phelsong Apologies for the delay! Can you give me access to edit your PR so I can try adjusting a few things? (should be in the PR settings)

@Phelsong
Copy link
Copy Markdown
Contributor Author

Phelsong commented May 13, 2025

Been slammed with work, will work on getting this fixed next week.

Going to modify the test file to not take a cli arg and re-license to MIT

@carolinefrasca
Copy link
Copy Markdown
Member

Hi @Phelsong, so sorry for the delay on this! I totally missed your message. Here's the current error:

 │ │ │ Installing test environment
 │ │ │ ✔ Successfully updated the test environment
 │ │ │ Testing commands:
 │ │ │ + mojo run test.mojo
 │ │ │ $SRC_DIR/test.mojo:5:6: error: unable to locate module 'src'
 │ │ │ from src.csv_reader import CsvReader
 │ │ │      ^
 │ │ │ $SRC_DIR/test.mojo:5:10: error: 
 │ │ │ from src.csv_reader import CsvReader
 │ │ │          ^
 │ │ │ mojo: error: failed to parse the provided Mojo source module
 │ │ │ × error Script failed with status 1
 │ │ │ × error Work directory: '/home/runner/work/modular-community/modular-community/output/bld/rattler-build_mojo_csv_1748989354/work/test/run/etc/conda/test-files/mojo_csv/0'
 │ │ │ × error To debug the build, run it manually in the work directory (execute the `./conda_build.sh` or `conda_build.bat` script)
 │ │ │
 │ │ ╰─────────────────── (took 1 second)
 │ │
 │ ╰─────────────────── (took 1 second)
 │
 ╰─────────────────── (took 6 seconds)
Error:   × failed to run test: Script failed

@carolinefrasca
Copy link
Copy Markdown
Member

New error:

 │ │ │ Testing commands:
 │ │ │ + mojo run test.mojo
 │ │ │ mojo: error: execution exited with a non-zero result: 1
 │ │ │ Error opening file: ./test.csv
 │ │ │ Unhandled exception caught during execution: At /home/runner/work/modular-community/modular-community/output/bld/rattler-build_mojo_csv_1749154250/work/src/csv_reader.mojo:112:24: AssertionError: condition was unexpectedly False
 │ │ │ × error Script failed with status 1
 │ │ │ × error Work directory: '/home/runner/work/modular-community/modular-community/output/bld/rattler-build_mojo_csv_1749154250/work/test/run/etc/conda/test-files/mojo_csv/0'
 │ │ │ × error To debug the build, run it manually in the work directory (execute the `./conda_build.sh` or `conda_build.bat` script)
 │ │ │
 │ │ ╰─────────────────── (took 4 seconds)
 │ │
 │ ╰─────────────────── (took 4 seconds)
 │
 ╰─────────────────── (took 11 seconds)
Error:   × failed to run test: Script failed

@Phelsong
Copy link
Copy Markdown
Contributor Author

tested actually building with rattler locally, this should work now.

@carolinefrasca carolinefrasca merged commit 3d7dd0c into modular:main Jun 24, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants