Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/webpack-dev-middlewa…
Browse files Browse the repository at this point in the history
…re-5.3.4
  • Loading branch information
rcantin-w committed Oct 2, 2024
2 parents 6b7f2cf + f9c92f8 commit f327b66
Show file tree
Hide file tree
Showing 12 changed files with 6,031 additions and 3,407 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.15.0
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These are default codeowners, later rules take precedence
* @wellcomecollection/developers
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@

Wellcome Collection's developer portal, built using [Docusaurus 2](https://docusaurus.io/).

### Installation
## Installation

```
$ yarn
```

### Local Development
## Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build
## Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment
## Deployment

Using SSH:

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/05-working-with-snapshots-of-the-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[View on GitHub](https://github.com/wellcomecollection/developers.wellcomecollection.org/blob/dependabot/npm_and_yarn/webpack-dev-middleware-5.3.4/notebooks/05-working-with-snapshots-of-the-api.ipynb) | [Run in Google Colab](https://colab.research.google.com/github/wellcomecollection/developers.wellcomecollection.org/blob/dependabot/npm_and_yarn/webpack-dev-middleware-5.3.4/notebooks/05-working-with-snapshots-of-the-api.ipynb)

As we saw at the end of the last notebook, the API limits its responses to 10,000 total results - after that point, users are directed to work with the snapshots. For example, making a request to <https://api.wellcomecollection.org/catalogue/v2/works?pageSize=100&page=101> gives us:
As we saw at the end of the last notebook, the API limits its responses to 10,000 total results - after that point, users are directed to work with the snapshots. For example, making a request to [https://api.wellcomecollection.org/catalogue/v2/works?pageSize=100&page=101](https://api.wellcomecollection.org/catalogue/v2/works?pageSize=100&page=101) gives us:

```json
{
Expand All @@ -28,7 +28,7 @@ import gzip
import io
```

The urls for the snapshots can be found at <https://developers.wellcomecollection.org/docs/datasets>. We're going to work with the `works` snapshot, but all of the logic which follows should be extendable to the images snapshot on that page too!
The urls for the snapshots can be found at [https://developers.wellcomecollection.org/docs/datasets](https://developers.wellcomecollection.org/docs/datasets). We're going to work with the `works` snapshot, but all of the logic which follows should be extendable to the images snapshot on that page too!

Let's start by establishing the url for the compressed snapshot file, and the path where the data is going to be saved.

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/06-visualising-the-collection-on-a-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In this notebook, we're going to use a secondary API to visualise the geographic

The collection contains place names in the `production` field, which describes the time, place, and agents involved in the creation of the work. If we can turn those place names into coordinates, we can visualise the geographical extent of the collection on a map.

We'll use the API at <https://geocode.maps.co/> to handle the complicated geocoding for us.
We'll use the API at [https://geocode.maps.co/](https://geocode.maps.co/) to handle the complicated geocoding for us.


```python
Expand Down
94 changes: 46 additions & 48 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
import { themes } from "prism-react-renderer";

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand All @@ -25,12 +23,12 @@ const config = {
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
remarkPlugins: [require("mdx-mermaid")]
remarkPlugins: [require("mdx-mermaid")],
},
theme: {
customCss: require.resolve("./src/css/custom.css")
}
})
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
[
"redocusaurus",
Expand All @@ -39,30 +37,30 @@ const config = {
{
route: "api/catalogue",
spec: "reference/catalogue.yaml",
layout: { title: "Catalogue API" }
layout: { title: "Catalogue API" },
},
{
route: "api/iiif",
spec: "reference/iiif.yaml",
layout: { title: "IIIF APIs" }
layout: { title: "IIIF APIs" },
},
{
route: "api/content",
spec: "reference/content.yaml",
layout: { title: "Content API" }
layout: { title: "Content API" },
},
// This is currently disabled until the documentation can be improved
{
route: "api/text",
spec: "reference/text.yaml",
layout: { title: "Text API" }
}
layout: { title: "Text API" },
},
],
theme: {
primaryColor: "#007868"
}
}
]
primaryColor: "#007868",
},
},
],
],

themeConfig:
Expand All @@ -75,7 +73,7 @@ const config = {
logo: {
alt: "Wellcome Collection",
src: "images/wellcome-collection-black.svg",
srcDark: "images/wellcome-collection-white.svg"
srcDark: "images/wellcome-collection-white.svg",
},
items: [
{
Expand All @@ -86,29 +84,29 @@ const config = {
items: [
{
to: "api/catalogue",
label: "Catalogue"
label: "Catalogue",
},
{
to: "api/iiif",
label: "IIIF"
label: "IIIF",
},
{
to: "api/content",
label: "Content"
}
label: "Content",
},
// Hidden pending improved docs
// {
// to: "api/text",
// label: "Text",
// },
]
],
},
{
href: "https://github.com/wellcomecollection",
position: "right",
label: "GitHub"
}
]
label: "GitHub",
},
],
},
footer: {
style: "dark",
Expand All @@ -118,67 +116,67 @@ const config = {
items: [
{
label: "API Reference",
to: "docs/api"
}
]
to: "docs/api",
},
],
},
{
title: "Get Involved",
items: [
{
label: "Stacks",
href: "https://stacks.wellcomecollection.org"
href: "https://stacks.wellcomecollection.org",
},
{
label: "GitHub",
href: "https://github.com/wellcomecollection"
}
]
href: "https://github.com/wellcomecollection",
},
],
},
{
title: "Contact Us",
items: [
{
label: "Twitter",
href: "https://twitter.com/ExploreWellcome"
href: "https://twitter.com/ExploreWellcome",
},
{
label: "Facebook",
href: "https://www.facebook.com/wellcomecollection"
href: "https://www.facebook.com/wellcomecollection",
},
{
label: "Email",
href: "mailto:[email protected]"
}
]
href: "mailto:[email protected]",
},
],
},
{
title: "More",
items: [
{
label: "Jobs",
href: "https://wellcome.org/jobs"
href: "https://wellcome.org/jobs",
},
{
label: "Privacy",
href: "https://wellcome.org/who-we-are/privacy-and-terms"
href: "https://wellcome.org/who-we-are/privacy-and-terms",
},
{
label: "Wellcome Collection",
href: "https://wellcomecollection.org"
}
]
}
href: "https://wellcomecollection.org",
},
],
},
],
copyright: `Except where otherwise noted, content on this site is licensed under a <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International Licence</a>.`
copyright: `Except where otherwise noted, content on this site is licensed under a <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International Licence</a>.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme
}
theme: themes.vsLight,
darkTheme: themes.vsDark,
},
}),

plugins: []
plugins: [],
};

module.exports = config;
4 changes: 2 additions & 2 deletions notebooks/05-working-with-snapshots-of-the-api.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# 5. Working with snapshots of the API\n",
"\n",
"As we saw at the end of the last notebook, the API limits its responses to 10,000 total results - after that point, users are directed to work with the snapshots. For example, making a request to <https://api.wellcomecollection.org/catalogue/v2/works?pageSize=100&page=101> gives us:\n",
"As we saw at the end of the last notebook, the API limits its responses to 10,000 total results - after that point, users are directed to work with the snapshots. For example, making a request to [https://api.wellcomecollection.org/catalogue/v2/works?pageSize=100&page=101](https://api.wellcomecollection.org/catalogue/v2/works?pageSize=100&page=101) gives us:\n",
"\n",
"```json\n",
"{\n",
Expand Down Expand Up @@ -43,7 +43,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The urls for the snapshots can be found at <https://developers.wellcomecollection.org/docs/datasets>. We're going to work with the `works` snapshot, but all of the logic which follows should be extendable to the images snapshot on that page too!\n",
"The urls for the snapshots can be found at [https://developers.wellcomecollection.org/docs/datasets](https://developers.wellcomecollection.org/docs/datasets). We're going to work with the `works` snapshot, but all of the logic which follows should be extendable to the images snapshot on that page too!\n",
"\n",
"Let's start by establishing the url for the compressed snapshot file, and the path where the data is going to be saved."
]
Expand Down
2 changes: 1 addition & 1 deletion notebooks/06-visualising-the-collection-on-a-map.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"\n",
"The collection contains place names in the `production` field, which describes the time, place, and agents involved in the creation of the work. If we can turn those place names into coordinates, we can visualise the geographical extent of the collection on a map.\n",
"\n",
"We'll use the API at <https://geocode.maps.co/> to handle the complicated geocoding for us."
"We'll use the API at [https://geocode.maps.co/](https://geocode.maps.co/) to handle the complicated geocoding for us."
]
},
{
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "^2.2.0",
"@docusaurus/preset-classic": "^2.2.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"mdx-mermaid": "^1.3.2",
"mermaid": "^9.2.2",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"redocusaurus": "^1.4.0"
"@docusaurus/core": "^3.5.2",
"@docusaurus/preset-classic": "^3.5.2",
"@mdx-js/react": "^3.0.1",
"clsx": "^2.1.1",
"mdx-mermaid": "^2.0.1",
"mermaid": "^11.2.1",
"prism-react-renderer": "^2.4.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"redocusaurus": "^2.1.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.2.0",
"@tsconfig/docusaurus": "^1.0.6",
"typescript": "^4.8.4"
"@docusaurus/module-type-aliases": "^3.5.2",
"@tsconfig/docusaurus": "^2.0.3",
"typescript": "^5.6.2"
},
"browserslist": {
"production": [
Expand Down
2 changes: 1 addition & 1 deletion scripts/convert_notebooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -o verbose

root=$(git rev-parse --show-toplevel)

# delete everything in the docs/exaples folder
# delete everything in the docs/examples folder
rm -rf $root/docs/examples/*.md

# strip output from notebooks
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
}
},
"exclude": ["/**/node_modules", "./build"],
}
Loading

0 comments on commit f327b66

Please sign in to comment.