Skip to content
This repository was archived by the owner on May 3, 2022. It is now read-only.

Commit f6ad7df

Browse files
committed
update readme, add infra doc, change to UTC+10
1 parent a52bd57 commit f6ad7df

File tree

7 files changed

+126
-34
lines changed

7 files changed

+126
-34
lines changed

README.md

+45-21
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,67 @@
1-
# PyConline AU 2020 website
1+
# PyConline AU 2021 website
22

3-
To build this website, you will need the following:
3+
This website is generated using [statik](https://github.com/thanethomson/statik) with automatic deployments by [Netlify](https://www.netlify.com/)
44

5-
- **Python 3.7** installed and activated.
6-
- **Node.js** and **Yarn** installed.
7-
- **Poetry** installed; see [the installation documentation](https://python-poetry.org/docs/#installation).
5+
For more information, see [infrastructure.md](infrastructure.md)
86

9-
Then:
7+
## Submitting changes
108

11-
- Run `poetry install`. Poetry will create a virtualenv for you.
12-
- Run `yarn install`.
13-
- Run `poetry run supervisord`. Supervisor will start up the two processes you'll need for local development: `parcel` (to build frontend static assets) and `statik` (to build the site itself).
9+
Pull requests submitted to this repo automatically generate change previews using [Netlify](https://www.netlify.com/). Click the "**deploy/netlify**" check link to see your preview.
1410

15-
From there, the [Statik documentation](https://github.com/thanethomson/statik/wiki) will be the place to look for most things.
11+
## Local development
1612

17-
Deployment is automated, and runs on Netlify; see the `netlify.toml` for details. When you file a pull request against this repo, Netlify will build the site (provided the original branch is also inside this repo; sorry, folks outside the core team). A "check" will come up with the name **deploy/netlify**; click Details next to it to go to the preview for that PR.
13+
If your change is larger and you require a local development environment you will require a number of programs.
1814

19-
## Timezones!
15+
Links provided favour macOS using [Homebrew](https://brew.sh/), but will refer to general download information as well.
2016

21-
It turns out that, regrettably, the world does not run entirely on the `Australia/Adelaide` timezone. To accommodate those who insist on using whole-hour UTC offsets, all times should be written like this:
17+
* **[Python 3.7](https://www.python.org/downloads/)** minimum
18+
* we recommend installing via [pyenv](https://github.com/pyenv/pyenv) ([brew](https://formulae.brew.sh/formula/pyenv) or [download](https://github.com/pyenv/pyenv#installation))
19+
* **[Node.js](https://nodejs.org/en/)** ([brew](https://formulae.brew.sh/formula/node) or [download](https://nodejs.org/en/download/))
20+
* **[Poetry](https://python-poetry.org)** ([brew](https://formulae.brew.sh/formula/poetry) or [downoad](https://python-poetry.org/docs/#installation))
21+
22+
Once installed, fork this repo and clone, then to install this codebase's dependencies:
23+
24+
```shell
25+
poetry install # python dependencies, creates virtualenv for you
26+
yarn install # javascript dependencies
27+
```
28+
29+
Finally, start the local webserver:
30+
31+
```shell
32+
poetry run supervisord
33+
```
34+
35+
## Changes from previous years
36+
37+
2021 is running with a home timezone of "+10:00". It still uses some of the [timezone hacks](https://github.com/pyconau/2020-website#timezones) from 2020, but without the half hour offset.
38+
39+
However, all times should still be written as completely as possible.
2240

2341
```
24-
<time datetime="2020-07-16T08:30+09:30">Thursday 16 July, 8:30am ACST</time>
42+
<time datetime="2021-07-16T08:00+10:00">
43+
Friday 16 July, 8:00am AEST
44+
</time>
2545
```
2646

27-
The site has some JavaScript that will pick this up, and if the user's timezone differs from the one in the timestamp, append the local time. (For instance, they might see _Thursday 16 July, 8:30am ACST (9:00am AEST)_ or _Thursday 16 July, 8:30am ACST (Wed, 7:00pm ET)_.)
47+
The site has some JavaScript that will pick this up, and if the user's timezone differs from the one in the timestamp, append the local time. (For instance, they might see _Friday 16 July, 8:00am AEST (10:00am NZST)_ or _Friday 16 July, 8:00am ACST (Thurs, 7:00pm ET)_.)
2848

2949
This works in HTML and Markdown (since Markdown can have arbitrary HTML in most places).
3050

31-
Note that the colon between the offset hours and minutes **must be present** (e.g. `+0930` won't work)!
51+
Note that the colon between the offset hours and minutes **must be present** (e.g. `+1000` won't work)!
3252

33-
## Local development issues
53+
## Issues with local development
3454

35-
Are you on macOS Catalina and getting hundreds of `API_UNAVAILABLE`/`clang` issues when running `poetry install`?
55+
### macOS issues with `API_UNAVAILABLE`
3656

37-
Try [this tip](https://github.com/gorakhargosh/watchdog/issues/628#issuecomment-581480649):
57+
If you are running macOS Catalina and getting hundreds of `API_UNAVAILABLE`/`clang` issues when running `poetry install`, try [this tip](https://github.com/gorakhargosh/watchdog/issues/628#issuecomment-581480649):
3858

39-
- Check how many SDKs you have installed in `/Library/Developer/CommandLineTools/SDKs`.
40-
- If you have both `MacOSX10.14.sdk` and `MacOSX10.15.sdk`:
59+
- Check how many SDKs you have installed:
60+
61+
```
62+
ls /Library/Developer/CommandLineTools/SDKs
63+
```
64+
- If you have both `MacOSX10.14.sdk` and `MacOSX10.15.sdk`, remove the older version:
4165

4266
```
4367
rm -rf /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk

config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
project-name: PyCon AU 2020
1+
project-name: PyCon AU 2021
22
base-path: /
33
context:
44
dynamic:

data/Page/backstage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There are three systems you'll have access to throughout the course of the event
1616

1717
You'll gain access to both Discord and Venueless through your ticket! The order confirmation screen has all the links you need to get in.
1818

19-
* **If you haven't redeemed your ticket yet**, look for an email with the subject *[PyConline AU 2020] Your speaker ticket for PyConline AU 2020*, sent around <time datetime="2020-08-19T23:00:00+0930">Wednesday 19 August, 11pm ACST</time>. Then, follow the prompts to redeem your ticket.
19+
* **If you haven't redeemed your ticket yet**, look for an email with the subject *[PyConline AU 2020] Your speaker ticket for PyConline AU 2020*, sent around TODO ADD DATE>. Then, follow the prompts to redeem your ticket.
2020
* **If you have redeemed your ticket already**, look for an email with the subject *[PyConline AU 2020] Your order*, sent around the time you redeemed it.
2121

2222

frontend/backstage.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ const TIME_COMPACT = {
2323
timeZoneName: "short",
2424
hour12: false,
2525
}
26-
const TIME_COMPACT_ADL = { ...TIME_COMPACT, timeZone: "Australia/Adelaide" }
26+
const TIME_COMPACT_MEL = { ...TIME_COMPACT, timeZone: "Australia/Melbourne" }
2727
const TIME_HRMIN = {
2828
hour: "2-digit",
2929
minute: "2-digit",
3030
timeZoneName: "short",
3131
hour12: false,
3232
}
33-
const TIME_HRMIN_ADL = { ...TIME_HRMIN, timeZone: "Australia/Adelaide" }
33+
const TIME_HRMIN_MEL = { ...TIME_HRMIN, timeZone: "Australia/Melbourne" }
3434

3535
function clockTick(output: HTMLElement) {
3636
const now = DateTime.local()
3737
output.innerText = now
38-
.setZone("Australia/Adelaide")
39-
.toLocaleString(TIME_COMPACT_ADL)
38+
.setZone("Australia/Melbourne")
39+
.toLocaleString(TIME_COMPACT_MEL)
4040
setTimeout(clockTick.bind(null, output), 1000 - (now.toMillis() % 1000))
4141
}
4242

@@ -73,7 +73,7 @@ export default function () {
7373
true,
7474
) as HTMLElement
7575
rtt.querySelector(".reltime-fixed")!.innerHTML = `${dt.toLocaleString(
76-
TIME_HRMIN_ADL,
76+
TIME_HRMIN_MEL,
7777
)} (${dt.toLocaleString(TIME_HRMIN)})`
7878
const relative = rtt.querySelector(".reltime-relative")
7979
setInterval(() => {

frontend/program.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { DateTime, LocalZone, DateTimeFormatOptions } from "luxon"
22

3-
const ZONE = "Australia/Adelaide"
3+
const ZONE = "Australia/Melbourne"
44
const TIME_ONLY: DateTimeFormatOptions = {
55
hour: "numeric",
66
minute: "numeric",
77
}
88
const TIME_ONLY_DIFF_DAY = { ...TIME_ONLY, weekday: "short" }
99
const TIME_ONLY_TZ = { ...TIME_ONLY, timeZoneName: "short" }
10-
const TIME_ONLY_ACST = { ...TIME_ONLY, timeZone: "Australia/Adelaide" }
10+
const TIME_ONLY_AEST = { ...TIME_ONLY, timeZone: "Australia/Melbourne" }
1111

1212
const HOUR_MARKER = { hour: "numeric" }
1313
const HOUR_MARKER_DIFF_DAY = { ...HOUR_MARKER, weekday: "short" }
@@ -26,8 +26,8 @@ export default function scheduleInit(schedule: HTMLElement) {
2626
const startLocal = start.toLocal()
2727
const startLocalIsDiffDay = startLocal.weekday !== start.weekday
2828
time.innerText = `${start.toLocaleString(
29-
TIME_ONLY_ACST,
30-
)}\u2013${end.toLocaleString(TIME_ONLY_ACST)} (${startLocal.toLocaleString(
29+
TIME_ONLY_AEST,
30+
)}\u2013${end.toLocaleString(TIME_ONLY_AEST)} (${startLocal.toLocaleString(
3131
startLocalIsDiffDay ? TIME_ONLY_DIFF_DAY : TIME_ONLY,
3232
)}\u2013${end.toLocal().toLocaleString(TIME_ONLY_TZ)})`
3333
console.log(start, end)
@@ -77,7 +77,7 @@ export default function scheduleInit(schedule: HTMLElement) {
7777
schedule.appendChild(newRule)
7878
})
7979
const acstLabel = document.createElement("s-tz-header")
80-
acstLabel.innerText = "ACST"
80+
acstLabel.innerText = "AEST"
8181
schedule.appendChild(acstLabel)
8282
const localLabel = document.createElement("s-tz-header")
8383
localLabel.classList.add("local")

infrastructure.md

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Infrastructure
2+
3+
[Statik](https://github.com/thanethomson/statik) uses data models to assist in developing a staticly generated website.
4+
5+
6+
## Models
7+
8+
A number of models are defined in this repo. For each model, there are multiple files separated into folders of like type:
9+
10+
* `views/`
11+
* defines a path, context (all elements of a model (below), or a single model instance), and a template (below).
12+
* `templates/`
13+
* defined using jinja templating
14+
* `models/`
15+
* defines a model with various keys and datatypes, in yaml
16+
* `data/`
17+
* defintes instances of a model, using the model datatypes, in yaml
18+
19+
20+
The currently defined models are:
21+
22+
* `Page`: Static pages (the most common for the structure of the wesbite)
23+
* `News`: posts in `/news`
24+
* `Person`: people, usually organisers or speakers
25+
* `Track`: a track of talks, with one or more organisers defined as a `Person`.
26+
* `Session`: a talk, with one or more speakers defined as a `Person`, and a track defined in `Track`.
27+
* `Sponsor`: a sponsor, which may have a workshop
28+
* `Workshop`: a sponsor workshop
29+
* `SpecialSponsor`: a node for additional listings on the Sponsor page.
30+
31+
32+
Full details are always more current in the code.
33+
34+
35+
## Infrastructure
36+
37+
There are some other folders of stuff:
38+
39+
* `assets/`:
40+
* `people/`: avatars of instances of `Person`
41+
* `sponsor-logos`: logos of instances of `Sponsor`
42+
* `diagrams/`, misc: misc images
43+
* `frontend/`: sass (high level CSS) and typescript (high level javascript) things that power the pretty.
44+
*
45+
46+
47+
## Redirects and config as code
48+
49+
Some of these files are important. Of important note:
50+
51+
* `_redirects`: defines domain for annual websites.
52+
* `.github`: defines GitHub actions
53+
* `netlify.toml`: defines page redirects, and build commands
54+
* `config.yaml`: the main page's `Page` definition.
55+
* `package.json` and `yarn.lock`: defines JavaScript dependencies for the front end.
56+
* `pyproject.toml` and `poetry.lock`: defines Python dependencies for the back end.
57+
* `tsconfig.json`: configuration for typescript
58+
* `.pre-commit-config.yaml` and `.prettierrc`: a precommit config to check for linting and other errors before committing (not automatically run)
59+
60+
61+
## Local Infrastructure
62+
63+
If you are developing locally a number of other folders will appear. These are explicitly defined in `.gitignore` and *should not be committed to the repository*.
64+
65+
* `node_modules/`: local JavaScript packages
66+
* `public/`: the locally built version of the website
67+
* `assets/build/`: compiled front-end bits
68+
* `.cache/`: local cache

netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
22
publish = "public/"
33
command = """
4-
export TZ=Australia/Adelaide
4+
export TZ=Australia/Melbourne
55
pip3 install -q poetry &&
66
poetry config virtualenvs.in-project true &&
77
poetry install &&

0 commit comments

Comments
 (0)