Skip to content

Conversation

@krowvin
Copy link
Collaborator

@krowvin krowvin commented Dec 6, 2025

Add commands for TS Group

Leans into #35

Hopefully can re-use the commands/methods to call the TS Group to then create those timeseries for the init command groups

Draft? Would like to setup tests before adding this into the main branch
Tests have been PRd, future discussion on how much testing to be done. Submitting for now.

@krowvin krowvin linked an issue Dec 6, 2025 that may be closed by this pull request
@krowvin krowvin requested a review from Enovotny December 10, 2025 21:47
@krowvin krowvin marked this pull request as ready for review December 10, 2025 21:48
@Enovotny
Copy link
Collaborator

@krowvin I am not fully seeing the utility to this? when would someone use this vs just using cwms-vue to edit a time series group or simply using the cwms-python commands to read and copy to another database? I think this adds a lot of unneeded commands. If we keep going down this route we would just have a repeat of cwms-python from the command line which I don't think is needed.

@krowvin
Copy link
Collaborator Author

krowvin commented Jan 13, 2026

The idea is to be able to retrieve a TS group for more automated means via shell. CWMS-python requires to you write the code, but with this you can provide a few cmd line args to get a response.

Alternatively you could manually type out a curl command to get the same result.

Something like

cwms-cli timeseries group ...etc --out-file=tsgroup.json && cwms-cli init timeseries group --in-file

Was attempting to make these calls more granular like a form of Lego. You can pick and chose what goes in where/why.

While everyone could write a curl command to do the same. This lets you do it even easier. But I see your point about potentially repeating.

I think of cwms-cli as a command line wrapper around cwms-python and all the convivences that can provide in bash scripting.

If you do not see the merit I am willing to close and revisit later to work on more pressing issues! I had just planned on using it to load TS groups that I could then use with the init scripts. This just made it like the Lego I mentioned above. (Use it for anything, not just init)

@Enovotny
Copy link
Collaborator

The idea is to be able to retrieve a TS group for more automated means via shell. CWMS-python requires to you write the code, but with this you can provide a few cmd line args to get a response.

Alternatively you could manually type out a curl command to get the same result.

Something like

cwms-cli timeseries group ...etc --out-file=tsgroup.json && cwms-cli init timeseries group --in-file

Was attempting to make these calls more granular like a form of Lego. You can pick and chose what goes in where/why.

While everyone could write a curl command to do the same. This lets you do it even easier. But I see your point about potentially repeating.

I think of cwms-cli as a command line wrapper around cwms-python and all the convivences that can provide in bash scripting.

If you do not see the merit I am willing to close and revisit later to work on more pressing issues! I had just planned on using it to load TS groups that I could then use with the init scripts. This just made it like the Lego I mentioned above. (Use it for anything, not just init)

I understand the thinking. I just think we have to make sure that there is a clear need to place into cwms-cli. blobs there is a need for saving blobs, USGS scripts there is a need... init script there is a need ect. I am not sure the need here. I will reuse some of the code in the init for loading time series groups. We can definitely keep the branch in case we see a need for something like this. For maintenance purposes we need to keep this repo focused at the moment.

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.

Time Series Group CRUD

3 participants