A Python SDK for integrating with Prescient services
Project description
prescient-sdk
A Python SDK for integrating with Prescient services
SDK Documentation: https://sparkgeo.github.io/prescient-sdk/
Quickstart
Local Development
The project is set up using uv for package management. To develop locally:
-
Install uv following these intructions
-
(Optional) Use uv to set up your local env.
Note that this will happen automatically when you run tests or any python application using uv, so it is not necessary
uv sync
-
Run the tests
uv run pytest
or
make run-tests
Configuration
Configuration methods are discussed in the Jupyter Notebook configuration.ipynb
Code Formatting/Linting
Code format is set using the Ruff formatter. To run this formatter:
make format
Adding or removing dependencies
Add or remove dependencies using UV.
In the simplest case, you can add a new dependency like this:
uv add <some-dependency>
To add a dev dependency:
uv add <some-dependency> --dev
To remove a dependency:
uv remove <some-dependency>
For more complex features, see the uv documentation
Build the documentation
Public facing documentation is built using jupyter-books.
The docs folder contains the layout for the public facing documentation.
You can build the documentation locally, and access the built html pages in a local browser:
-
Build the docs:
make build-docs
-
Open the html in a browser:
After building the docs, the path to the index.html file will be logged, and should look something like
docs/_build/html/index.html
Cutting a Release
In order to release a new version to be published to PyPI:
-
Create a new branch from main with the new version as the branch name (v*..) following semantic versioning guidelines.
-
Update the version in pyproject.toml under the
[project]
section. -
Sync the uv.lock file:
uv sync
-
Create a Pull Request against the main branch, have it reviewed and merged.
-
Create a new Release with a tag and title named
v*.*.*
. Include a description of all major updates included in this new release.After the release has been created, you should see Actions running to publish the new release to PyPI, and to update the Github Pages documentation.
-
conda-forge release
Unfortunately, releasing new versions to conda-forge is more involved and less automated. See the conda-forge section below for details.
Conda-forge
This package is available on conda-forge, for comprehensive docs see https://conda-forge.org/docs/maintainer/. In order to release new versions you must already be set as a maintainer of the conda-forge recipe. To become a maintainer follow these instructions: https://conda-forge.org/docs/maintainer/updating_pkgs/#updating-the-maintainer-list
The feedstock repo is located here: https://github.com/conda-forge/prescient-sdk-feedstock
Note that any changes to the feedstock repo need to be made from a fork of that repository, do not create a branch in the repo itself if you need to make manual changes.
How to update the conda-forge release after PyPI has been updated
conda-forge bots should automatically create a PR in the feedstock repo after a new PYPI version has been released, but it may not contain all changes that you need (e.g. updated dependencies for example).
-
Review the automatically created PR in the feedstock repo, specifically looking at the
meta.yaml
file in therecipe
folder. -
To ensure dependencies have been properly updated, it is a good idea to use the grayskull recipe generator to create an alternate
meta.yaml
file locally and compare it to the the automatically generated version in the feedstock PR. -
If you want to maintain multiple versions on conda-forge instead of simply keeping the latest version, you may need to manually create a different PR from a different branch, following these instructions: https://conda-forge.org/docs/maintainer/updating_pkgs/#maintaining-several-versions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file prescient_sdk-0.1.6.tar.gz
.
File metadata
- Download URL: prescient_sdk-0.1.6.tar.gz
- Upload date:
- Size: 406.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 860d570436a573418173c560696728633a1b7820c2d6ca7d49110e7c0498fce6 |
|
MD5 | bb1a00265a16aec19f0327c900197487 |
|
BLAKE2b-256 | c3e68562a94989001deca15d7fb7ce518eed3b2fca62bb2a99c7a215abad2c41 |
File details
Details for the file prescient_sdk-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: prescient_sdk-0.1.6-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f1bb290f4be73f2559652a1eabef907db52bfd5df9df05f3c3400160782270e |
|
MD5 | 8c7db47d5aa15b6508185963a4352830 |
|
BLAKE2b-256 | e4782daec98d3a223c1c44b17115d6441dec7caf5ef3c9ac3f6256f6219330d9 |