Skip to content

[Version 3] feat: allow_multiple_runs is true by default #780

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

Merged
merged 29 commits into from
Apr 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a760db8
feat(api): add auth to project token endpoints (#746)
inimaz Jan 18, 2025
06a5ee5
feat(carbonserver) allow accessing public project data
prmths128 Jan 14, 2025
d983019
chore(deps): bump next from 14.2.15 to 14.2.21 in /webapp (#762)
dependabot[bot] Jan 19, 2025
66a3831
feat: update project settings (name +description) (#761)
inimaz Jan 19, 2025
7749bae
fix: redirect user to dashboard after cli account creation (#763)
SaboniAmine Jan 19, 2025
039ddbc
chore: bump version (#765)
SaboniAmine Jan 19, 2025
b2ec679
Create FUNDING.yml
benoit-cty Jan 22, 2025
fac18b6
Improve arguments consistency in track_emissions decorator
LucasHaug Jan 22, 2025
097878c
feat: allow_multiple_runs is true by default
inimaz Feb 6, 2025
b2315a7
ci: deploy app from ci (#772)
inimaz Jan 26, 2025
718ebf5
deps bump
benoit-cty Jan 28, 2025
80c634c
Check if tracker iniialized.
benoit-cty Jan 28, 2025
606f0da
Fix empty country
Jan 29, 2025
c75b5e3
Bump deps
Jan 29, 2025
4b5ea69
Fix(lock): SIGTERM handling to allow cleanup code execution (#785)
Ucodia Feb 13, 2025
5330cbd
fix(api): auth context can read project
inimaz Mar 8, 2025
b1844c0
fix: unit test
inimaz Mar 8, 2025
6286fd2
fix: minor change in log that says where the codecarbon output is (#794)
inimaz Mar 9, 2025
3470d55
chore(carbonserver) remove unused users endpoint
prmths128 Mar 9, 2025
6d2d9ec
Add Intel Core Ultra 7 165H
FrejaThoresen Mar 20, 2025
a2748c5
fix: update nextjs to latest to prevent known vulnerability
inimaz Mar 25, 2025
f53ab98
chores: split github workflows (#812)
inimaz Apr 1, 2025
d39a1cb
Feat: create new experiment from the webapp (#816)
inimaz Apr 4, 2025
edbded8
chore(deps): bump @babel/runtime from 7.24.8 to 7.27.0 in /webapp (#811)
dependabot[bot] Apr 4, 2025
9a8aa47
feat(ui): share project page (#818)
alexphiev Apr 11, 2025
289ba32
Update cpu_power.csv
benoit-cty Apr 11, 2025
e902c4b
fix line feed
Apr 13, 2025
d4fea24
rebuild docs
Apr 13, 2025
344feb6
bump deps
Apr 13, 2025
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
15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: mlco2 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
#patreon: # Replace with a single Patreon username
#open_collective: # Replace with a single Open Collective username
#ko_fi: # Replace with a single Ko-fi username
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
#liberapay: # Replace with a single Liberapay username
#issuehunt: # Replace with a single IssueHunt username
#lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
#polar: # Replace with a single Polar username
#buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
#thanks_dev: # Replace with a single thanks.dev username
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
90 changes: 90 additions & 0 deletions .github/workflows/build-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: build server

on:
pull_request:
paths:
- "carbonserver/**"
- "pyproject.toml"
push:
paths:
- "carbonserver/**"
- "pyproject.toml"
branches: [master]

jobs:
build_server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Clean pip cache
run: pip cache purge
- name: Install dependencies
run: |
python -m pip install --upgrade pip

- name: Unit tests on api
run: |
pip install hatch==1.13.0 hatchling==1.25.0
hatch run api:test-unit

test_api_server:
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:16
# Provide the password for postgres
env:
POSTGRES_DB: codecarbon_db
POSTGRES_PASSWORD: supersecret
POSTGRES_USER: codecarbon-user
POSTGRES_HOST: localhost
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5480:5432

steps:
# Downloads a copy of the code in your repository before running CI tests
- name: Check out repository code
uses: actions/checkout@v4

# Performs a clean installation of all dependencies
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch==1.13.0 hatchling==1.25.0

- name: Setup PostgreSQL
# Runs a script that creates a PostgreSQL table, populates
# the table with data, and then retrieves the data.
run: hatch run api:setup-db

env:
# The hostname used to communicate with the PostgreSQL service container
DATABASE_URL: postgresql://codecarbon-user:supersecret@localhost:5480/codecarbon_db

- name: Run API tests
env:
CODECARBON_API_URL: http://localhost:8008
# The hostname used to communicate with the PostgreSQL service container
DATABASE_URL: postgresql://codecarbon-user:supersecret@localhost:5480/codecarbon_db
run: |
# hatch run api:server-ci &
sleep 2
# netstat -o -n -a | grep 8008
# hatch run api:test-integ
35 changes: 35 additions & 0 deletions .github/workflows/build-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: build ui

on:
pull_request:
paths:
- "webapp/**"
- "pyproject.toml"
push:
paths:
- "webapp/**"
- "pyproject.toml"
branches: [master]

jobs:
build-ui:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
working-directory: ./webapp
run: pnpm install
- name: Build
working-directory: ./webapp
run: pnpm run build
- name: Check formatting with Prettier
working-directory: ./webapp
run: pnpm exec prettier . --check
192 changes: 0 additions & 192 deletions .github/workflows/build.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy to Clever Cloud

on:
push:
paths:
- "carbonserver/**"
- "webapp/**"
- "pyproject.toml"
branches: [master]

jobs:
production:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Same as git fetch --unshallow
clean: true # Remove any untracked files or modifications

- name: Install Clever Tools CLI
run: |
CC_VERSION=latest
curl -s -O https://clever-tools.clever-cloud.com/releases/${CC_VERSION}/clever-tools-${CC_VERSION}_linux.tar.gz
tar -xvf clever-tools-${CC_VERSION}_linux.tar.gz
PATH=${PATH}:$(pwd)/clever-tools-${CC_VERSION}_linux

- name: Login to Clever Cloud
env:
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
run: ./clever-tools-latest_linux/clever login --token ${{ secrets.CLEVER_TOKEN }} --secret ${{ secrets.CLEVER_SECRET }}

- name: Deploy backend to Clever Cloud (PROD)
env:
CLEVER_APP_ID: ${{ secrets.BE_CLEVER_APP_ID_PROD }}
APP_NAME: cc_api_prod
run: |
./clever-tools-latest_linux/clever link $CLEVER_APP_ID
./clever-tools-latest_linux/clever deploy -f -a $APP_NAME --quiet

- name: Deploy frontend to Clever Cloud (PROD)
env:
CLEVER_APP_ID: ${{ secrets.FE_CLEVER_APP_ID_PROD }}
APP_NAME: cc_dashboard_prod
run: |
./clever-tools-latest_linux/clever link $CLEVER_APP_ID
./clever-tools-latest_linux/clever deploy -f -a $APP_NAME --quiet
Loading
Loading