Enabling the exchange of product-level carbon accounting data.
Learn more »
Discussions
·
Blog
·
Solutions
·
Services
·
Newsletter
ZeroTwentyFifty’s repository represents a PACT Conformant implementation of the WBCSD Partnership for Carbon Transparency (PACT) Pathfinder Protocol. As a software company dedicated to combating climate change, we build solutions for sharing Scope 3 Product Carbon footprint data.
This project is part of our commitment to providing open-source implementations of critical pathway software, enabling organizations of all sizes to collaborate effectively in their sustainability efforts.
⚠️ Caution: While every effort has been made to keep the codebase in a "green" state, being an early-stage software project means some components may be unstable. Please note that if you check out the current head, things may be broken. Tagged versions will be maintained in working order.
From the root of the repository, run:
poetry install
For Ubuntu, install Uvicorn with:
sudo apt install uvicorn
Activate the Poetry environment to access the installed Python dependencies:
poetry shell
Start the local development server with:
uvicorn main:app
Open your browser and navigate to:
To obtain an authentication token, go to the POST /auth/token route and enter a valid username and password in the client_id
and client_secret
fields. This should return an auth token and confirm that everything is working correctly.
Connect to your local PostgreSQL instance:
psql -d postgres
Create a database called ztf
:
CREATE DATABASE ztf;
Ensure that the values in core/config.py
are set correctly for your local development environment:
POSTGRES_USER: str = os.getenv("PGUSER", "username")
POSTGRES_PASSWORD = os.getenv("PGPASSWORD", "password")
POSTGRES_SERVER: str = os.getenv("PGHOST", "localhost")
POSTGRES_PORT: str = os.getenv("PGPORT", 5432) # default PostgreSQL port is 5432
POSTGRES_DB: str = os.getenv("PGDATABASE", "ztf")
Run the following command within the Poetry shell to provision the database with tables:
uvicorn main:app
If successful, you should see the database tables inside the ztf
database by executing:
\dt
Create a file named pytest.ini
modeled after the env.template
file. Note that this may be handled by dotenv.
By default, conformance tests are excluded from the default pytest run and executed in a separate CI/CD pipeline. To run the conformance tests, use:
pytest -m conformance
If you need help with the software, have questions or queries, or would like to more directly engage ZeroTwentyFifty in work, please reach out to us at: [email protected]
This project was created and is maintained by Louis W. If you have any questions or suggestions, feel free to reach out or open an issue on this repository.
Thanks to these wonderful people for contributing: