Skip to content

Commit

Permalink
Slightly better people info workflow, that doesn't break the local de…
Browse files Browse the repository at this point in the history
…v experience
  • Loading branch information
alex-r-bigelow committed Feb 23, 2024
1 parent c0cb706 commit 90940a8
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- name: Update People Info 🙂 # This pulls the latest info about who is on which Github team
run: |
mkdir localData && gh api graphql -f query='
mkdir data/semiSecretFiles && gh api graphql -f query='
query {
organization(login: "resbazaz") {
teams(first:100) {
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
}
}
}
' > localData/people.json
' > data/semiSecretFiles/people.json
env:
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_READER }}

Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
.quarto
_site
/.quarto/
localData

# semiSecretFiles aren't really secret; they're generated from public GitHub
# data when the website is built. Having a separate directory + only committing
# an example file to the repo is an effort to minimize access to the convenient
# list of detailed ResBaz participants' info. If you find development with
# example data annoying, you can manually download the auto-generated files from
# the published site
data/semiSecretFiles
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
### Technologies used:

- [Quarto](https://nodejs.org/)
- [Eleventy](https://www.11ty.dev/)
- [Alpine.js](https://github.com/alpinejs/alpine)
- [Tailwind CSS](https://tailwindcss.com/)

## Getting Started

Expand Down Expand Up @@ -54,10 +51,10 @@ TODO: Alpine, Tailwind stuff

### Changing how Github builds and deploys the site

TODO: `build.yml`
TODO: document `.github/workflows/build.yml`

Be advised that `src/_data/people.json` in your local respository is just an example file, that will be overwritten by the latest ResBazAZ teams on Github—so to update who is shown, and what teams are shown, you should edit the Github teams, not the JSON file.
Be advised that `localData/people.json` in your local respository is just an example file, that will be overwritten by the latest ResBazAZ teams on Github—so to update who is shown, and what teams are shown, you should edit the Github teams, not the JSON file.

### Reconfiguring the site's infrastructure

TODO: `.eleventy.js`
TODO: document `_quarto.yml`
2 changes: 1 addition & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ format:
resources:
- styles
- images
- localData
- data
toc: true
13 changes: 11 additions & 2 deletions components/randomAvatars.ojs
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
peopleFile = FileAttachment('localData/people.json').json();
/*
see .gitignore for the rationale behind semiSecretFiles
*/
peopleFile = fetch('data/semiSecretFiles/people.json')
.then(response => {
if (response.status === 404) {
return fetch('data/exampleFiles/people.json');
}
return response;
})
.then(response => response.json());

function randomAvatars(teamName) {
console.log(peopleFile, teamName);
const team = peopleFile.data.organization.teams.nodes.find(
(team) => team.name === teamName
);
Expand Down
66 changes: 66 additions & 0 deletions data/exampleFiles/people.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"data": {
"organization": {
"teams": {
"nodes": [
{
"name": "Hacky Hour",
"members": {
"nodes": [
{ "id": "cat" },
{ "id": "mouse" },
{ "id": "squirrel" }
]
}
},
{
"name": "Coffee and Code",
"members": {
"nodes": [{ "id": "dog" }, { "id": "cat" }]
}
}
]
},
"membersWithRole": {
"nodes": [
{
"id": "dog",
"name": "Dog",
"login": "dog",
"bio": "The best dog ever",
"company": "Pets, Inc.",
"avatarUrl": "https://picsum.photos/id/237/200",
"socialAccounts": { "edges": [] }
},
{
"id": "cat",
"name": "Cat",
"login": "cat",
"bio": "wut",
"company": "Pets, Inc.",
"avatarUrl": "https://picsum.photos/id/238/200",
"socialAccounts": { "edges": [] }
},
{
"id": "mouse",
"name": "Mouse",
"login": "mouse",
"bio": "i heart cheese",
"company": "roDENTS",
"avatarUrl": "https://picsum.photos/id/239/200",
"socialAccounts": { "edges": [] }
},
{
"id": "squirrel",
"name": "Squirrel",
"login": "squirrel",
"bio": "you'll never find my acorns",
"company": "roDENTS",
"avatarUrl": "https://picsum.photos/id/240/200",
"socialAccounts": { "edges": [] }
}
]
}
}
}
}
25 changes: 20 additions & 5 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,36 @@ Code Commons also aims to provide the best aspects of workplace culture for peop

[More Info](https://codecommons.net/)

### Women in Data Science

**What**: Women in Data Science (WiDS) Tucson is an independent event organized by the University of Arizona to coincide with the Global WiDS Conference held at Stanford University and an estimated 200+ locations worldwide annually.

The Global WiDS Conference aims to inspire and educate data scientists worldwide, regardless of gender, and to support women in the field. This one-day technical conference provides an opportunity to hear about the latest data science related research and applications in a number of domains, and connect with others in the field.

[More Info](https://widstucson.org/)

### Tucson Python Meetup

**What**: The goal of this group is to encourage more mingling, learning, and sharing ideas within the Tucson Python community. Everybody is welcome, no matter what your level of Python experience. Activities include presentations and workshops on everything from how to use Python to control the lights in your home, to building web applications which can scale to millions of users.

[More Info](https://www.meetup.com/Tucson-Python-Meetup/)

## TODO: finish and delete this stuff
### UX@UA

**What**: UX@UA is a learning community that aims to grow UX expertise at the University of Arizona. We provide a variety of resources including:

- Figure out new quarto actions
- Professional development and networking
- Low-barrier UX tools and techniques

- Add UX@UA
Their aims are for UX enthusiasts of all levels to:

- Fix random avatars widget (see randomAvatars.html for details)... or maybe better: a webhook that auto-updates a gist + auto-republish of the page?
- Feel empowered and inspired
- Develop their skills and toolset
- Connect with UXers in Tucson and beyond

- Fix absolute image paths (resbaz.github.io/website-draft breaks most paths)
[More Info](https://uxua.arizona.edu/)

## TODO: finish and delete this stuff

- Create Who We Are page

Expand Down
5 changes: 0 additions & 5 deletions styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
z-index: -1;
}

nav .text-gray-500:not(:hover),
nav button {
color: white;
}

.split-section {
display: flex;
gap: 1em;
Expand Down

0 comments on commit 90940a8

Please sign in to comment.