Skip to content

Ignore - This is a test for copilot for PRs please ignore #432

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 75 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
fbc602c
doc initial set up using classic template and typescript - doc is cur…
Aug 3, 2023
ac1432f
favicon
Aug 21, 2023
8166cf2
reoganising first draft
Aug 22, 2023
48f117e
doc link fixes
Aug 22, 2023
e58c157
Merge branch 'Green-Software-Foundation:dev' into docs/docusaurus-setup
danuw Nov 28, 2023
47b4705
Merge pull request #424 from danuw/docs/docusaurus-setup
danuw Dec 4, 2023
356ce09
github pages pipelines to accomodate customisations
danuw Dec 4, 2023
2c342a8
link fix
danuw Dec 27, 2023
04be596
workflow update
danuw Dec 27, 2023
c437b5b
updated github action
danuw Dec 29, 2023
46958d9
ensuring there is a yarn lock file
danuw Dec 29, 2023
21a0e16
removed working directory from setup node action
danuw Dec 29, 2023
8bbe72e
trying to have the working directory at a higher level
danuw Dec 29, 2023
62e2a95
trying cache dependency path property
danuw Dec 29, 2023
5183d73
dont break the build on broken links for now
danuw Dec 29, 2023
93267d6
updated user
danuw Dec 29, 2023
ee8841c
removed user
danuw Dec 29, 2023
2d7b4dd
updated user to deploy pages
danuw Dec 30, 2023
68bbb2f
github token permissions updated to ensure contents write
danuw Jan 17, 2024
735a515
workflows fixes
danuw Jan 17, 2024
a31b391
Ensuring username was not needed
danuw Jan 17, 2024
b7483b6
verify azure function workflow not to trigger on casdk-docs changes only
danuw Jan 30, 2024
4cece7b
Link fixes (may be related to latest version now erroring)
danuw Jan 30, 2024
83f3073
test doc file
danuw Jan 30, 2024
4799d7a
restoring username and email and removing the test file
danuw Jan 30, 2024
d2d823d
blog posts - unpublished / placeholder posts currently sit in blog_pr…
danuw Feb 11, 2024
c3d832c
annoucementBar #416 to include disclaimer as well as CarbonHack link
danuw Feb 11, 2024
ec96b52
bold disclaimer / banner message
danuw Feb 11, 2024
9567c45
ensuring samples get deployed as part of the docs too
danuw Feb 11, 2024
4527514
working directory correction for moving samples in docs deployment wo…
danuw Feb 11, 2024
ff729b0
normalisation of the workflow name to others
danuw Feb 11, 2024
1bdd2ad
latest docusaurus updates to check the latest workflow
danuw Feb 11, 2024
012ca25
docusaurus broken links build warning + move all samples folder
danuw Feb 11, 2024
62a866f
Update CONTRIBUTING.md
Sophietn Nov 29, 2023
529695f
Update CONTRIBUTING.md
Sophietn Nov 29, 2023
bd09508
Update CHANGELOG.md
danuw Dec 12, 2023
d8f78a0
Update CHANGELOG.md with first draft release notes for 1.2
danuw Dec 12, 2023
aebaf40
Update CHANGELOG.md
danuw Dec 19, 2023
d510f80
Update CHANGELOG.md
danuw Jan 9, 2024
062427b
Update WattTime registration link
pichuang Dec 6, 2023
9f280dd
Update containerization.md
jacksorjacksor Jan 4, 2024
958da20
Create adopters.md
tkuramoto33 Dec 7, 2023
1b8d21e
Add Vestas.
tkuramoto33 Dec 14, 2023
5839a41
Remove a hyphen for consistent appearance
tkuramoto33 Dec 14, 2023
9c8d0ba
Update the description
tkuramoto33 Feb 1, 2024
659e641
Update the description to mention pull requests
tkuramoto33 Feb 2, 2024
587380d
Create enablement.md
rinikeda Dec 15, 2023
a74be26
draft of enablement.md
rinikeda Dec 31, 2023
c416c92
Update carbon-aware-cli.md
JasonLuuk Jan 27, 2024
c7d4563
Initial codespace branch and associated docs
danuw Dec 11, 2023
a51782f
updated vs code extensions
danuw Jan 30, 2024
80d6e59
DCO Remediation Commit for Dan Benitah <[email protected]>
danuw Jan 31, 2024
bd7ad15
Update README.md
vaughanknight Feb 6, 2024
693beed
More updates
vaughanknight Feb 6, 2024
1d78756
Added plcaeholder images
vaughanknight Feb 6, 2024
a7bc0fc
Updated images
vaughanknight Feb 7, 2024
571e217
More updates
vaughanknight Feb 7, 2024
a07870f
Updates with theory of change details
vaughanknight Feb 7, 2024
0314c47
Minor updates, included adopters page link
vaughanknight Feb 7, 2024
3af6f73
Update README.md
vaughanknight Feb 6, 2024
932a665
More updates
vaughanknight Feb 6, 2024
9f09493
Added plcaeholder images
vaughanknight Feb 6, 2024
02ea4d6
Updated images
vaughanknight Feb 7, 2024
183a676
More updates
vaughanknight Feb 7, 2024
0481081
Updates with theory of change details
vaughanknight Feb 7, 2024
042123d
Signed-off-by: Vaughan Knight <[email protected]>
vaughanknight Feb 7, 2024
cc15035
merge and bug fixes
danuw Feb 12, 2024
3c62bd4
Qucikstart fix and overview link adjustment following move
danuw Feb 12, 2024
bfdb8ef
Signed-off-by: Vaughan Knight <[email protected]>
vaughanknight Feb 7, 2024
de8d88c
CarbonHack24 Update to README.md
danuw Feb 11, 2024
1cc4302
Create tests.md
danuw Feb 7, 2024
a3a5da6
Update tests.md
danuw Feb 12, 2024
13becaf
Signed-off-by: Vaughan Knight <[email protected]>
vaughanknight Feb 7, 2024
590f262
blog updates
danuw Feb 13, 2024
20d120b
Merge branch 'dev' into docs/docusaurus
danuw Feb 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/6-jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: 6-Deploy docs to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["dev", "docs/*"]
paths:
- 'casdk-docs/**'
- 'samples/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
name: Deploy docs to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Copy Files
run: |
# Moving the samples folder at build& deploy time of the docs so that it appears in the end result
cp -r ./samples/ ./casdk-docs/docs/
working-directory: .

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ./casdk-docs
- name: Build website
run: yarn build
working-directory: ./casdk-docs

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./casdk-docs/build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'src/**'
- '.github/workflows/**'
- 'samples/azure/azure-function/**'
- '!casdk-docs/**'

env:
DOCKERFILE_PATH: samples/azure/azure-function/Dockerfile
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ deployment in the greenest location.

The Carbon Aware SDK is being used by large and small companies around the
world. Some of the world’s biggest enterprises and software companies, through
to start-ups. Both UBS and Vestas have used the SDK, with further details over on the [adopters overview](./docs/adopters.md).
to start-ups. Both UBS and Vestas have used the SDK, with further details over on the [adopters overview](./casdk-docs/docs/overview/adopters.md).

Machine Learning (ML) workloads are a great example of long running compute
intensive workloads, that often are also not time critical. By moving these workloads to a different time, the carbon emissions from the ML training can be reduced by up to 15%, and by moving the location of the training this can be
Expand Down Expand Up @@ -196,7 +196,6 @@ Open Source Working Group.

### Appointments
The following are those who are currently actively working on the SDK and have made significant ongoing contributions.
The following are those who are currently actively working on the SDK and have made significant ongoing contributions.

- Chair/Project lead - Vaughan Knight (Microsoft)
- Senior Technical Program Manager - Sophie Trinder (Green Software Foundation)
Expand Down
20 changes: 20 additions & 0 deletions casdk-docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions casdk-docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions casdk-docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions casdk-docs/blog/2021-08-26-welcome/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
slug: welcome
title: Welcome to the Carbon Aware SDK documentation site
tags: [welcome,post]
---

Carbon aware software does more when it can leverage greener energy sources, and less when the energy CO2 emissions are higher.

The Carbon Aware SDK is a toolset to help you measure the carbon emissions of your software, in turn helping you **measure and reduce your software's carbon emissions**, and choose when and where you run your software to make it greener.

![Carbon Aware Software](./carbon-aware-software.png)


By knowing the carbon emissions of the energy that powers your applications, you and your organisation can leverage greener energy sources to reduce your CO2 emissions by:

* Building AI models when carbon emissions are lower
* Deploying software into the cloud in locations that have greener energy sources
* Running software updates at greener energy time windows
* Using data to run hypothetical models to understand how you could start driving impact and reduce emissions, drive business cases for change, and create a greener future.

Within the [Green Software Foundations Theory of Change](https://greensoftware.foundation/articles/theory-of-change), we look at 3 pillars, that being **Knowledge**, **Tech Culture**, and **Tooling** as focus areas to drive this change. The Carbon Aware SDK at its core sits firmly in the **Tooling** pillar, and also supports the other pillars, providing **Knowledge** through emissions data to inform change, and being core enabler for the **Tech Culture** for building carbon aware software.

Companies including UBS and Vestas have already deployed the Carbon Aware SDK to build greener software, and you can too!

_Published in feb 2024 based on latest updates to the readme.md_
90 changes: 90 additions & 0 deletions casdk-docs/blog/2022-10-01-release-1.0.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
slug: release-v1.0
title: Release v1.0
tags: [v1.0, release]
---

Release 1.1



## [1.1.0] - 2023-18-07

### Added

- Added Electricity Maps (paid api) support for forecasting and historical data.
- Added ElectricityMaps (free api) support for historical data. Note that this API does not support forecast capabilities.

### Fixed

- Fixed generated test data that had time bomb bug that was in test data, which caused integration tests to fail. This is now automatically generated each time.
- Fixed some bugs that related to underlying data source errors surfacing as HTTP 500 errors from the API. These should now be more consistent.
- Fixed an issue where UTF-8 passwords were encoded as ASCII for WattTime API, causing integration failure.
- Fixes some bugs in unit tests with uncaught scenarios, or faulty tests.

### Changed

- No previous API's were changed.
- Configuration has changed. Refer to upgrading from 1.0.0 to 1.1.0 below.
- Time is now always in UTC. Previously the API may have returned local time depending on underlying API.

#### API

- `/locations` - Show the list of configured named locations that can be used in the API.
- `/api/v1/swagger.yaml` - Provides OpenAPI document now at public endpoint when deployed.

#### API Deployment

- Configuration has changed. Refer to upgrading from 1.0.0 to 1.1.0 below.

#### SDK

- SDK was abstracted to provide a library for DLL import usage, which now allows users to use the SDK in their projects directly without the need to deploy an API. This is useful in scenarios where the API can not be centralised. Note - we still highly recommend centralising for management of the API and audit capabilities with observability.
- Functionality for forecast and historical data have been seperated into seperate interfaces. This impacts configuration, see upgrading from 1.0.0 to 1.1.0 for more information.
- Additional tests across the SDK have been added.
- Aggregation tier in the SDK was removed, this should not impact users of the SDK, but may impact maintainers who were actively contributing.


#### Other

- All contributors need to signoff commits for contribution using `git commit -s`.
- Added PR release workflow improvements for the project management of the CA SDK project team.
- Updated the project to prune stale PR's and issues to help with the management of the CA SDK project.


### Upgrading from 1.0.0 to 1.1.0

- Configuration changes are required due to historical and forecast configuration now being decoupled. Refer to - [Configuration](../docs/tutorial-extras/configuration) for a guide. The following is provided as an example of the new data source configuration format.
```json
{
"DataSources": {
"EmissionsDataSource": "Json",
"ForecastDataSource": "WattTime",
"Configurations": {
"WattTime": {
"Type": "WattTime",
"Username": "username",
"Password": "password",
"BaseURL": "https://api2.watttime.org/v2/",
"Proxy": {
"useProxy": true,
"url": "http://10.10.10.1",
"username": "proxyUsername",
"password": "proxyPassword"
}
},
"ElectricityMaps": {
"Type": "ElectricityMaps",
"APITokenHeader": "auth-token",
"APIToken": "myAwesomeToken",
"BaseURL": "https://api.electricitymap.org/v3/"
},
"Json": {
"Type": "Json",
"DataFileLocation": "test-data-azure-emissions.json"
}
}
}
}
```

90 changes: 90 additions & 0 deletions casdk-docs/blog/2023-07-18-release-1.1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
slug: release-v1.1
title: Release v1.1
tags: [v1.1, release]
---

Release 1.1



## [1.1.0] - 2023-18-07

### Added

- Added Electricity Maps (paid api) support for forecasting and historical data.
- Added ElectricityMaps (free api) support for historical data. Note that this API does not support forecast capabilities.

### Fixed

- Fixed generated test data that had time bomb bug that was in test data, which caused integration tests to fail. This is now automatically generated each time.
- Fixed some bugs that related to underlying data source errors surfacing as HTTP 500 errors from the API. These should now be more consistent.
- Fixed an issue where UTF-8 passwords were encoded as ASCII for WattTime API, causing integration failure.
- Fixes some bugs in unit tests with uncaught scenarios, or faulty tests.

### Changed

- No previous API's were changed.
- Configuration has changed. Refer to upgrading from 1.0.0 to 1.1.0 below.
- Time is now always in UTC. Previously the API may have returned local time depending on underlying API.

#### API

- `/locations` - Show the list of configured named locations that can be used in the API.
- `/api/v1/swagger.yaml` - Provides OpenAPI document now at public endpoint when deployed.

#### API Deployment

- Configuration has changed. Refer to upgrading from 1.0.0 to 1.1.0 below.

#### SDK

- SDK was abstracted to provide a library for DLL import usage, which now allows users to use the SDK in their projects directly without the need to deploy an API. This is useful in scenarios where the API can not be centralised. Note - we still highly recommend centralising for management of the API and audit capabilities with observability.
- Functionality for forecast and historical data have been seperated into seperate interfaces. This impacts configuration, see upgrading from 1.0.0 to 1.1.0 for more information.
- Additional tests across the SDK have been added.
- Aggregation tier in the SDK was removed, this should not impact users of the SDK, but may impact maintainers who were actively contributing.


#### Other

- All contributors need to signoff commits for contribution using `git commit -s`.
- Added PR release workflow improvements for the project management of the CA SDK project team.
- Updated the project to prune stale PR's and issues to help with the management of the CA SDK project.


### Upgrading from 1.0.0 to 1.1.0

- Configuration changes are required due to historical and forecast configuration now being decoupled. Refer to - [Configuration](../docs/tutorial-extras/configuration) for a guide. The following is provided as an example of the new data source configuration format.
```json
{
"DataSources": {
"EmissionsDataSource": "Json",
"ForecastDataSource": "WattTime",
"Configurations": {
"WattTime": {
"Type": "WattTime",
"Username": "username",
"Password": "password",
"BaseURL": "https://api2.watttime.org/v2/",
"Proxy": {
"useProxy": true,
"url": "http://10.10.10.1",
"username": "proxyUsername",
"password": "proxyPassword"
}
},
"ElectricityMaps": {
"Type": "ElectricityMaps",
"APITokenHeader": "auth-token",
"APIToken": "myAwesomeToken",
"BaseURL": "https://api.electricitymap.org/v3/"
},
"Json": {
"Type": "Json",
"DataFileLocation": "test-data-azure-emissions.json"
}
}
}
}
```

Loading