Skip to content

Commit

Permalink
fix bugs with staging version, update for v0.8.0 release (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitner authored Sep 21, 2023
1 parent e3b0635 commit 887b5bb
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 18 deletions.
7 changes: 0 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ repos:
verbose: true
fail_fast: true
files: Dockerfile$|\.rs$
- id: stageversion
name: stageversion
entry: scripts/stageversion
language: script
pass_filenames: false
verbose: true
fail_fast: true
- id: sql
name: sql
entry: scripts/test
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [unreleased]
## [v0.8.0]

### Fixed

Expand Down Expand Up @@ -384,7 +384,7 @@ _TODO_

- Fixed issue with pypgstac loads which caused some writes to fail ([#18](https://github.com/stac-utils/pgstac/pull/18))

[unreleased]: https://github.com/stac-utils/pgstac/compare/v0.7.10...HEAD
[v0.8.0]: https://github.com/stac-utils/pgstac/compare/v0.7.10...v0.8.0
[v0.7.10]: https://github.com/stac-utils/pgstac/compare/v0.7.9...v0.7.10
[v0.7.9]: https://github.com/stac-utils/pgstac/compare/v0.7.8...v0.7.9
[v0.7.8]: https://github.com/stac-utils/pgstac/compare/v0.7.7...v0.7.8
Expand Down
2 changes: 1 addition & 1 deletion docker/pypgstac/bin/stageversion
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ cat <<EOD > $PYPGSTACDIR/python/pypgstac/version.py
"""Version."""
__version__ = "${PYVERSION}"
EOD
sed -i "s/^version[ ]*=[ ]*.*/version = \"${PYVERSION}\"/" $PYPGSTACDIR/pyproject.toml
sed -i "s/^version[ ]*=[ ]*.*$/version = \"${PYVERSION}\"/" $PYPGSTACDIR/pyproject.toml

makemigration -f $OLDVERSION -t $VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -487,4 +487,4 @@ GRANT ALL ON ALL TABLES IN SCHEMA pgstac to pgstac_ingest;
GRANT USAGE ON ALL SEQUENCES IN SCHEMA pgstac to pgstac_ingest;

SELECT update_partition_stats_q(partition) FROM partitions_view;
SELECT set_version('unreleased');
SELECT set_version('0.8.0');
Original file line number Diff line number Diff line change
Expand Up @@ -4100,4 +4100,4 @@ GRANT ALL ON ALL TABLES IN SCHEMA pgstac to pgstac_ingest;
GRANT USAGE ON ALL SEQUENCES IN SCHEMA pgstac to pgstac_ingest;

SELECT update_partition_stats_q(partition) FROM partitions_view;
SELECT set_version('unreleased');
SELECT set_version('0.8.0');
2 changes: 1 addition & 1 deletion src/pgstac/pgstac.sql
2 changes: 1 addition & 1 deletion src/pgstac/sql/999_version.sql
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SELECT set_version('unreleased');
SELECT set_version('0.8.0');
2 changes: 1 addition & 1 deletion src/pypgstac/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pypgstac"
version = "0.7.10-dev"
version = "0.8.0"
description = "Schema, functions and a python library for storing and accessing STAC collections and items in PostgreSQL"
readme = "README.md"
requires-python = ">=3.8"
Expand Down
2 changes: 1 addition & 1 deletion src/pypgstac/python/pypgstac/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Version."""
__version__ = "0.7.10-dev"
__version__ = "0.8.0"
3 changes: 2 additions & 1 deletion src/pypgstac/tests/hydration/test_dehydrate_pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def db(self) -> Generator:
os.environ["PGDATABASE"] = "pgstactestdb"

pgdb = PgstacDB()
pgdb.query("DROP SCHEMA IF EXISTS pgstac CASCADE;")
with psycopg.connect(autocommit=True) as conn:
conn.execute("DROP SCHEMA IF EXISTS pgstac CASCADE;")
Migrate(pgdb).run_migration()

yield pgdb
Expand Down
3 changes: 2 additions & 1 deletion src/pypgstac/tests/hydration/test_hydrate_pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def db(self) -> Generator[PgstacDB, None, None]:
os.environ["PGDATABASE"] = "pgstactestdb"

pgdb = PgstacDB()
pgdb.query("DROP SCHEMA IF EXISTS pgstac CASCADE;")
with psycopg.connect(autocommit=True) as conn:
conn.execute("DROP SCHEMA IF EXISTS pgstac CASCADE;")
Migrate(pgdb).run_migration()

yield pgdb
Expand Down

0 comments on commit 887b5bb

Please sign in to comment.