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

New CLI Options for Copy and Extract Info #230

Closed
wants to merge 10 commits into from
Closed

Conversation

markspec
Copy link
Contributor

@markspec markspec commented Jun 21, 2023

Resolves #229 and closes #45. New CLI tools for:

mdio utility copy - this will facilitate users creating new files

mdio utility info - this will facilitate users get a quick look at the grid metadata and stats for a file

@codecov-commenter
Copy link

codecov-commenter commented Jun 21, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (c236b09) 84.32% compared to head (3dcc7b0) 84.71%.
Report is 1 commits behind head on main.

Files Patch % Lines
src/mdio/commands/utility.py 86.66% 4 Missing and 2 partials ⚠️
src/mdio/__main__.py 75.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #230      +/-   ##
==========================================
+ Coverage   84.32%   84.71%   +0.38%     
==========================================
  Files          46       47       +1     
  Lines        2194     2263      +69     
  Branches      349      373      +24     
==========================================
+ Hits         1850     1917      +67     
+ Misses        301      299       -2     
- Partials       43       47       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tasansal tasansal changed the title 229 cp New CLI Options for Copy and Extract Info Jun 21, 2023
@tasansal tasansal self-requested a review June 21, 2023 20:26
@tasansal tasansal added the enhancement New feature or request label Jun 21, 2023
@tasansal
Copy link
Collaborator

We should keep the commands as root level and not use a click group. Aka. remove the utility group.

So they can be executed like:

mdio copy ... or mdio info ...

Hacky way to do it would be to put it in the __main__.py; but I'm not opposed to that since these are always going to be at file level. If we can find a way to add a root level command using the plugin way, that would be even nicer.

@tasansal
Copy link
Collaborator

is this ready for review?

@markspec
Copy link
Contributor Author

@tasansal, I thought it was ready before I went on vacation. Have you recently added the safety 3.11 check?

@tasansal
Copy link
Collaborator

@tasansal, I thought it was ready before I went on vacation. Have you recently added the safety 3.11 check?

Rebased onto main recently; it seems like we need to upgrade cryptography dependency. I'll figure that out before merging.

Copy link
Collaborator

@tasansal tasansal left a comment

Choose a reason for hiding this comment

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

there are some changes that need to be made, commented them separately.

src/mdio/__main__.py Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
src/mdio/commands/utility.py Outdated Show resolved Hide resolved
src/mdio/commands/utility.py Outdated Show resolved Hide resolved
tests/test_main.py Outdated Show resolved Hide resolved
@tasansal
Copy link
Collaborator

tasansal commented Oct 5, 2023

@markspec will you have a chance to work on this or should I take a stab at changes I proposed?

@markspec
Copy link
Contributor Author

markspec commented Oct 5, 2023

@markspec will you have a chance to work on this or should I take a stab at changes I proposed?

I should have time to resolve this afternoon.

@markspec
Copy link
Contributor Author

markspec commented Oct 5, 2023

@markspec will you have a chance to work on this or should I take a stab at changes I proposed?

I should have time to resolve this afternoon.

@markspec will you have a chance to work on this or should I take a stab at changes I proposed?

I should have time to resolve this afternoon.

Actually, I don't have a good way to work on this until #277 is closed.

@tasansal tasansal force-pushed the 229-cp branch 2 times, most recently from 27182bb to 40f32f8 Compare November 3, 2023 20:30
@tasansal
Copy link
Collaborator

tasansal commented Nov 3, 2023

@markspec will you have a chance to work on this or should I take a stab at changes I proposed?

I should have time to resolve this afternoon.

@markspec will you have a chance to work on this or should I take a stab at changes I proposed?

I should have time to resolve this afternoon.

Actually, I don't have a good way to work on this until #277 is closed.

merged

ments.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# interactive rebase in progress; onto 2fa8069
# Last commands done (3 commands done):
#    pick 7db1c77 Updates to pass pre-commit.
#    pick 9197e4e Bug fix and log statements.
# Next commands to do (2 remaining commands):
#    pick f382208 Updatest to resolve conflicts with changes related to floating point headers for indexing.
#    pick 6961e1d Fix pre-commit linting.
# You are currently rebasing branch 'main' on '2fa8069'.
#
# Changes to be committed:
#	modified:   src/mdio/segy/utilities.py
#	modified:   tests/integration/test_segy_import_export.py
#
# Untracked files:
#	.devcontainer_bck/Dockerfile
#	.devcontainer_bck/devcontainer.json
#	.devcontainer_bck/post-install.sh
#	.gitignore_bck
#	TEST.md
#	debugging/0__6372_PREPNODMLT.LIBRARY_2.mdio.jpg
#	debugging/6372_export.py
#	debugging/6372_ram_usage.csv
#	debugging/6372_ram_usage.csv_bck
#	debugging/Debug.md
#	debugging/None
#	debugging/docker_env/bin/Activate.ps1
#	debugging/docker_env/bin/activate
#	debugging/docker_env/bin/activate.csh
#	debugging/docker_env/bin/activate.fish
#	debugging/docker_env/bin/dask
#	debugging/docker_env/bin/dask-scheduler
#	debugging/docker_env/bin/dask-ssh
#	debugging/docker_env/bin/dask-worker
#	debugging/docker_env/bin/doesitcache
#	debugging/docker_env/bin/dul-receive-pack
#	debugging/docker_env/bin/dul-upload-pack
#	debugging/docker_env/bin/dulwich
#	debugging/docker_env/bin/easy_install
#	debugging/docker_env/bin/easy_install-3.8
#	debugging/docker_env/bin/f2py
#	debugging/docker_env/bin/f2py3
#	debugging/docker_env/bin/f2py3.8
#	debugging/docker_env/bin/fonttools
#	debugging/docker_env/bin/jsonschema
#	debugging/docker_env/bin/keyring
#	debugging/docker_env/bin/pip
#	debugging/docker_env/bin/pip3
#	debugging/docker_env/bin/pip3.8
#	debugging/docker_env/bin/pkginfo
#	debugging/docker_env/bin/poetry
#	debugging/docker_env/bin/py-spy
#	debugging/docker_env/bin/pyftmerge
#	debugging/docker_env/bin/pyftsubset
#	debugging/docker_env/bin/pyproject-build
#	debugging/docker_env/bin/python
#	debugging/docker_env/bin/python3
#	debugging/docker_env/bin/ttx
#	debugging/docker_env/bin/virtualenv
#	debugging/docker_env/lib64
#	debugging/docker_env/share/man/man1/ttx.1
#	debugging/docker_env/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/appdirs-1.4.3-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/certifi-2019.11.28-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/chardet-3.0.4-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/colorama-0.4.3-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/contextlib2-0.6.0-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/distlib-0.3.0-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/distro-1.4.0-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/html5lib-1.0.1-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/idna-2.8-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/ipaddr-2.2.0-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/lockfile-0.12.2-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/msgpack-0.6.2-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/packaging-20.3-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/pep517-0.8.2-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/pip-20.0.2-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/progress-1.5-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/pyparsing-2.4.6-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/requests-2.22.0-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/retrying-1.3.3-py2.py3-none-any.whl
#	debugging/docker_env/share/python-wheels/setuptools-44.0.0-py2.py3-none-any.whl
#	deb
@tasansal
Copy link
Collaborator

tasansal commented Mar 6, 2024

@markspec since we refactored mainline CLI in #362 this will need a major overhaul. I'll take it and fix it, don't worry about it for now.

@tasansal tasansal mentioned this pull request Mar 7, 2024
@tasansal
Copy link
Collaborator

tasansal commented Mar 7, 2024

Continuing this at #364 due to complications here due to refactoring.

@tasansal tasansal closed this Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add command line utility for copying mdio files Basic SEG-Y information dump options in CLI
3 participants