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

changing how output works, adding tests for output #274

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

K20shores
Copy link
Collaborator

Closes #237

  • Adds 'terminal' as an output format
  • Uses the date time to create a file name
  • Supports all of these use cases and creates unit tests for these:
# should print results to terminal
music_box -e Analytical

# should create a filename that is similar to music_box_20241108_093604.nc in the current directory
music_box -e Analytical --output-format netcdf

# should create a filename that is similar to music_box_20241108_093604.csv in the current directory
music_box -e Analytical --output-format csv

# should create a file named out.csv in the current directory
music_box -e Analytical --output-format csv -o out.csv

# should create a named out.nc in the current directory
music_box -e Analytical --output-format netcdf -o out.nc

# should create directory results and write out.nc into that directory
music_box -e Analytical --output-format netcdf -o results/out.nc

# should create directory results and write out.csv into that directory
music_box -e Analytical --output-format csv -o results/out.csv

# should create directory results and write a file with a name similar to music_box_20241108_093604.csv
music_box -e Analytical --output-format csv -o results/

# should create directory results and write a file with a name similar to music_box_20241108_093604.nc
music_box -e Analytical --output-format netcdf -o results/

@montythind montythind merged commit ea7e290 into Allow_netcdf_output_238 Nov 8, 2024
4 checks passed
@montythind montythind deleted the output_updates branch November 8, 2024 20:03
montythind added a commit that referenced this pull request Nov 12, 2024
* netcdf

* fixed comments

* one file

* added unit tests

* document

* added example

* edit readme

* lowercase

* added additional logic:

* changing how output works, adding tests for output (#274)

* added backticks

* missed ths comment

---------

Co-authored-by: Kyle Shores <[email protected]>
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.

2 participants