Skip to content

feat: allow for line return tsid parsing#230

Open
msweier wants to merge 1 commit into
mainfrom
feat/load_lr
Open

feat: allow for line return tsid parsing#230
msweier wants to merge 1 commit into
mainfrom
feat/load_lr

Conversation

@msweier

@msweier msweier commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Allow for load timeseries data to use a line return as tsid parsing so you can cut and paste tsids from cwms-vue

@msweier msweier requested review from Enovotny and krowvin as code owners July 6, 2026 19:45
ts_ids = None
if ts_id:
ts_ids = [item.strip() for item in ts_id.split(",") if item.strip()]
ts_ids = [item.strip() for item in re.split(r"[,\r\n]+", ts_id) if item.strip()]

@krowvin krowvin Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just making a one-off comment here that carriage return is typically windows. But I suspect these would always be pasted from windows?

And noting it would probably be this logic?

, or \r or \n

@msweier msweier Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but just trying to cover the bases. And yes that is the correct logic. It will split any combination of commas, /r, or /n. The + will treat any consecutive delimiters (like \r\n) as one.

Tested , and /r locally.

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