To use Kingfisher Summarize, you need:
Access to a Unix-like shell (some are available for Windows)
Python 3.7 or greater
PostgreSQL 10 or greater
Open a shell, and run:
git clone https://github.com/open-contracting/kingfisher-summarize.git cd kingfisher-summarize pip install -r requirements.txt
All instructions in this documentation assume that you have changed to the
kingfisher-summarize directory (the
cd command above).
The database connection is configured by setting the
KINGFISHER_SUMMARIZE_DATABASE_URL environment variable to the connection URI of the database used by Kingfisher Process.
It can be set on the command line. For example:
Or, it can be set in a
.env file in the
kingfisher-summarize directory. For example:
If you prefer not to store the password in the
.env file, you can use the PostgreSQL Password File,
The database user must have the CREATE privilege on the database used by Kingfisher Process. For example, for the default database connection settings:
psql ocdskingfisher -U ocdskingfisher -c 'GRANT CREATE ON DATABASE ocdskingfisher TO ocdskingfisher;'
Optionally, you can configure Kingfisher Summarize to grant to a SQL role the
USAGE privilege on the schemas it creates and the
SELECT privilege on all tables in the schemas. To do so, set the
KINGFISHER_SUMMARIZE_READONLY_ROLE environment variable.
This step is optional.
Logging from the Command-line tools can be configured with a
logging.json file in a configuration directory appropriate to your operating system. Set the
KINGFISHER_SUMMARIZE_LOGGING_JSON environment variable to override the default path. Read more about Reading logs.
You’re now ready to use Kingfisher Summarize.