Skip to content

Commit f0332f3

Browse files
authored
docs: improve clarity of README (#68)
Clarifies and adds additional information to the README. In particular, it updates the workflow outline to include information about testing the changes in FarmData2 and updating any tests.
1 parent 722cb71 commit f0332f3

File tree

1 file changed

+35
-30
lines changed

1 file changed

+35
-30
lines changed

README.md

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,40 @@ All of the following documentation assumes that operations are performed within
66

77
## Preliminaries
88

9-
Install the dependencies by:
10-
- Change into the `FD2-SampleDBs` directory
11-
- run `npm install`
9+
1. Ensure that the FarmData2 Development environment is up and running.
10+
- `https://github.com/FarmData2/FarmData2/blob/development/INSTALL.md`
11+
2. Clone this repository into the home directory in the development environment alongside the FarmData2 repository.
12+
- `cd ~`
13+
- `git clone https://github.com/FarmData2/FD2-SampleDBs.git`
14+
3. Install the dependencies by:
15+
- `cd ~/FD2-SampleDBs`
16+
- `npm ci`
17+
4. Copy the useful libraries from the FarmData2 repository:
18+
- `cd ~/FD2-SampleDBs`
19+
- `bin/buildFD2Libs.bash`
1220

13-
Ensure that the FarmData2 repository has also been cloned.
14-
- `git clone https://github.com/FarmData2/FarmData2.git`
21+
### Development Workflow
1522

16-
Copy the useful libraries from the FarmData2 repository:
17-
- Change into the `FD2-SampleDBs` directory
18-
- `bin/buildFD2Libs.bash`
23+
To change, modify, update, add a database:
24+
25+
1. Take care of [Preliminaries above](#preliminaries).
26+
2. Create and switch to a new feature branch from the `development` branch in the FD2-SampleDBs repository.
27+
3. Make database changes in your feature branch.
28+
4. [Build the database](#building-the-databases) with your changes.
29+
5. Create and switch to a new feature branch from `development` in the FarmData2 repository.
30+
6. [Manually Install the Database](#manually-installing-a-database).
31+
7. Use the farmOS instance to manually explore the database and ensure that your changes are as intended. Make any corrections.
32+
8. Run the full FarmData2 test suite.
33+
- `cd ~/FarmData2`
34+
- `runAllTests.bash`
35+
9. Fix any tests that were broken by your database update.
36+
10. Commit the patched tests to your feature branch in the FarmData2 repo.
37+
11. Commit your changes to the Database to your feature branch in FD2-SampleDBs repo. Be sure to include:
38+
- The changes you have made to the code.
39+
- The newly created database files (e.g. `db.sample.tar.gz`)
40+
12. Ensure that both feature branches are up to date with their `development` branches.
41+
13. Push your feature branches.
42+
14. Create a pull request to the `development` branch in the appropriate upstream for each of your feature branches.
1943

2044
## Building the Databases
2145

@@ -44,29 +68,10 @@ The `buildFD2libs.bash` command will ensure that the libraries from FarmData2 th
4468

4569
The libraries should be maintained only from the FarmData2 repository. When new a library is updated in FarmData2 or added to FarmData2 and the changes are needed here the `buildFD2libs.bash` and `.gitignore` files should be updated and the `buildFD2libs.bash` script should be run again so that the changes are copied and adapted.
4670

47-
### Development Workflow
48-
49-
To change, modify, update, add a database:
50-
51-
- Prerequisites:
52-
- Fork the `FD2-SampleDBs` upstream repository
53-
- Clone your fork into the FarmData2 Development Environment
54-
1. Ensure that your `development` branch is synchronized with the `upstream`
55-
2. Create a new feature branch from the `development` branch
56-
3. Make and test changes in your feature branch
57-
4. Run the appropriate script(s) to build the database
58-
5. Install and test that the new database works
59-
- See [Manually Installing a Database](#manually-installing-a-database) above
60-
6. Commit to your feature branch:
61-
- The changes you have made to the code.
62-
- The newly created database files (e.g. `db.base.tar.gz`)
63-
7. Pull and merge any new changes to the `development` branch into your feature branch
64-
8. Create a pull request to the `development` branch in the upstream
65-
66-
A maintainer will:
71+
## Maintainers
6772

68-
1. Review your pull request and provide feedback
69-
2. If/when appropriate squash merge your pull request into the `development` branch
73+
1. Review pull requests and provide feedback
74+
2. If/when appropriate squash merge pull request into the `development` branch
7075
- The squash merge commit message must be a conventional commit message.
7176
- See [Conventional Commits](https://conventionalcommits.org)
7277
- In addition, `BREAKING CHANGE:` must be included in the footer of the commit message to produce a breaking change.

0 commit comments

Comments
 (0)