Skip to content

Commit 85e1c8c

Browse files
committed
Merge branch 'main' of github.com:HTTPArchive/almanac.httparchive.org into production
2 parents 53b934c + 8bcfcf2 commit 85e1c8c

35 files changed

Lines changed: 1511 additions & 228 deletions

.devcontainer/devcontainer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "Dev Container",
3+
"build": {
4+
"dockerfile": "../src/Dockerfile",
5+
"target": "base",
6+
"context": "../",
7+
"args": {
8+
"SKIPGC": "false"
9+
}
10+
},
11+
"forwardPorts": [
12+
8080
13+
],
14+
"customizations": {
15+
"vscode": {
16+
"settings": {
17+
"python.defaultInterpreterPath": "/usr/local/bin/python",
18+
"python.linting.enabled": true,
19+
"python.linting.pylintEnabled": true
20+
},
21+
"extensions": [
22+
"ms-python.python",
23+
"ms-python.vscode-pylance"
24+
]
25+
},
26+
"codespaces": {
27+
"openFiles": [
28+
"src/README.md"
29+
]
30+
}
31+
},
32+
"onCreateCommand": "cd src && pip install -r requirements.txt && npm install"
33+
}

.github/lighthouse/lighthouse-config-dev.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
"bootup-time": "off",
88
"canonical": "off",
99
"dom-size": "off",
10+
"efficient-animated-content": "off",
1011
"first-contentful-paint": "off",
1112
"first-cpu-idle": "off",
1213
"first-meaningful-paint": "off",
1314
"font-display": "off",
15+
"th-has-data-cells": "off",
1416
"inspector-issues": "off",
1517
"installable-manifest": "off",
1618
"interactive": "off",

.github/lighthouse/lighthouse-config-prod.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
"bf-cache": "off",
1010
"bootup-time": "off",
1111
"dom-size": "off",
12+
"efficient-animated-content": "off",
1213
"first-contentful-paint": "off",
1314
"first-cpu-idle": "off",
1415
"first-meaningful-paint": "off",
1516
"font-display": "off",
17+
"th-has-data-cells": "off",
1618
"inspector-issues": "off",
1719
"installable-manifest": "off",
1820
"interactive": "off",

.github/workflows/code-static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: actions/checkout@v3
3636
- name: Set up Python 3.8
3737
if: ${{ matrix.language == 'python' }}
38-
uses: actions/setup-python@v4.6.0
38+
uses: actions/setup-python@v4.6.1
3939
with:
4040
python-version: '3.8'
4141
- name: Install dependencies

.github/workflows/lintsql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
# Full git history is needed to get a proper list of changed files within `super-linter`
2020
fetch-depth: 0
2121
- name: Set up Python 3.8
22-
uses: actions/setup-python@v4.6.0
22+
uses: actions/setup-python@v4.6.1
2323
with:
2424
python-version: '3.8'
2525
- name: Lint SQL code

.github/workflows/predeploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
node-version: '16'
3939
- name: Set up Python 3.8
40-
uses: actions/setup-python@v4.6.0
40+
uses: actions/setup-python@v4.6.1
4141
with:
4242
python-version: '3.8'
4343
- name: Install Asian Fonts

.github/workflows/test_website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
node-version: '16'
3232
- name: Set up Python 3.8
33-
uses: actions/setup-python@v4.6.0
33+
uses: actions/setup-python@v4.6.1
3434
with:
3535
python-version: '3.8'
3636
- name: Run the website

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# 📕 Web Almanac
22

3-
[![Production Checks GitHub Action](https://github.com/HTTPArchive/almanac.httparchive.org/workflows/Production%20Checks/badge.svg)](https://github.com/HTTPArchive/almanac.httparchive.org/actions?query=workflow%3A%22Production+Checks%22) [![Test Website GitHub Action](https://github.com/HTTPArchive/almanac.httparchive.org/workflows/Test%20Website/badge.svg?branch=main)](https://github.com/HTTPArchive/almanac.httparchive.org/actions?query=workflow%3A%22Test+Website%22) [![Security Headers Rating](https://img.shields.io/security-headers?url=https%3A%2F%2Falmanac.httparchive.org%2Fen%2F2019%2F)](https://securityheaders.com/?q=https%3A%2F%2Falmanac.httparchive.org%2Fen%2F2019%2F&followRedirects=on) [![TLS Observatory](https://img.shields.io/mozilla-observatory/grade-score/almanac.httparchive.org?publish)](https://observatory.mozilla.org/analyze/almanac.httparchive.org)
3+
[![Production Checks GitHub Action](https://github.com/HTTPArchive/almanac.httparchive.org/workflows/Production%20Checks/badge.svg)](https://github.com/HTTPArchive/almanac.httparchive.org/actions?query=workflow%3A%22Production+Checks%22) [![Test Website GitHub Action](https://github.com/HTTPArchive/almanac.httparchive.org/workflows/Test%20Website/badge.svg?branch=main)](https://github.com/HTTPArchive/almanac.httparchive.org/actions?query=workflow%3A%22Test+Website%22) [![TLS Observatory](https://img.shields.io/mozilla-observatory/grade-score/almanac.httparchive.org?publish)](https://observatory.mozilla.org/analyze/almanac.httparchive.org)
44

5-
[![2022 Content Planning](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/20)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/20) [![2022 Analysis Milestone](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/21)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/21) [![2022 Content Writing Milestone](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/22)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/22) [![2022 Launch!](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/23)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/23) [![2021 Content Translation Milestone](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/19)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/19)
5+
[![2022 Content Planning](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/20)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/20) [![2022 Analysis Milestone](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/21)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/21) [![2022 Content Writing Milestone](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/22)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/22) [![2022 Launch!](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/23)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/23) [![Content Translation Milestone](https://img.shields.io/github/milestones/progress/HttpArchive/almanac.httparchive.org/19)](https://github.com/HTTPArchive/almanac.httparchive.org/milestone/19)
66

77
[![Open Dev Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/development)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Adevelopment) [![Open Analysis Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/analysis)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Aanalysis) [![Open Translation Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/translation)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Atranslation) [![Open Writing Pull Requests](https://img.shields.io/github/issues-pr/HTTPArchive/almanac.httparchive.org/writing)](https://github.com/HTTPArchive/almanac.httparchive.org/pulls?q=is%3Apr+is%3Aopen+label%3Awriting)
88

@@ -28,14 +28,11 @@ The Web Almanac is available in the original [English](https://almanac.httparchi
2828

2929
See [our contributing guide](CONTRIBUTING.md). To run the Web Almanac locally please see [src/README.md](src/README.md).
3030

31-
## 2022 Timeline
31+
## Next Web Almanac timeline
3232

33-
- April: forming teams
34-
- May: forming teams / planning content
35-
- June: HTTP Archive crawl / analysis
36-
- August: analysis / writing
37-
- September: analysis / writing
38-
- End of September: launch!
33+
We are [taking a break for 2023](https://github.com/HTTPArchive/almanac.httparchive.org/discussions/33610), but hope to return in future.
34+
35+
In the meantime, enjoy the [2022 edition](https://almanac.httparchive.org) and we're still open to contributions in the form of [translations](https://github.com/HTTPArchive/almanac.httparchive.org/issues?q=is%3Aissue+is%3Aopen+label%3Atranslation), [development](https://github.com/HTTPArchive/almanac.httparchive.org/issues?q=is%3Aissue+is%3Aopen+label%3Adevelopment) or bug fixes.
3936

4037
## Where to find us
4138

src/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
ARG PYVER=3.8
2-
FROM python:${PYVER}
2+
FROM python:${PYVER} as base
33

44
# Enable unbuffered STDOUT logging
55
ENV PYTHONUNBUFFERED=1
66

7-
ARG NODEVER=12.x
7+
ARG NODEVER=16.x
88
RUN curl -sL https://deb.nodesource.com/setup_${NODEVER} | bash -
99

10-
RUN apt update && apt install -y \
11-
nodejs \
12-
&& rm -rf /var/lib/apt/lists/*
10+
RUN apt update && apt install -y nodejs && rm -rf /var/lib/apt/lists/* \
11+
&& /usr/local/bin/python -m pip install --upgrade pip
1312

1413
# Add Google Cloud SDK only if image is built with `--build-arg SKIPGC=false`
1514
ARG SKIPGC=true
1615
RUN $SKIPGC || (echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list \
1716
&& curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
1817
&& apt update && apt install -y google-cloud-sdk && rm -rf /var/lib/apt/lists/*)
1918

19+
FROM base
2020
WORKDIR /app
2121
COPY requirements.txt package*.json ./
2222
RUN pip install -r requirements.txt

src/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Developing the Web Almanac
22

3-
The Web Almanac can be developed on macOS, Windows or Linux. It requires Node v12, Python v3.8 and pip to be installed. Alternatively, use Docker to avoid manually configuring the development environment.
3+
The Web Almanac can be developed on macOS, Windows or Linux. It requires Node v16, Python v3.8 and pip to be installed. You can use Docker to avoid manually configuring the development environment.
4+
It can be quickly deployed as a development container in GitHub Codespaces to develop in cloud:
5+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/HTTPArchive/almanac.httparchive.org?quickstart=1)
46

57
## Style guide
68

@@ -12,7 +14,7 @@ An `.editorconfig` file exists for those using [EditorConfig](https://editorconf
1214

1315
Make sure you run the following commands from within the `src` directory by executing `cd src` first.
1416

15-
Make sure Python (3.8 or above), pip and NodeJS (v12 or above) are installed on your machine.
17+
Make sure Python (3.8 or above), pip and NodeJS (v16 or above) are installed on your machine.
1618

1719
1. If you don't have virtualenv, install it using pip.
1820

@@ -411,7 +413,6 @@ docker container run --rm -it -v "$PWD":/app webalmanac npm run pytest
411413
```
412414
docker container run --rm -it -v "$PWD":/app -v /app/node_modules -p 8080:8080 webalmanac bash
413415
root@[CID]:/app# python main.py
414-
^C
415416
root@[CID]:/app# npm run generate
416417
root@[CID]:/app# npm run pytest
417418
root@[CID]:/app# exit
@@ -428,11 +429,11 @@ docker image build --build-arg PYVER=3.8 --build-arg NODEVER=14.x --build-arg SK
428429
This will depend on your operating system but for MacOS/Linux this would be:
429430

430431
```
431-
docker container run -it --rm -v /app/node_modules -v "$PWD/..":/app -w /app/src --entrypoint=./tools/scripts/run_linter_locally.sh github/super-linter
432+
docker container run -it --rm -v /app/node_modules -v "$PWD/..":/app -w /app/src --entrypoint=./tools/scripts/run_linter_locally.sh github/super-linter:slim-latest
432433
```
433434

434435
And for Windows:
435436

436437
```
437-
docker container run --rm -v /app/node_modules -v %cd%\\..:/app -w /app/src --entrypoint=./tools/scripts/run_linter_locally.sh github/super-linter
438+
docker container run --rm -v /app/node_modules -v %cd%\\..:/app -w /app/src --entrypoint=./tools/scripts/run_linter_locally.sh github/super-linter:slim-latest
438439
```

0 commit comments

Comments
 (0)