You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Change directory structure to put pypgstac and pgstac under /src
* switch pypgstac to use hatch
* move migrations to the pgstac tree
* make symlink in pypgstac for migrations
* move pgstac.sql to src/pgstac/
* update scripts and docker setup
* Cleanup unused files. Adjust tests to work with new scripts
* update sql with partitioning rework and maintenance tooling
* fix: allow missing aws credential in pre-commit
* switch from methodtools to cachetools, remove commented out code
* add fix for #156
---------
Co-authored-by: Matt McFarland <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,27 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
7
+
## [v0.7.0]
8
+
9
+
### Added
10
+
- Reorganize code base to create clearer separation between pgstac sql code and pypgstac.
11
+
- Move Python tooling to use hatch with all python project configuration in pyproject.toml
12
+
- Rework testing framework to not rely on pypgstac or migrations. This allows to run tests on any code updates without creating a version first. If a new version has been staged, the tests will still run through all incremental migrations to make sure they pass as well.
13
+
- Add pre-commit to run formatting as well as the tests appropriate for which files have changed.
14
+
- Add a query queue to allow for deferred processing of steps that do not change the ability to get results, but enhance performance. The query queue allows to use pg_cron or similar to run tasks that are placed in the queue.
15
+
- Modify triggers to allow the use of the query queue for building indexes, adding constraints that are used solely for constraint exclusion, and updating partition and collection spatial and temporal extents. The use of the queue is controlled by the new configuration parameter "use_queue" which can be set as the pgstac.use_queue GUC or by setting in the pgstac_settings table.
16
+
- Reorganize how partitions are created and updated to maintain more metadata about partition extents and better tie the constraints to the actual temporal extent of a partition.
17
+
- Add "partitions" view that shows stats about number of records, the partition range, constraint ranges, actual date range and spatial extent of each partition.
18
+
- Add ability to automatically update the extent object on a collection using the partition metadata via triggers. This is controlled by the new configuration parameter "update_collection_extent" which can be set as the pgstac.update_collection_extent GUC or by setting in the pgstac_settings table. This can be combined with "use_queue" to defer the processing.
19
+
- Add many new tests.
20
+
- Migrations now make sure that all objects in the pgstac schema are owned by the pgstac_admin role. Functions marked as "SECURITY DEFINER" have been moved to the lower level functions responsible for creating/altering partitions and adding records to the search/search_wheres tables. This should open the door for approaches to using Row Level Security.
21
+
- Allow pypgstac loader to load data on pgstac databases that have the same major version even if minor version differs. [162] (https://github.com/stac-utils/pgstac/issues/162) Cherry picked from https://github.com/stac-utils/pgstac/pull/164.
22
+
23
+
### Fixed
24
+
- Allow empty strings in datetime intervals
25
+
- Set search_path and application_name upon connection rather than as kwargs for compatibility with RDS [156] (https://github.com/stac-utils/pgstac/issues/156)
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+31-13Lines changed: 31 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,24 +55,42 @@ scripts/stageversion 0.2.8
55
55
This will create a base migration for the new version and will create incremental migrations between any existing base migrations. The incremental migrations that are automatically generated by this script will have the extension ".staged" on the file. You must manually review (and make any modifications necessary) this file and remove the ".staged" extension to enable the migration.
56
56
57
57
### Making Changes to SQL
58
-
All changes to SQL should only be made in the `/sql` directory. SQL Files will be run in alphabetical order.
58
+
All changes to SQL should only be made in the `/src/pgstac/sql` directory. SQL Files will be run in alphabetical order.
59
59
60
60
### Adding Tests
61
-
PGStac uses PGTap to test SQL. Tests can be found in tests/pgtap.sql and are run using `scripts/test`
61
+
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.
62
+
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`.
64
+
65
+
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.
66
+
67
+
PyPgSTAC tests are located in `/src/pypgstac/tests`.
68
+
69
+
All tests can be found in tests/pgtap.sql and are run using `scripts/test`
70
+
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.
72
+
73
+
74
+
### To make a PR
75
+
1) Make any changes.
76
+
2) Make sure there are tests if appropriate.
77
+
3) Update Changelog using "### Unreleased" as the version.
78
+
4) Make any changes necessary to the docs.
79
+
5) Ensure all tests pass (pre-commit will take care of this if installed and the tests will also run on CI)
80
+
6) Create PR against the "main" branch.
81
+
62
82
63
83
64
84
### Release Process
65
-
1) Make sure all your code is added and committed
66
-
2) Create a PR against the main branch
67
-
3) Once the PR has been merged, start the release process.
68
-
4) Upate the version in `pypgstac/pypgstac/version.py`
69
-
5) Use `scripts/stageversion VERSION` as documented in migrations section above making sure to rename any files ending in ".staged" in the migrations section
70
-
6) Add details for release to the CHANGELOG
71
-
7) Add/Commit any changes
72
-
8) Run tests `scripts/test`
73
-
9) Create a git tag `git tag v0.2.8` using new version number
74
-
10) Push the git tag `git push origin v0.2.8`
75
-
11) The CI process will push pypgstac to PyPi, create a docker image on ghcr.io, and create a release on github.
85
+
1) Run "scripts/stageversion VERSION" (where version is the next version using semantic versioning ie 0.7.0
86
+
2) Check the incremental migration created in the /src/pgstac/migrations file with the .staged extension to make sure that the generated SQL looks appropriate.
87
+
3) Run the tests against the incremental migrations "scripts/test --migrations"
88
+
4) Move any "Unreleased" changes in the CHANGELOG.md to the new version.
89
+
5) Open a PR for the version change.
90
+
6) Once the PR has been merged, start the release process.
91
+
7) Create a git tag `git tag v0.2.8` using new version number
92
+
8) Push the git tag `git push origin v0.2.8`
93
+
9) The CI process will push pypgstac to PyPi, create a docker image on ghcr.io, and create a release on github.
0 commit comments