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

Genuary: 2023 artwork showcase #761

Merged
merged 19 commits into from
Feb 7, 2023
Merged

Genuary: 2023 artwork showcase #761

merged 19 commits into from
Feb 7, 2023

Conversation

EthanThatOneKid
Copy link
Owner

@EthanThatOneKid EthanThatOneKid commented Jan 27, 2023

What changed?

  • Add common genuary-page.svelte component
  • Add Placekitten data and page for testing
  • Add 2023 data from workflow
  • Add 2023 showcase page

Methodology

How do we get the data deterministically?

Use the pins tool to get the pinned messages from the 2023 Genuary threads in our official club Discord server.

Each day, a workflow runs that opens a new pull request if any new messages were pinned in the 2023 Genuary threads.

The workflow uses the pins tool to render all of the pinned messages from the 2023 Genuary threads as JSON.

- run: |
go run github.com/ethanthatonekid/pins@latest \
get -o /tmp/pins $GUILD_ID "channel_parent_id == $CHANNEL_ID"
env:
GUILD_ID: ${{ secrets.GUILD_ID }}
CHANNEL_ID: ${{ secrets.GENUARY_CHANNEL_ID }}
DISCORD_TOKEN: ${{ secrets.GENUARY_DISCORD_TOKEN }}

Next, the workflow runs a script that transforms the rendered pinned messages JSON data into a shape that is understood by the genuary-page.svelte component. Then the workflow saves the transformed JSON into the expected file location.

- id: transform-genuary
run: |
year=$(date +%Y)
echo "year=$year" >> $GITHUB_OUTPUT
node scripts/transform-genuary.js /tmp/pins/*.json \
> "src/routes/(site)/genuary/$year/data.json"
if git diff --exit-code --quiet; then
echo "updated=0" >> $GITHUB_OUTPUT
else
echo "updated=1" >> $GITHUB_OUTPUT
fi

Resolves #760.

@netlify
Copy link

netlify bot commented Jan 27, 2023

Deploy Preview for acmcsuf ready!

Name Link
🔨 Latest commit 374e334
🔍 Latest deploy log https://app.netlify.com/sites/acmcsuf/deploys/63e2b6e24bbacb0008a45a47
😎 Deploy Preview https://deploy-preview-761--acmcsuf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

EthanThatOneKid and others added 3 commits January 30, 2023 21:23
TODO: Write documentation for going about setting up the GitHub repository environment for the `.github/workflows/update_genuary.yaml` file.
@EthanThatOneKid EthanThatOneKid removed the request for review from karnikaavelumani February 1, 2023 06:06
@karnikaavelumani
Copy link
Collaborator

Can you visually convey that the artwork was posted during the Genuary 2023 challenge?

@EthanThatOneKid
Copy link
Owner Author

Can you visually convey that the artwork was posted during the Genuary 2023 challenge?

Resolved in 0f0e2f8.

Attempting to resolve this error:

```
/home/runner/work/acmcsuf.com/acmcsuf.com/src/routes/(site)/genuary/2023/+page.svelte:8:13
Error: Property 'pieces' is missing in type '{ [x: string]: any; }' but required in type 'CollagePageData'. (ts)

<GenuaryPage {data} year="2023" />
```
@EthanThatOneKid EthanThatOneKid marked this pull request as ready for review February 2, 2023 19:54
@EthanThatOneKid EthanThatOneKid enabled auto-merge (squash) February 2, 2023 19:57
@EthanThatOneKid EthanThatOneKid added this to the v5.0 milestone Feb 2, 2023
@EthanThatOneKid
Copy link
Owner Author

EthanThatOneKid commented Feb 2, 2023

Future optimization: Convert Discord media into a more optimized, consistent format such as webm.

Copy link
Collaborator

@karnikaavelumani karnikaavelumani left a comment

Choose a reason for hiding this comment

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

Thank you for initiating an exciting challenge for students to partake in. There are so many different artworks displayed perfectly. I understand there are a couple of bugs that can be fixed over time. Approving to see its performance in production.

@EthanThatOneKid EthanThatOneKid merged commit b80d3c2 into main Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Genuary: Artwork showcase
2 participants