rec / recs

🎬 recs: the Universal Recorder 🎬
MIT License
2 stars 1 forks source link

Write converter for Unix to Windows paths #120

Open Chiemezuo opened 4 days ago

Chiemezuo commented 4 days ago

My attempt at fixing the 4 failing tests on Windows.

=================================================== short test summary info =================================================== 
FAILED test/cfg/test_cli.py::test_info - subprocess.CalledProcessError: Command '['python', '-m', 'recs', '--info']' returned non-zero exit status 1.
FAILED test/cfg/test_path_pattern.py::test_simple - AssertionError: assert '164921\\20231015\\Ext + 1' == '164921/20231015/Ext + 1'
FAILED test/cfg/test_path_pattern.py::test_mix - AssertionError: assert 'Ext\\2023\\10\\1 + 15-164921' == 'Ext/2023/10/1 + 15-164921'
FAILED test/cfg/test_path_pattern.py::test_index - AssertionError: assert 'recording\\Ext + 1\\1' == 'recording/Ext + 1/1'

Fixed so far

Chiemezuo commented 3 days ago

Update on your question: I ran it, but it failed shortly after.

  1. I ran the python -m recs from my terminal, and it failed after 5 seconds. This was on my computer without any peripherals in use.
  2. I connected my headphones and it ran for a couple of seconds, then failed, then continued, and then failed again. It generated two output files this time around, but they were each only 1 second long.

There have been some inconsistencies in the errors, hence my not posting the -confusing- stack trace.

Most of the errors have something to do with the sounddevice (PortAudioError).

However, I want to explore it in more detail to at least make sense of the errors I'm getting, and give a more coherent response. :)

rec commented 3 days ago

All right!

I needed to get rid of the .split() to make it work on Mac, I squashed all the commits and gave it a more goal-oriented name (i.e. don't say what code you wrote, instead say what feature you added).

https://github.com/rec/recs/commits/fix/windows-path-issues

I can simply pull that commits (with your authorship on it of course 😀) and a couple of minor commits I added from the AI review onto the main branch and close the pull request with a comment, but you do need to patch that commit into your branch and see if it still works with my tweak!

Chiemezuo commented 2 days ago

I've patched the commit into my branch, and I can confirm the test still passes on my Windows machine!