Skip to content

Commit

Permalink
Merge pull request #209 from Chia-Network/develop
Browse files Browse the repository at this point in the history
Release 1.0.40
  • Loading branch information
TheLastCicada authored Nov 4, 2024
2 parents b90ecca + f2c60a5 commit 0ce5d00
Show file tree
Hide file tree
Showing 40 changed files with 2,701 additions and 1,803 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
MODE="dev"
CHIA_ROOT="~/.chia/testnet10"
CONFIG_PATH="climate_token/config/config.yaml"
SERVER_PORT=31999
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup Python
uses: Chia-Network/actions/setup-python@main
with:
python-version: '3'
python-version: "3"

- name: Install commitizen
run: |
Expand Down
48 changes: 24 additions & 24 deletions .github/workflows/build-installers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:
branches:
- stage
tags:
- '**'
- "**"
pull_request:
branches:
- '**'
- "**"
workflow_dispatch: {}

concurrency:
Expand All @@ -32,22 +32,22 @@ jobs:
app-name: climate-tokenization-chia
app-mode: registry
app-description: "Carbon tokenization application on the Chia blockchain"
add-to-apt: 'true'
add-to-apt: "true"
- name: explorer
app-name: climate-explorer-chia
app-mode: explorer
app-description: "Interface for tracking Chia on-chain carbon tokens"
add-to-apt: 'true'
add-to-apt: "true"
- name: client
app-name: climate-token-driver
app-mode: client
app-description: "Embedded climate token driver for carbon tokens on the Chia blockchain"
add-to-apt: 'false'
add-to-apt: "false"
- name: dev
app-name: dev-token-driver-chia
app-mode: dev
app-description: "Token driver in dev mode"
add-to-apt: 'false'
add-to-apt: "false"

os:
- name: Linux
Expand All @@ -57,22 +57,22 @@ jobs:
arm: [Linux, ARM64]
intel: [ubuntu-latest]
artifact-os-name: linux
executable-extension: ''
executable-extension: ""
- name: macOS
matrix: macos
emoji: 🍎
runs-on:
arm: [macOS, ARM64]
intel: [macos-latest]
arm: [macos-13-arm64]
intel: [macos-13]
artifact-os-name: macos
executable-extension: ''
executable-extension: ""
- name: Windows
matrix: windows
emoji: 🪟
runs-on:
intel: [windows-latest]
artifact-os-name: windows
executable-extension: '.exe'
executable-extension: ".exe"
arch:
- name: ARM
matrix: arm
Expand All @@ -86,9 +86,9 @@ jobs:
electron-builder-options: --x64
preconfiguration:
- name: default
cadt-api-server-host: 'https://observer.climateactiondata.org/api'
cadt-api-server-host: "https://observer.climateactiondata.org/api"
- name: testneta
cadt-api-server-host: 'https://chia-cadt-demo.chiamanaged.com/observer'
cadt-api-server-host: "https://chia-cadt-demo.chiamanaged.com/observer"
exclude:
- os:
matrix: windows
Expand All @@ -111,18 +111,19 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: 'recursive'
submodules: "recursive"

- name: Setup Python
uses: Chia-Network/actions/setup-python@main
with:
python-version: '3.10'
python-version: "3.10"

- name: Create .env file
run: |
echo "MODE=${{ matrix.config.app-mode }}" > .env
echo 'CHIA_ROOT="~/.chia/mainnet"' >> .env
echo 'CONFIG_PATH="climate_token/config/config.yaml"' >> .env
echo 'SERVER_PORT=31999' >> .env
- name: Apply preconfigurations
if: matrix.preconfiguration.name != 'default'
Expand Down Expand Up @@ -242,9 +243,9 @@ jobs:
- name: Create zip files for release
uses: thedoctor0/[email protected]
with:
type: 'zip'
type: "zip"
filename: ${{ matrix.config.app-name }}_${{ matrix.os.artifact-os-name }}_${{ steps.tag-name.outputs.TAGNAME || github.sha }}_${{ matrix.arch.artifact-name }}.zip
directory: 'artifacts'
directory: "artifacts"
if: startsWith(github.ref, 'refs/tags/') && matrix.preconfiguration.name == 'default'

- name: Release executable
Expand Down Expand Up @@ -275,7 +276,6 @@ jobs:
retention-days: 1
if: startsWith(github.ref, 'refs/tags/') && matrix.os.matrix == 'linux' && matrix.config.add-to-apt == 'true' && matrix.arch.name == 'Intel' && matrix.preconfiguration.name == 'default'


apt-upload:
name: Trigger update in apt repo
runs-on: ubuntu-latest
Expand Down Expand Up @@ -318,11 +318,11 @@ jobs:
echo "Array being passed is ${APPS_ARRAY}"
echo "APPLICATIONS=${APPS_ARRAY}" >> $GITHUB_OUTPUT
- name: Gets JWT Token from GitHub
uses: Chia-Network/actions/github/jwt@main

- name: Trigger apt repo update
run: |
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"climate_tokenization_repo":"${{ steps.repo-name.outputs.REPO_NAME }}","application_name":"${{ steps.apt-metadata.outputs.APPLICATIONS }}","release_version":"${{ steps.tag-name.outputs.TAGNAME }}","add_debian_version":"true","arm64":"available"}' ${{ secrets.GLUE_API_URL }}/api/v1/climate-tokenization/${{ github.sha }}/start
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"climate_tokenization_repo":"${{ steps.repo-name.outputs.REPO_NAME }}","application_name":"${{ steps.apt-metadata.outputs.APPLICATIONS }}","release_version":"${{ steps.tag-name.outputs.TAGNAME }}","add_debian_version":"true","arm64":"available"}' ${{ secrets.GLUE_API_URL }}/api/v1/climate-tokenization/${{ github.sha }}/success/deploy
if: startsWith(github.ref, 'refs/tags/')
uses: Chia-Network/actions/github/glue@main
with:
json_data: '{"climate_tokenization_repo":"${{ steps.repo-name.outputs.REPO_NAME }}","application_name":"${{ steps.apt-metadata.outputs.APPLICATIONS }}","release_version":"${{ steps.tag-name.outputs.TAGNAME }}","add_debian_version":"true","arm64":"available"}'
glue_url: ${{ secrets.GLUE_API_URL }}
glue_project: "climate-tokenization"
glue_path: "trigger"
2 changes: 1 addition & 1 deletion .github/workflows/ensure-version-increment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Check Version Increment
on:
pull_request:
branches:
- 'main'
- "main"

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: 🚨 pre-commit

on:
pull_request:
push:
branches:
- "long_lived/**"
- main
- "release/**"

concurrency:
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

jobs:
pre-commit:
name: ${{ matrix.os.name }} ${{ matrix.python.major_dot_minor }}
runs-on: ${{ matrix.os.runs-on }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os:
- name: Linux
matrix: linux
runs-on: ubuntu-latest
- name: macOS
matrix: macos
runs-on: macos-13-arm64
python:
- major_dot_minor: "3.10"
- major_dot_minor: "3.11"
- major_dot_minor: "3.12"

steps:
- name: Clean workspace
uses: Chia-Network/actions/clean-workspace@main

- uses: Chia-Network/actions/git-mark-workspace-safe@main

- name: disable git autocrlf
run: |
git config --global core.autocrlf false
- uses: actions/checkout@v4

- uses: Chia-Network/actions/setup-python@main
with:
python-version: ${{ matrix.python.major_dot_minor }}

- name: Create virtual environment
uses: Chia-Network/actions/create-venv@main
id: create-venv

- name: Activate virtual environment
uses: Chia-Network/actions/activate-venv@main
with:
directories: ${{ steps.create-venv.outputs.activate-venv-directories }}

- name: Run poetry install
uses: Chia-Network/actions/poetry@main
with:
poetry-command: "install --with dev"

- env:
CHIA_MANAGE_CLVM_CHECK_USE_CACHE: "false"
CHIA_MANAGE_MYPY_CHECK_EXCLUSIONS: "true"
run: poetry run pre-commit run --all-files --verbose
4 changes: 2 additions & 2 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Create release notes
on:
push:
tags:
- '**'
- "**"

permissions:
contents: write
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Setup Python
uses: Chia-Network/actions/setup-python@main
with:
python-version: '3'
python-version: "3"

- name: Install commitizen
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- stage
pull_request:
branches:
- '**'
- "**"

jobs:
test:
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Setup Python
uses: Chia-Network/actions/setup-python@main
with:
python-version: '3.10'
python-version: "3.10"

- name: Create virtual environment
uses: Chia-Network/actions/create-venv@main
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "chia-blockchain"]
path = chia-blockchain
url = ../chia-blockchain.git
76 changes: 40 additions & 36 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
repos:
- hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
- hooks:
- id: flake8
repo: https://github.com/pycqa/flake8
rev: 6.1.0
- hooks:
- args:
- --profile
- black
id: isort
repo: https://github.com/pycqa/isort
rev: 5.12.0
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 23.7.0
- hooks:
- entry: mypy
id: mypy
language: system
name: mypy
types:
- python
- pyi
repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
- hooks:
- id: commitizen
stages:
- commit-msg
repo: https://github.com/commitizen-tools/commitizen
rev: v2.27.1
- hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
- hooks:
- id: flake8
repo: https://github.com/pycqa/flake8
rev: 6.1.0
- hooks:
- args:
- --profile
- black
id: isort
repo: https://github.com/pycqa/isort
rev: 5.12.0
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 23.7.0
- hooks:
- entry: mypy
id: mypy
language: system
name: mypy
pass_filenames: false
repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
- hooks:
- id: commitizen
stages:
- commit-msg
repo: https://github.com/commitizen-tools/commitizen
rev: v2.27.1
- hooks:
- id: prettier
types_or: [ini, json, toml, yaml, markdown]
exclude: CHANGELOG.md
repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@

### Fix

- update climate warehouse and ui parameter names
- update climate warehouse and ui parameter names
- add exit code for incorrect host configuration
- format host conditional
- require localhost unless running in explorer mode
Expand Down
Loading

0 comments on commit 0ce5d00

Please sign in to comment.