Skip to content

Commit e2b169d

Browse files
authored
Merge pull request #68 from SolidLabResearch/cleanup-before-release
Cleanup before release
2 parents 9a8ca98 + 510a458 commit e2b169d

File tree

2 files changed

+47
-47
lines changed

2 files changed

+47
-47
lines changed

README.md

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,59 @@ Table of contents:
1313
* [Templated queries](#templated-queries)
1414
* [Query icons](#query-icons)
1515
* [Representation Mapper](#representation-mapper)
16-
* [Testing with local pods](#testing-with-local-pods)
17-
* [Using a local http proxy](#using-a-local-http-proxy)
16+
* [Using the local pods](#using-the-local-pods)
1817
* [Testing](#testing)
1918
<!-- TOC -->
2019

2120
## Getting Started
2221

23-
After installing, the following steps suffice to install the application:
22+
To install the application:
2423

2524
```bash
2625
npm install
2726
```
2827

29-
after this you can execute
28+
To run the Web application in development mode:
3029

3130
```bash
3231
npm run dev
3332
```
3433

35-
which will start the web application. Now you can browse the displayed URL.
34+
Now you can browse the displayed URL.
3635

37-
If you want to test the default configuration however, you first need to complete the steps
38-
described in [testing with local pods](#testing-with-local-pods) and [using a local http proxy](#using-a-local-http-proxy).
39-
Do each of these in their own separate terminal window.
36+
To see the queries provided in the example configuration `src/config.json` at work,
37+
you also need to activate the supporting resources:
38+
39+
1. In a new terminal window, prepare and start the local pods:
40+
41+
```bash
42+
npm run prepare:pods && npm run start:pods
43+
```
44+
45+
2. In a new terminal window, start the http proxy:
46+
47+
```bash
48+
npm run start:proxy
49+
```
50+
51+
3. In a new terminal window, start a server which denies all CORS headers:
52+
53+
```bash
54+
npm run start:badCors
55+
```
56+
57+
Some queries require a log in.
58+
Log in with the IDP `http://localhost:8080` and the credentials for the user owning the pod named `example` in the file `seeded-pod-config.json`.
4059

4160
## Static build
4261

43-
If you want a static build of the application, execute:
62+
To make a standalone version of the result of this project, you can make a static build and serve it using any webserver. Execute:
4463

4564
```bash
4665
npm run build
4766
```
4867

49-
This will create a static build in the `dist` folder.
68+
The static build appears in the `dist` folder.
5069

5170
## Logging in
5271

@@ -75,26 +94,26 @@ The configuration file follows a simple structure.
7594
"introductionText": "The text that the app shows on the dashboard, which the app also shows when you first open it.",
7695
"queries": [
7796
{
78-
"queryLocation": "path to the query location, relative to "queryFolder"",
97+
"queryLocation": "path to the query location, relative to 'queryFolder'",
7998
"name": "A name for the query",
8099
"description": "Description of the query",
81100
"id": "A unique ID for the query",
82101
"icon": "The key to the icon for the query . This is optional and a default menu icon will be used when left empty.",
83102
"comunicaContext": {
84103
"sources": "Sources over which the query should be executed",
85104
"useProxy": "True or false, whether the query should be executed through the proxy or not. This field is optional and defaults to false.",
86-
...{"any other field that can be used in the Comunica query engine https://comunica.dev/docs/query/advanced/context/"}
105+
... any other field that can be used in the Comunica query engine https://comunica.dev/docs/query/advanced/context/
87106
},
88107
"variables": {
89108
"variableExampleString": ["\"String1\"", "\"String2\""],
90109
"variableExampleUri": ["<https://example.com/uri1>", "<https://example.com/uri2>"]
91110
},
92111
"askQuery": {
93-
"trueText": "The text that is to be shown when the query result is true, only useful for ASK queries.",
94-
"falseText": "The text that is to be shown when the query result is true, only useful for ASK queries."
112+
"trueText": "The text that is to be shown when the query result is true (in ASK queries).",
113+
"falseText": "The text that is to be shown when the query result is false (in ASK queries)."
95114
}
96-
}
97-
...
115+
},
116+
... etc
98117
]
99118
}
100119
```
@@ -166,63 +185,44 @@ They've already got styling matching that of `react-admin` and are easy to use.
166185

167186
`Warning` if you change the record object, the changed will still be present in the next render.
168187

169-
## Testing with local pods
188+
## Using the local pods
170189

171-
To create a local pod with which you can test for example authentication you can follow the following steps:
190+
To support the provided example configuration `src/config.json` and the tests, this repo integrates some local pods.
191+
You can make use of these for your own tests. Follow these steps:
172192

173193
- Add your data and `.acl` files in the `initial-pod-data` folder.
174194
These files will be available in the pod relative to `http://localhost:8080/example/`.
175-
We already added files to support the example queries in the configuration file.
176195
- Prepare the pods by executing `npm run prepare:pods`.
177-
- Start the pods by executing `npm run start:pods`.
178-
- Add your query as described in [the configuration file section](#configuration-file).
179-
We already added some example queries in the default configuration file `src/config.json`.
180-
- Log in with the IDP `http://localhost:8080` and the credentials for the user owning the pod named `example` in the file `seeded-pod-config.json`.
181-
182-
## Using a local http proxy
183-
184-
To use a local http proxy through which the requests will be rerouted execute the following command:
185-
186-
```bash
187-
npm run start:proxy
188-
```
189-
190-
which will start a proxy on port `8000`.
191196

192197
## Testing
193198

194-
For testing we use [Cypress](https://www.cypress.io/).
199+
For testing we use [Cypress](https://www.cypress.io/). To test, follow the next steps:
195200

196-
1. Prepare and start the Community Solid Server with the available pods as explained in the [Testing with local pods section](#testing-with-local-pods).
201+
1. Prepare and start the local pods:
197202

198203
```bash
199204
npm run prepare:pods && npm run start:pods
200205
```
201206

202-
Keep the server running.
203-
204-
2. Start the Web application
207+
2. In a new terminal window, start the Web application:
205208

206209
```bash
207210
npm run dev
208211
```
209212

210-
Also keep this process running.
211-
3. Start the http proxy
213+
3. In a new terminal window, start the http proxy:
212214

213215
```bash
214216
npm run start:proxy
215217
```
216218

217-
4. Start a server which denies all cors header
219+
4. In a new terminal window, start a server which denies all CORS headers:
218220

219221
```bash
220222
npm run start:badCors
221223
```
222224

223-
This process must also be active throughout the tests.
224-
225-
5. Finally, you can execute the tests by running
225+
5. Finally, in a new terminal window, you can execute the tests by running:
226226

227227
```bash
228228
npm run test

src/config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"queryLocation": "idols.rq",
1818
"name": "My idols",
19-
"description": "A simple Test query",
19+
"description": "A simple test query",
2020
"id": "1000",
2121
"comunicaContext": {
2222
"sources": ["http://localhost:8001/example/idols"],
@@ -96,7 +96,7 @@
9696
{
9797
"queryLocation": "musicians_variables.rq",
9898
"name": "Templated query about my favourite musicians",
99-
"description": "In this query you can get a list of my favourite musicians for the genre of your choice",
99+
"description": "A list of my favourite musicians for the genre of your choice",
100100
"id": "5100",
101101
"icon": "MusicNoteIcon",
102102
"variables": {
@@ -113,7 +113,7 @@
113113
{
114114
"queryLocation": "musicians_variables2.rq",
115115
"name": "Templated query #2 about my favourite musicians",
116-
"description": "The purpose of this query is to show an example of a templated query with more than one variable",
116+
"description": "An example of a templated query with more than one variable",
117117
"id": "5200",
118118
"icon": "MusicNoteIcon",
119119
"variables": {

0 commit comments

Comments
 (0)