Skip to content

feat: add search#287

Draft
nicfb wants to merge 6 commits into
Kosmorro:featuresfrom
nicfb:feat/add-search
Draft

feat: add search#287
nicfb wants to merge 6 commits into
Kosmorro:featuresfrom
nicfb:feat/add-search

Conversation

@nicfb
Copy link
Copy Markdown
Contributor

@nicfb nicfb commented Oct 9, 2022

Q A
Bug fix? no
New feature? yes
Related issues Fix #237
Has BC-break yes
License GNU AGPL-v3

Checklist:

  • I have updated the manpages

This PR makes use of the event searching capability added to Kosmorrolib in version 1.1. It will allow users to search for specific events in a given date range.

I don't think this is 100% complete yet, but I wanted to get your feedback on it.

only parse from and to dates when searching

toggle between date formats when searching

refactoring

change date formatting for searched events

raise exception when search dates not given
@Deuchnord
Copy link
Copy Markdown
Member

Thanks!

I'll be very busy this week, I'll take a look this weekend :)

Copy link
Copy Markdown
Member

@Deuchnord Deuchnord left a comment

Choose a reason for hiding this comment

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

Seems very good to me!

Comment thread kosmorro/__main__.py Outdated
show_graph: bool,
) -> dumper.Dumper:
try:
if search_from is None or search_to is None:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm realizing that if user doesn't provide the --from argument, we could assert that we want to search from the current date by default? What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that makes sense to me!

Comment thread kosmorro/__main__.py Outdated
help=_("The date to begin searching for events."),
)
parser.add_argument(
"--to", type=str, default=None, help=_("The date to end searching for events.")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we make --from optional as proposed, then we should perhaps rename this argument to --until?

@Deuchnord Deuchnord linked an issue Dec 21, 2023 that may be closed by this pull request
@nicfb
Copy link
Copy Markdown
Contributor Author

nicfb commented Jan 4, 2025

Hello! Sorry, I know it's been quite a while. I just noticed this was still open. Could you remind me what the status of this was? Please let me know if I can help close this out.

@Deuchnord
Copy link
Copy Markdown
Member

Hey @nicfb, sorry for the late answer, currently having some personal issues I have to take care of ^^

I'll check and merge your PR as soon as possible to unblock this :)

@nicfb
Copy link
Copy Markdown
Contributor Author

nicfb commented Jan 11, 2025

No worries at all. I just wanted to make sure it wasn't something on my end that needed to be changed. Please let me know if I can help! I'm hoping to have some more free time this year to contribute if needed.

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.

Search for events

2 participants