Skip to content

Commit ff150b0

Browse files
authored
Add testing instructions and contributing links (#2)
* Add contributing and CoC * Add CONTRIBUTING.md * line length * refer to remote contributing guide, borrow test instructions * Un-artisinally craft contributing link
1 parent 1ad51ba commit ff150b0

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,51 @@ The following types should be used as applicable `rel` types in the
4848
| Type | Description |
4949
| ------------------- | ----------- |
5050
| fancy-rel-type | This link points to a fancy resource. |
51+
52+
## Contributing
53+
54+
All contributions are subject to the
55+
[STAC Specification Code of Conduct](https://github.com/radiantearth/stac-spec/blob/master/CODE_OF_CONDUCT.md).
56+
For contributions, please follow the
57+
[STAC specification contributing guide](https://github.com/radiantearth/stac-spec/blob/master/CONTRIBUTING.md) Instructions
58+
for running tests are copied here for convenience.
59+
60+
### Running tests
61+
62+
The same check-markdown and check-examples programs that runs as a check on PR's is part of the repo and can be run locally.
63+
To run tests locally, you'll need `npm`, which is a standard part of any [node.js installation](https://nodejs.org/en/download/).
64+
Alternatively, you can also use [`yarn`](https://yarnpkg.com/) instead of `npm`.
65+
In this case replace all occurrences of `npm` with `yarn` below.
66+
67+
First you'll need to install everything with npm once. Just navigate to the root of this repository and on
68+
your command line run:
69+
70+
```bash
71+
npm install
72+
```
73+
74+
Then to check markdown formatting and test the examples against the JSON schema, you can run:
75+
76+
```bash
77+
npm run test
78+
```
79+
80+
This will spit out the same texts that you see online, and you can then go and fix your markdown or examples.
81+
82+
To just check the markdown run:
83+
84+
```bash
85+
npm run check-markdown
86+
```
87+
88+
To just check the examples run:
89+
90+
```bash
91+
npm run check-examples
92+
```
93+
94+
If the tests reveal formatting problems with the examples, you can fix them with:
95+
96+
```bash
97+
npm run format-examples
98+
```

0 commit comments

Comments
 (0)