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

Events feed #2495

Merged
merged 10 commits into from
Aug 1, 2024
Merged

Events feed #2495

merged 10 commits into from
Aug 1, 2024

Conversation

ishar19
Copy link
Contributor

@ishar19 ishar19 commented Jun 8, 2024

Resolves #2392

Creating a new PR with updated logic

@ishar19 ishar19 mentioned this pull request Jun 8, 2024
@ishar19
Copy link
Contributor Author

ishar19 commented Jun 8, 2024

image

Copy link
Collaborator

@cuihtlauac cuihtlauac left a comment

Choose a reason for hiding this comment

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

Minor changes

dune Outdated Show resolved Hide resolved
dune Outdated Show resolved Hide resolved
tool/ood-gen/lib/event.ml Outdated Show resolved Hide resolved
tool/ood-gen/lib/event.ml Outdated Show resolved Hide resolved
tool/ood-gen/lib/event.ml Outdated Show resolved Hide resolved
tool/ood-gen/lib/event.ml Outdated Show resolved Hide resolved
tool/ood-gen/lib/event.ml Outdated Show resolved Hide resolved
@ishar19
Copy link
Contributor Author

ishar19 commented Jun 10, 2024

Sure thing, will update asap, AFK rn

Copy link
Collaborator

@cuihtlauac cuihtlauac left a comment

Choose a reason for hiding this comment

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

Formatting

tool/ood-gen/lib/event.ml Outdated Show resolved Hide resolved
Copy link
Collaborator

@cuihtlauac cuihtlauac left a comment

Choose a reason for hiding this comment

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

Thanks @ishar19, this is nice. I've committed the trivial stuff. Two issues remain

  • published_date is not set to the right value
  • Date processing may have useless steps

tool/ood-gen/lib/event.ml Outdated Show resolved Hide resolved
in
Syndic.Atom.entry ~id ~authors
~title:(Syndic.Atom.Text (log.title ^ " " ^ start_date_str))
~updated:start_date
Copy link
Collaborator

Choose a reason for hiding this comment

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

The event start date should not be used here. The updated date is when the event announcement is created or updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh sure, I'm in my uni rn for an exam, will check back later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cuihtlauac i checked the event feed markdown files, there isn't any updated date field
should i put a conditional whether when updated is present to use that or leave it as it is, thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

For 1-shot events, we need an additional field in Event.t to hold that information. When all is built, using the function decode, we must initialize it with the file's last write time on the markdown.

For recurring events, it's trickier. We have to check in the RSS spec if it is allowed to skip that field.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to research whether we can omit the field in recurring events or not but couldn't find anything substantial, will need some help here

Copy link
Collaborator

Choose a reason for hiding this comment

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

A possible solution could be to use the filesystem information for one-shot events and remove recurring events from the feed. Does it make sense to you?

tool/ood-gen/lib/event.ml Show resolved Hide resolved
tool/ood-gen/lib/event.ml Show resolved Hide resolved
tool/ood-gen/lib/event.ml Outdated Show resolved Hide resolved
tool/ood-gen/lib/event.ml Outdated Show resolved Hide resolved
tool/ood-gen/lib/event.ml Outdated Show resolved Hide resolved
Comment on lines 152 to 96
^ ":00Z"
let id = Uri.of_string (log.slug ^ " " ^ start_date_str) in
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ishar19 : please fix the syntax error here

in
Syndic.Atom.entry ~id ~authors
~title:(Syndic.Atom.Text (log.title ^ " " ^ start_date_str))
~updated:start_date
Copy link
Collaborator

Choose a reason for hiding this comment

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

For 1-shot events, we need an additional field in Event.t to hold that information. When all is built, using the function decode, we must initialize it with the file's last write time on the markdown.

For recurring events, it's trickier. We have to check in the RSS spec if it is allowed to skip that field.

@ishar19
Copy link
Contributor Author

ishar19 commented Jun 24, 2024

A possible solution could be to use the filesystem information for one-shot events and remove recurring events from the feed. Does it make sense to you?

Can you please explain "filesystem information"
I get the removal of recurring events part

@cuihtlauac
Copy link
Collaborator

Can you please explain "filesystem information" I get the removal of recurring events part

File modification information. Right now we're using Bos.OS.File.read to read the Yaml files. You could use BOS.OS.Path.stat to get the Unix.stats which contains the file last modification date

@ishar19
Copy link
Contributor Author

ishar19 commented Jun 24, 2024

Can you please explain "filesystem information" I get the removal of recurring events part

File modification information. Right now we're using Bos.OS.File.read to read the Yaml files. You could use BOS.OS.Path.stat to get the Unix.stats which contains the file last modification date

oh alright, thanks,i will look into it

Copy link
Collaborator

@sabine sabine left a comment

Choose a reason for hiding this comment

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

Thanks so much for the contribution @ishar19, merging this now! ✨ 🧡

@sabine sabine merged commit 818c78a into ocaml:main Aug 1, 2024
2 of 3 checks passed
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.

Publish an RSS feed for Events
3 participants