Skip to content

Commit 0c88741

Browse files
authored
Small changes to contributing documentation (#270)
* Small modifications to adding tests section * Add section on hydration and dehydration
1 parent ab74adc commit 0c88741

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

CONTRIBUTING.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,20 @@ This will create a base migration for the new version and will create incrementa
5858
All changes to SQL should only be made in the `/src/pgstac/sql` directory. SQL Files will be run in alphabetical order.
5959

6060
### Adding Tests
61+
62+
There are three different types of tests within the project: (1) pgTap tests, (2) basic SQL tests, and (3) PyPgSTAC tests.
63+
6164
PgSTAC tests can be written using PGTap or basic SQL output comparisons. Additional testing is available using PyTest in the PyPgSTAC module. Tests can be run using the `scripts/test` command.
6265

63-
PGTap tests can be written using [PGTap](https://pgtap.org/) syntax. Tests should be added to the `/src/pgstac/tests/pgtap` directory. Any new sql files added to this directory must be added to `/src/pgstac/tests/pgtap.sql`.
66+
PGTap tests can be written using [PGTap](https://pgtap.org/) syntax. Tests should be added to the `/src/pgstac/tests/pgtap` directory. Any new SQL files added to this directory must be added to `/src/pgstac/tests/pgtap.sql`.
6467

6568
The Basic SQL tests will run any file ending in '.sql' in the `/src/pgstac/tests/basic` directory and will compare the exact results to the corresponding '.sql.out' file.
6669

67-
PyPgSTAC tests are located in `/src/pypgstac/tests`.
70+
PyPgSTAC tests are pytest tests, and they are located in `/src/pypgstac/tests`
6871

69-
All tests can be found in tests/pgtap.sql and are run using `scripts/test`
72+
All tests can be found in tests/pgtap.sql and are run using `scripts/test`.
7073

71-
Individual tests can be run with any combination of the following flags "--formatting --basicsql --pgtap --migrations --pypgstac". If pre-commit is installed, tests will be run on commit based on which files have changed.
74+
Individual tests can be run with any combination of the following flags `--formatting --basicsql --pgtap --migrations --pypgstac`. If pre-commit is installed, tests will be run on commit based on which files have changed.
7275

7376

7477
### To make a PR
@@ -96,3 +99,13 @@ Individual tests can be run with any combination of the following flags "--forma
9699
### Get Involved
97100

98101
Issues and pull requests are more than welcome: https://github.com/stac-utils/pgstac/issues
102+
103+
### A Note on Hydration and Dehydration
104+
105+
Dehydration refers to stripping redundant attributes of STAC items when storing them within the database. For many collections, dehydration saves a significant amount of memory.
106+
107+
Rehydration is the process of adding the stripped attributes back to the STAC items, such as during the export of an STAC collection or the response to a search query.
108+
109+
PgSTAC, a versatile tool, is designed to seamlessly integrate with PyPgSTAC or alternative backends. This flexibility allows for direct calls for both rehydration and dehydration, giving developers and technical users a sense of control over the process.
110+
111+
Hydration and dehydration are de-facto settings that users can not opt out of. In the future, we may provide a configuration for use cases where the size benefits do not justify the added complexity.

0 commit comments

Comments
 (0)