Skip to content

Commit 3845a21

Browse files
committed
updating instructions in README
1 parent f94bd2e commit 3845a21

1 file changed

Lines changed: 21 additions & 29 deletions

File tree

README.md

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ This is a fork of a 2001-ish era PHP app from MySociety in the UK, repurposed fo
66

77
OpenAustralia.org.au is a website run by the non-partisan charity, OpenAustralia Foundation, which makes Australian government and parliamentary information easily accessible to the public through tools such as searching Hansard (parliamentary debates) and tracking politicians' voting records. The site aims to increase transparency and civic engagement in Australian democracy. It provides platforms to easily follow what MPs and Senators say and do, and tracks their registers of interests.
88

9-
## What is this data?
9+
## What is this data?
1010

11-
Everything elected politicians say in Australia's Senate and Parliament is recorded in Australia's Official Hansard. This documentation is obtained using scapers (see https://github.com/openaustralia/openaustralia-parser/ )
11+
Everything elected politicians say in Australia's Senate and Parliament is recorded in Australia's Official Hansard. This documentation is obtained using scrapers (see https://github.com/openaustralia/openaustralia-parser/ )
1212
and displayed on openaustralia.org.au.
1313

1414
## data feeds
@@ -34,13 +34,21 @@ from the repo root, which will install the version of PHP this project
3434
expects.
3535

3636
If `mise install` fails while compiling PHP from source, you may be
37-
missing build dependencies. On Ubuntu:
37+
missing build dependencies.
38+
39+
On Ubuntu:
3840

3941
```bash
4042
sudo apt update
4143
sudo apt install re2c bison autoconf build-essential libxml2-dev libssl-dev libcurl4-openssl-dev libpng-dev libjpeg-dev libonig-dev libzip-dev libgd-dev
4244
```
4345

46+
On macOS (with [Homebrew](https://brew.sh/)):
47+
48+
```bash
49+
brew install autoconf bison re2c pkg-config libxml2 openssl@3 curl libpng jpeg oniguruma libzip gd
50+
```
51+
4452
### Bumping the PHP version
4553

4654
The PHP version is declared in a few places. To bump it, update all of
@@ -74,11 +82,11 @@ make install # composer install + compile scripts/run-with-lockfile
7482
Re-run `make dependencies` after pulling changes that touch `composer.json`
7583
or `composer.lock`.
7684

77-
### Running the checks git does
85+
### Running the checks CI does
7886

7987
```bash
80-
make lint-ci | grep -v "No syntax errors detected in" # ignore all the "its ok" messages
81-
make phpcs-ci
88+
make lint-php-ci | grep -v "No syntax errors detected in" # ignore all the "its ok" messages
89+
make phpcs-ci
8290
composer validate
8391
```
8492

@@ -160,40 +168,26 @@ git add db/migrations/<your_new_migration>.php db/schema.sql
160168

161169
### Running the tests
162170

163-
Unit tests run without a database:
171+
`make test` runs the whole phpunit suite. Integration tests skip
172+
themselves automatically if no database is reachable, so you can run
173+
this without MySQL:
164174

165175
```bash
166176
make test
167-
./vendor/bin/phpunit tests/
168177
```
169178

170-
To run tests with database integration, start MySQL first:
179+
To include the integration tests, start MySQL first:
171180

172181
```bash
173182
make docker-run
174183
```
175184

176-
This starts both the webserver and MySQL container. Wait a few seconds for MySQL to be ready, then run:
185+
Wait a few seconds for MySQL to be ready, then run:
177186

178187
```bash
179188
make test-all
180189
```
181190

182-
### Running tests in Docker (simplest method)
183-
184-
To run all tests inside Docker with automatic database setup:
185-
186-
```bash
187-
make test-docker
188-
```
189-
190-
This will:
191-
- Start the MySQL container
192-
- Load the database schema
193-
- Run all tests with database integration
194-
195-
No need to manually start containers or set environment variables.
196-
197191
### Running tests with coverage
198192

199193
To generate code coverage reports (requires Xdebug or PCOV):
@@ -241,15 +235,13 @@ docker compose down
241235
### Sharing database with openaustralia-parser for development
242236

243237
You can setup local development for both repos by:
244-
238+
245239
```bash
246240
# DO NOT DO THIS ON PRODUCTION!!!!
247241
cd ../twfy
248242
cp conf/general-example.local-dev conf/general
249-
250-
cd ../openaustralia-parser # if not already there
251-
cd ../twfy
252243
make docker-db-migrate # or: ./vendor/bin/phinx migrate -c phinx.php
244+
253245
cd ../openaustralia-parser
254246
bundle exec rake db:fixtures:load # for a limited set of fixtures
255247
bundle exec rake db:stats # to show which tables have data

0 commit comments

Comments
 (0)