Skip to content

Trim repo to only include stac-fastapi.pgstac package code #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 25 commits into from

Conversation

duckontheweb
Copy link
Contributor

@duckontheweb duckontheweb commented Aug 3, 2022

Updates the repo to only include code for the stac-fastapi.pgstac backend.

This PR tries to keep the number of changes to a minimum and focus on creating a working stac-fastapi.pgstac package. Other changes related to code cleanup, testing, etc. can be tackled in future PRs.

Notable Changes:

  • Move setup.py and setup.cfg files to the project root
  • Move stac-fastapi.pgstac source code from stac_fastapi/pgstac/stac_fastapi/pgstac to stac_fastapi/pgstac.
  • Pin stac-fastapi.* dependencies to GitHub commits
    This was necessary because there are changes to stac-fastapi.types that are not part of the most recent release. Going forward, we can pin these dependencies to specific releases.
  • Add test dependencies that were previously installed into the Docker image as part of another stac-fastapi.* package.
  • Update Makefile targets and Docker Compose services
    This also included renaming some of the targets and services to remove the -pgstac suffix. This wasn't strictly necessary to get things to run, but those suffixes no longer seemed necessary
  • Update GitHub Actions
  • Update scripts/publish
  • Update docs to be specific to stac-fastapi.pgstac
  • Update main README to be specific to stac-fastapi.pgstac

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG.

@duckontheweb duckontheweb changed the title Change/pgstac only Trim repo to only include stac-fastapi.pgstac package code Aug 3, 2022
@duckontheweb duckontheweb changed the title Trim repo to only include stac-fastapi.pgstac package code Trim repo to only include stac-fastapi.pgstac package code Aug 3, 2022
@duckontheweb
Copy link
Contributor Author

@geospatial-jeff Do you have a preference for how we handle transitioning the CHANGELOG? Since the versioning of this package is going to continue from the existing version (v2.3.0) my thought was that we should:

  • Preserve the current CHANGELOG
    This should include the upcoming v2.4.0 release prior to officially breaking apart the repo, which means I'll probably need to rebase onto stac-fastapi@master again to include that.
  • Immediately release v2.5.0
    This will allows us to pin this package to stac-fastapi>=v2.4.0 and remove the GitHub dependencies mentioned in the description. It will also let people know that versioning of this package may begin to diverge from the other stac-fastapi.* packages.
  • Proceed with normal version updates after that.

@geospatial-jeff
Copy link
Collaborator

Do you have a preference for how we handle transitioning the CHANGELOG?

I don't have a strong preference. One of the biggest upsides IMO of splitting backends out of stac-fastapi is those backends can be versioned/released separately. I agree that historical changes from the existing CHANGELOG should be preserved but outside of that requirement I don't have a strong preference.

Immediately releasing v2.5.0 makes sense to me but I think we may want to hide behind an alpha/beta release until everything is finalized.

…#444)

* dont break on app startup when pagination extension is not included

* update changelog

* better variable names
* add default CORS middleware

* test that default cors middleware is working
* bump versions

* update changelog
@geospatial-jeff
Copy link
Collaborator

@duckontheweb Can you please post the github commands you ran to maintain history? I'd like to use the same commands for the sqlalchemy backend.

@duckontheweb
Copy link
Contributor Author

@duckontheweb Can you please post the github commands you ran to maintain history? I'd like to use the same commands for the sqlalchemy backend.

Sure thing.

$ mkdir stac-fastapi-pgstac
$ cd stac-fastapi-pgstac
$ git init
$ git remote add stac-fastapi https://github.com/stac-utils/stac-fastapi.git
$ git fetch
$ git reset --hard stac-fastapi/master
$ git remote remove stac-fastapi
$ git remote add origin https://github.com/stac-utils/stac-fastapi-pgstac.git
$ git push --set-upstream origin main --force

@duckontheweb
Copy link
Contributor Author

  • Update docs to be specific to stac-fastapi.pgstac

@geospatial-jeff I ended up simplifying the API section of the mkdocs.yml config to just point to the index.md file for each of the following sub-packages:

  • stac_fastapi.pgstac
  • stac_fastapi.api
  • stac_fastapi.types
  • stac_fastapi.extensions

Since those index pages provide their own links to the individual module pages we can still navigate to all of the auto-documented API code, but without having to constantly update the list of pages in the config. Part of the reasoning for this, was that I noticed that there were still nav links to stac_fastapi.server, which no longer exists. I don't know if this is what we want as a permanent solution, but this seems like a good starting point and maybe we can open issue to revamp the docs more thoroughly.

@duckontheweb duckontheweb marked this pull request as ready for review August 6, 2022 15:15
@duckontheweb
Copy link
Contributor Author

Opened stac-utils/stac-fastapi#450 to remove the backend packages from that repo. We should wait for that PR to be merged and released, then update this PR to install the core packages from the new release.

@gadomski
Copy link
Member

Closing as OBE (stac-utils/stac-fastapi#517).

@gadomski gadomski closed this Mar 31, 2023
@gadomski gadomski deleted the change/pgstac-only branch May 9, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants