chia-dev-tools 0.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. chia_dev_tools-0.0.0/.github/actions/install/action.yml +40 -0
  2. chia_dev_tools-0.0.0/.github/actions/install/install.ps1 +2 -0
  3. chia_dev_tools-0.0.0/.github/actions/install/install.sh +3 -0
  4. chia_dev_tools-0.0.0/.github/dependabot.yml +80 -0
  5. chia_dev_tools-0.0.0/.github/workflows/codeql-analysis.yml +40 -0
  6. chia_dev_tools-0.0.0/.github/workflows/dependency-review.yml +26 -0
  7. chia_dev_tools-0.0.0/.github/workflows/precommit.yml +74 -0
  8. chia_dev_tools-0.0.0/.github/workflows/publish-to-pypi.yml +60 -0
  9. chia_dev_tools-0.0.0/.github/workflows/run-test-suite.yml +104 -0
  10. chia_dev_tools-0.0.0/.github/workflows/super-linter.yml +73 -0
  11. chia_dev_tools-0.0.0/.github/workflows/test-blockchain-main.yml +45 -0
  12. chia_dev_tools-0.0.0/.gitignore +11 -0
  13. chia_dev_tools-0.0.0/.markdown-lint.yml +38 -0
  14. chia_dev_tools-0.0.0/.pre-commit-config.yaml +46 -0
  15. chia_dev_tools-0.0.0/.repo-content-updater.yml +2 -0
  16. chia_dev_tools-0.0.0/LICENSE +201 -0
  17. chia_dev_tools-0.0.0/PKG-INFO +175 -0
  18. chia_dev_tools-0.0.0/README.md +128 -0
  19. chia_dev_tools-0.0.0/activated.ps1 +13 -0
  20. chia_dev_tools-0.0.0/activated.py +30 -0
  21. chia_dev_tools-0.0.0/activated.sh +13 -0
  22. chia_dev_tools-0.0.0/cdv/__init__.py +9 -0
  23. chia_dev_tools-0.0.0/cdv/clibs/__init__.py +0 -0
  24. chia_dev_tools-0.0.0/cdv/clibs/condition_codes.clib +38 -0
  25. chia_dev_tools-0.0.0/cdv/clibs/curry_and_treehash.clib +68 -0
  26. chia_dev_tools-0.0.0/cdv/clibs/sha256tree.clib +11 -0
  27. chia_dev_tools-0.0.0/cdv/clibs/singleton_truths.clib +21 -0
  28. chia_dev_tools-0.0.0/cdv/clibs/utility_macros.clib +26 -0
  29. chia_dev_tools-0.0.0/cdv/cmds/__init__.py +0 -0
  30. chia_dev_tools-0.0.0/cdv/cmds/chia_inspect.py +769 -0
  31. chia_dev_tools-0.0.0/cdv/cmds/cli.py +124 -0
  32. chia_dev_tools-0.0.0/cdv/cmds/clsp.py +205 -0
  33. chia_dev_tools-0.0.0/cdv/cmds/rpc.py +360 -0
  34. chia_dev_tools-0.0.0/cdv/cmds/util.py +47 -0
  35. chia_dev_tools-0.0.0/cdv/examples/__init__.py +0 -0
  36. chia_dev_tools-0.0.0/cdv/examples/clsp/__init__.py +0 -0
  37. chia_dev_tools-0.0.0/cdv/examples/clsp/piggybank.clsp +45 -0
  38. chia_dev_tools-0.0.0/cdv/examples/clsp/piggybank.clsp.hex +1 -0
  39. chia_dev_tools-0.0.0/cdv/examples/clvm/__init__.py +0 -0
  40. chia_dev_tools-0.0.0/cdv/examples/drivers/__init__.py +0 -0
  41. chia_dev_tools-0.0.0/cdv/examples/drivers/piggybank_drivers.py +36 -0
  42. chia_dev_tools-0.0.0/cdv/examples/tests/__init__.py +0 -0
  43. chia_dev_tools-0.0.0/cdv/examples/tests/test_piggybank.py +131 -0
  44. chia_dev_tools-0.0.0/cdv/test/__init__.py +714 -0
  45. chia_dev_tools-0.0.0/cdv/test/test_skeleton.py +22 -0
  46. chia_dev_tools-0.0.0/cdv/util/__init__.py +0 -0
  47. chia_dev_tools-0.0.0/cdv/util/keys.py +38 -0
  48. chia_dev_tools-0.0.0/cdv/util/load_clvm.py +101 -0
  49. chia_dev_tools-0.0.0/cdv/util/sign_coin_spends.py +65 -0
  50. chia_dev_tools-0.0.0/chia_dev_tools.egg-info/PKG-INFO +175 -0
  51. chia_dev_tools-0.0.0/chia_dev_tools.egg-info/SOURCES.txt +82 -0
  52. chia_dev_tools-0.0.0/chia_dev_tools.egg-info/dependency_links.txt +1 -0
  53. chia_dev_tools-0.0.0/chia_dev_tools.egg-info/entry_points.txt +2 -0
  54. chia_dev_tools-0.0.0/chia_dev_tools.egg-info/requires.txt +17 -0
  55. chia_dev_tools-0.0.0/chia_dev_tools.egg-info/top_level.txt +2 -0
  56. chia_dev_tools-0.0.0/mypy.ini +20 -0
  57. chia_dev_tools-0.0.0/pyproject.toml +7 -0
  58. chia_dev_tools-0.0.0/pytest.ini +3 -0
  59. chia_dev_tools-0.0.0/ruff.toml +95 -0
  60. chia_dev_tools-0.0.0/setup.cfg +4 -0
  61. chia_dev_tools-0.0.0/setup.py +64 -0
  62. chia_dev_tools-0.0.0/tests/__init__.py +0 -0
  63. chia_dev_tools-0.0.0/tests/build-init-files.py +71 -0
  64. chia_dev_tools-0.0.0/tests/cmds/__init__.py +0 -0
  65. chia_dev_tools-0.0.0/tests/cmds/object_files/coinrecords/coinrecord.hex +1 -0
  66. chia_dev_tools-0.0.0/tests/cmds/object_files/coinrecords/coinrecord.json +11 -0
  67. chia_dev_tools-0.0.0/tests/cmds/object_files/coinrecords/coinrecord_invalid.json +8 -0
  68. chia_dev_tools-0.0.0/tests/cmds/object_files/coinrecords/coinrecord_metadata.json +5 -0
  69. chia_dev_tools-0.0.0/tests/cmds/object_files/coins/coin.json +3 -0
  70. chia_dev_tools-0.0.0/tests/cmds/object_files/coins/coin_invalid.json +3 -0
  71. chia_dev_tools-0.0.0/tests/cmds/object_files/coins/coin_metadata.json +5 -0
  72. chia_dev_tools-0.0.0/tests/cmds/object_files/spendbundles/spendbundle.hex +1 -0
  73. chia_dev_tools-0.0.0/tests/cmds/object_files/spendbundles/spendbundle.json +12 -0
  74. chia_dev_tools-0.0.0/tests/cmds/object_files/spendbundles/spendbundle_invalid.json +10 -0
  75. chia_dev_tools-0.0.0/tests/cmds/object_files/spendbundles/spendbundle_metadata.json +5 -0
  76. chia_dev_tools-0.0.0/tests/cmds/object_files/spends/spend.hex +1 -0
  77. chia_dev_tools-0.0.0/tests/cmds/object_files/spends/spend.json +5 -0
  78. chia_dev_tools-0.0.0/tests/cmds/object_files/spends/spend_2.json +5 -0
  79. chia_dev_tools-0.0.0/tests/cmds/object_files/spends/spend_invalid.json +5 -0
  80. chia_dev_tools-0.0.0/tests/cmds/object_files/spends/spend_metadata.json +5 -0
  81. chia_dev_tools-0.0.0/tests/cmds/test_cdv.py +64 -0
  82. chia_dev_tools-0.0.0/tests/cmds/test_clsp.py +208 -0
  83. chia_dev_tools-0.0.0/tests/cmds/test_inspect.py +459 -0
  84. chia_dev_tools-0.0.0/tests/test_skeleton.py +22 -0
@@ -0,0 +1,40 @@
1
+ name: "Install chia-dev=tools"
2
+
3
+ description: "Run the platform appropriate installer script."
4
+
5
+ inputs:
6
+ python-version:
7
+ description: "Value to be set for INSTALL_PYTHON_VERSION."
8
+ required: false
9
+ default: ""
10
+ development:
11
+ description: "Install development dependencies."
12
+ required: false
13
+ default: ""
14
+ automated:
15
+ description: "Automated install, no questions."
16
+ required: false
17
+ default: "true"
18
+ command-prefix:
19
+ description: "Text to place before the command such as `arch -arm64` for non-native macOS runners."
20
+ required: false
21
+ default: ""
22
+
23
+ runs:
24
+ using: "composite"
25
+ steps:
26
+ - name: Run install script (macOS, Ubuntu)
27
+ if: runner.os == 'macos' || runner.os == 'linux'
28
+ shell: bash
29
+ env:
30
+ INSTALL_PYTHON_VERSION: ${{ inputs.python-version }}
31
+ run: |
32
+ ${{ inputs.command-prefix }} ./.github/actions/install/install.sh
33
+
34
+ - name: Run install script (Windows)
35
+ if: runner.os == 'windows'
36
+ shell: pwsh
37
+ env:
38
+ INSTALL_PYTHON_VERSION: ${{ inputs.python-version }}
39
+ run: |
40
+ ${{ inputs.command-prefix }} ./.github/actions/install/install.ps1
@@ -0,0 +1,2 @@
1
+ python -m pip install --upgrade pip wheel
2
+ python -m pip install .[dev]
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+ pip install --upgrade pip wheel
3
+ pip install ."[dev]"
@@ -0,0 +1,80 @@
1
+ # This file is managed by the repo-content-updater project. Manual changes here will result in a PR to bring back
2
+ # inline with the upstream template, unless you remove the dependabot managed file property from the repo
3
+
4
+ version: 2
5
+ updates:
6
+ - package-ecosystem: "gomod"
7
+ directory: /
8
+ schedule:
9
+ interval: "weekly"
10
+ day: "tuesday"
11
+ open-pull-requests-limit: 10
12
+ rebase-strategy: auto
13
+ labels:
14
+ - dependencies
15
+ - go
16
+ - "Changed"
17
+ reviewers: ["cmmarslender", "Starttoaster"]
18
+ groups:
19
+ global:
20
+ patterns:
21
+ - "*"
22
+
23
+ - package-ecosystem: "pip"
24
+ directory: /
25
+ schedule:
26
+ interval: "weekly"
27
+ day: "tuesday"
28
+ open-pull-requests-limit: 10
29
+ rebase-strategy: auto
30
+ labels:
31
+ - dependencies
32
+ - python
33
+ - "Changed"
34
+ reviewers: ["emlowe", "altendky"]
35
+
36
+ - package-ecosystem: "github-actions"
37
+ directories: ["/", ".github/actions/*"]
38
+ schedule:
39
+ interval: "weekly"
40
+ day: "tuesday"
41
+ open-pull-requests-limit: 10
42
+ rebase-strategy: auto
43
+ labels:
44
+ - dependencies
45
+ - github_actions
46
+ - "Changed"
47
+ reviewers: ["cmmarslender", "altendky"]
48
+
49
+ - package-ecosystem: "npm"
50
+ directory: /
51
+ schedule:
52
+ interval: "weekly"
53
+ day: "tuesday"
54
+ open-pull-requests-limit: 10
55
+ rebase-strategy: auto
56
+ labels:
57
+ - dependencies
58
+ - javascript
59
+ - "Changed"
60
+ reviewers: ["cmmarslender", "ChiaMineJP"]
61
+
62
+ - package-ecosystem: cargo
63
+ directory: /
64
+ schedule:
65
+ interval: "weekly"
66
+ day: "tuesday"
67
+ open-pull-requests-limit: 10
68
+ rebase-strategy: auto
69
+ labels:
70
+ - dependencies
71
+ - rust
72
+ - "Changed"
73
+
74
+ - package-ecosystem: swift
75
+ directory: /
76
+ schedule:
77
+ interval: "weekly"
78
+ day: "tuesday"
79
+ open-pull-requests-limit: 10
80
+ rebase-strategy: auto
@@ -0,0 +1,40 @@
1
+ name: "CodeQL"
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ # The branches below must be a subset of the branches above
8
+ branches: [ "main" ]
9
+ schedule:
10
+ - cron: '20 21 * * 1'
11
+
12
+ jobs:
13
+ analyze:
14
+ name: Analyze
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ actions: read
18
+ contents: read
19
+ security-events: write
20
+
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ language: [ 'python' ]
25
+
26
+ steps:
27
+ - name: Checkout repository
28
+ uses: actions/checkout@v5
29
+
30
+ # Initializes the CodeQL tools for scanning.
31
+ - name: Initialize CodeQL
32
+ uses: github/codeql-action/init@v4
33
+ with:
34
+ languages: ${{ matrix.language }}
35
+
36
+ - name: Autobuild
37
+ uses: github/codeql-action/autobuild@v4
38
+
39
+ - name: Perform CodeQL Analysis
40
+ uses: github/codeql-action/analyze@v4
@@ -0,0 +1,26 @@
1
+ # Managed by repo-content-updater
2
+ # Dependency Review Action
3
+ #
4
+ # This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
5
+ #
6
+ # Source repository: https://github.com/actions/dependency-review-action
7
+ # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
8
+ name: "🚨 Dependency Review"
9
+ on: [pull_request]
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ dependency-review:
16
+ if: github.repository_owner == 'Chia-Network'
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: "Checkout Repository"
20
+ uses: actions/checkout@v5
21
+
22
+ - name: "Dependency Review"
23
+ uses: actions/dependency-review-action@v4
24
+ with:
25
+ allow-dependencies-licenses: pkg:pypi/pyinstaller
26
+ deny-licenses: AGPL-1.0-only, AGPL-1.0-or-later, AGPL-1.0-or-later, AGPL-3.0-or-later, GPL-1.0-only, GPL-1.0-or-later, GPL-2.0-only, GPL-2.0-or-later, GPL-3.0-only, GPL-3.0-or-later
@@ -0,0 +1,74 @@
1
+ name: 🚨 pre-commit
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ concurrency:
10
+ # SHA is added to the end if on `main` to let all main workflows run
11
+ group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
12
+ cancel-in-progress: true
13
+
14
+ jobs:
15
+ pre-commit:
16
+ name: ${{ matrix.os.name }} ${{ matrix.arch.name }}
17
+ runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ os:
22
+ - name: Linux
23
+ matrix: linux
24
+ runs-on:
25
+ intel: ubuntu-latest
26
+ arm: [linux, arm64]
27
+ - name: macOS
28
+ matrix: macos
29
+ runs-on:
30
+ intel: macos-15-intel
31
+ arm: macos-13-arm64
32
+ - name: Windows
33
+ matrix: windows
34
+ runs-on:
35
+ intel: windows-latest
36
+ arch:
37
+ - name: ARM64
38
+ matrix: arm
39
+ - name: Intel
40
+ matrix: intel
41
+ python:
42
+ - major_dot_minor: "3.12"
43
+ exclude:
44
+ - os:
45
+ matrix: windows
46
+ arch:
47
+ matrix: arm
48
+
49
+ steps:
50
+ - name: Clean workspace
51
+ uses: Chia-Network/actions/clean-workspace@main
52
+
53
+ - name: Add safe git directory
54
+ uses: Chia-Network/actions/git-mark-workspace-safe@main
55
+
56
+ - name: disable git autocrlf
57
+ run: |
58
+ git config --global core.autocrlf false
59
+
60
+ - uses: actions/checkout@v5
61
+ with:
62
+ fetch-depth: 0
63
+
64
+ - uses: Chia-Network/actions/setup-python@main
65
+ with:
66
+ python-version: ${{ matrix.python.major_dot_minor }}
67
+
68
+ - uses: ./.github/actions/install
69
+ with:
70
+ development: true
71
+
72
+ - uses: pre-commit/action@v3.0.1
73
+ with:
74
+ extra_args: --verbose --all-files
@@ -0,0 +1,60 @@
1
+ name: Publish Python distributions to PyPI and TestPyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+ id-token: write
10
+
11
+ jobs:
12
+ build-n-publish:
13
+ name: Build and publish Python distributions to PyPI and TestPyPI
14
+ runs-on: ubuntu-22.04
15
+ steps:
16
+ - uses: actions/checkout@v5
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - run: |
21
+ git fetch origin +refs/tags/*:refs/tags/*
22
+
23
+ - name: Set Job Env
24
+ uses: Chia-Network/actions/setjobenv@main
25
+ env:
26
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27
+
28
+ - name: Set up Python 3.12
29
+ uses: Chia-Network/actions/setup-python@main
30
+ with:
31
+ python-version: "3.12"
32
+
33
+ - name: Install build tools (pep517 compatible)
34
+ run: >-
35
+ python -m
36
+ pip install ."[dev]"
37
+ build
38
+ --user
39
+
40
+ - name: Build a binary wheel and a source tarball
41
+ run: >-
42
+ python -m
43
+ build
44
+ --sdist
45
+ --outdir dist/
46
+ .
47
+ - name: Publish distribution to Test PyPI
48
+ if: env.PRE_RELEASE == 'true'
49
+ uses: pypa/gh-action-pypi-publish@release/v1
50
+ with:
51
+ repository_url: https://test.pypi.org/legacy/
52
+ packages-dir: dist/
53
+ skip-existing: true
54
+
55
+ - name: Publish distribution to PyPI
56
+ if: env.FULL_RELEASE == 'true'
57
+ uses: pypa/gh-action-pypi-publish@release/v1
58
+ with:
59
+ packages-dir: dist/
60
+ skip-existing: true
@@ -0,0 +1,104 @@
1
+ name: Run Test Suite
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - main
8
+ tags:
9
+ - "**"
10
+ pull_request:
11
+ branches:
12
+ - "**"
13
+
14
+ concurrency:
15
+ group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}--${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
16
+ cancel-in-progress: true
17
+
18
+ defaults:
19
+ run:
20
+ shell: bash
21
+
22
+ jobs:
23
+ build:
24
+ name: Test - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }}
25
+ runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
26
+ timeout-minutes: 30
27
+ strategy:
28
+ fail-fast: false
29
+ matrix:
30
+ os:
31
+ - name: macOS
32
+ matrix: macos
33
+ runs-on:
34
+ arm: [macos-13-arm64]
35
+ intel: [macos-15-intel]
36
+ - name: Ubuntu
37
+ matrix: ubuntu
38
+ runs-on:
39
+ arm: [Linux, ARM64]
40
+ intel: [ubuntu-latest]
41
+ - name: Windows
42
+ matrix: windows
43
+ runs-on:
44
+ intel: [windows-latest]
45
+ python:
46
+ - major-dot-minor: "3.10"
47
+ matrix: "3.10"
48
+ - major-dot-minor: "3.11"
49
+ matrix: "3.11"
50
+ - major-dot-minor: "3.12"
51
+ matrix: "3.12"
52
+ arch:
53
+ - name: ARM
54
+ matrix: arm
55
+ - name: Intel
56
+ matrix: intel
57
+ exclude:
58
+ - os:
59
+ matrix: windows
60
+ arch:
61
+ matrix: arm
62
+ - os:
63
+ matrix: macos
64
+ arch:
65
+ matrix: arm
66
+
67
+ steps:
68
+ - name: Clean workspace
69
+ uses: Chia-Network/actions/clean-workspace@main
70
+
71
+ - name: Checkout Code
72
+ uses: actions/checkout@v5
73
+ with:
74
+ fetch-depth: 0
75
+
76
+ - uses: Chia-Network/actions/setup-python@main
77
+ with:
78
+ python-version: ${{ matrix.python.major-dot-minor }}
79
+
80
+ - uses: Chia-Network/actions/create-venv@main
81
+ id: create-venv
82
+
83
+ - uses: Chia-Network/actions/activate-venv@main
84
+ with:
85
+ directories: ${{ steps.create-venv.outputs.activate-venv-directories }}
86
+
87
+ - name: Test code with pytest
88
+ if: runner.os == 'Linux' || runner.os == 'macOS'
89
+ shell: bash
90
+ run: |
91
+ python3 -m venv venv
92
+ . ./venv/bin/activate
93
+ pip install ."[dev]"
94
+ ./venv/bin/chia init
95
+ ./venv/bin/pytest tests/ cdv/examples/tests -s -v --durations 0
96
+
97
+ - name: Test code with pytest
98
+ if: runner.os == 'Windows'
99
+ shell: powershell
100
+ run: |
101
+ python -m pip install --upgrade pip
102
+ python -m pip install .[dev]
103
+ chia init
104
+ pytest tests\ cdv\examples\tests -s -v --durations 0
@@ -0,0 +1,73 @@
1
+ ---
2
+ ###########################
3
+ ###########################
4
+ ## Linter GitHub Actions ##
5
+ ###########################
6
+ ###########################
7
+ name: GithHub Super Linter
8
+
9
+ #
10
+ # Documentation:
11
+ # https://github.com/github/super-linter
12
+ # https://help.github.com/en/articles/workflow-syntax-for-github-actions
13
+ #
14
+
15
+ on:
16
+ push:
17
+ branches:
18
+ - main
19
+ tags:
20
+ - '**'
21
+ pull_request:
22
+ branches:
23
+ - '**'
24
+
25
+ ###############
26
+ # Set the Job #
27
+ ###############
28
+ jobs:
29
+ build:
30
+ # Name the Job
31
+ name: Lint Code Base
32
+ # Set the agent to run on
33
+ runs-on: ubuntu-latest
34
+ timeout-minutes: 60
35
+
36
+ ##################
37
+ # Load all steps #
38
+ ##################
39
+ steps:
40
+ ##########################
41
+ # Checkout the code base #
42
+ ##########################
43
+ - name: Checkout Code
44
+ uses: actions/checkout@v5
45
+
46
+ ################################
47
+ # Run Linter against code base #
48
+ ################################
49
+ - name: Lint Code Base
50
+ uses: github/super-linter@v5
51
+ env:
52
+ VALIDATE_ALL_CODEBASE: true
53
+ DEFAULT_BRANCH: main
54
+ LINTER_RULES_PATH: .
55
+ VALIDATE_BASH: true
56
+ VALIDATE_CSS: true
57
+ VALIDATE_DOCKER: true
58
+ VALIDATE_GO: true
59
+ VALIDATE_HTML: true
60
+ VALIDATE_JAVASCRIPT_ES: true
61
+ VALIDATE_JSON: true
62
+ VALIDATE_MD: true
63
+ VALIDATE_POWERSHELL: true
64
+ VALIDATE_PYTHON: false
65
+ VALIDATE_TYPESCRIPT_ES: true
66
+ VALIDATE_YAML: true
67
+ DISABLE_ERRORS: false
68
+ PYTHONPATH: ${{ github.workspace }}:$PYTHONPATH
69
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70
+ FILTER_REGEX_EXCLUDE: .*github/ISSUE_TEMPLATE/config.yml
71
+ # ACTIONS_RUNNER_DEBUG: true
72
+
73
+ ...
@@ -0,0 +1,45 @@
1
+ name: Test against chia-blockchain main
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - main
8
+ tags:
9
+ - "**"
10
+ pull_request:
11
+ branches:
12
+ - "**"
13
+
14
+ concurrency:
15
+ group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}--${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
16
+ cancel-in-progress: true
17
+
18
+ jobs:
19
+ build:
20
+ name: All tests@main
21
+ runs-on: ubuntu-latest
22
+ timeout-minutes: 30
23
+ strategy:
24
+ fail-fast: false
25
+ max-parallel: 4
26
+
27
+ steps:
28
+ - name: Checkout Code
29
+ uses: actions/checkout@v5
30
+ with:
31
+ fetch-depth: 0
32
+
33
+ - name: Setup Python environment
34
+ uses: Chia-Network/actions/setup-python@main
35
+ with:
36
+ python-version: "3.12"
37
+
38
+ - name: Test code with pytest
39
+ run: |
40
+ python3 -m venv venv
41
+ . ./venv/bin/activate
42
+ sed -i 's/chia-blockchain.*/chia-blockchain @ git+https:\/\/github.com\/Chia-Network\/chia-blockchain.git@main\",/g' setup.py
43
+ pip install ."[dev]"
44
+ ./venv/bin/chia init
45
+ ./venv/bin/pytest tests/ cdv/examples/tests -s -v --durations 0
@@ -0,0 +1,11 @@
1
+ /chia_dev_tools.egg-info
2
+ /build
3
+ /venv
4
+ /dist
5
+ /include
6
+ /.eggs
7
+ __pycache__/
8
+ main.sym
9
+ .coverage
10
+ .idea
11
+ .DS_Store
@@ -0,0 +1,38 @@
1
+ ---
2
+ ###########################
3
+ ###########################
4
+ ## Markdown Linter rules ##
5
+ ###########################
6
+ ###########################
7
+
8
+ # Linter rules doc:
9
+ # - https://github.com/DavidAnson/markdownlint
10
+ #
11
+ # Note:
12
+ # To comment out a single error:
13
+ # <!-- markdownlint-disable -->
14
+ # any violations you want
15
+ # <!-- markdownlint-restore -->
16
+ #
17
+
18
+ ###############
19
+ # Rules by id #
20
+ ###############
21
+ MD004: false # Unordered list style
22
+ MD007:
23
+ indent: 2 # Unordered list indentation
24
+ MD013:
25
+ line_length: 808 # Line length
26
+ MD024:
27
+ allow_different_nesting: true
28
+ MD026:
29
+ punctuation: ".,;:!。,;:" # List of not allowed
30
+ MD029: false # Ordered list item prefix
31
+ MD033: false # Allow inline HTML
32
+ MD036: false # Emphasis used instead of a heading
33
+ MD041: false # Allow file to start without h1
34
+
35
+ #################
36
+ # Rules by tags #
37
+ #################
38
+ blank_lines: false # Error on blank lines
@@ -0,0 +1,46 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: init_py_files
5
+ name: __init__.py files
6
+ entry: python3 tests/build-init-files.py -v --root .
7
+ language: python
8
+ pass_filenames: false
9
+ additional_dependencies: [click~=8.1]
10
+ - repo: local
11
+ hooks:
12
+ - id: ruff_format
13
+ name: ruff format
14
+ entry: ./activated.py ruff format
15
+ language: system
16
+ require_serial: true
17
+ types_or: [python, pyi]
18
+ - repo: local
19
+ hooks:
20
+ - id: ruff
21
+ name: Ruff
22
+ entry: ./activated.py ruff check --fix
23
+ language: system
24
+ types: [python]
25
+ - repo: https://github.com/scop/pre-commit-shfmt
26
+ rev: v3.10.0-2
27
+ hooks:
28
+ - id: shfmt
29
+ args: ["--diff", "--write", "-i", "2"]
30
+ - repo: https://github.com/pre-commit/pre-commit-hooks
31
+ rev: v5.0.0
32
+ hooks:
33
+ - id: check-yaml
34
+ - id: end-of-file-fixer
35
+ exclude: ".*?(.hex|.clvm|.clib)"
36
+ - id: trailing-whitespace
37
+ - id: check-merge-conflict
38
+ - id: check-ast
39
+ - id: debug-statements
40
+ - repo: local
41
+ hooks:
42
+ - id: mypy
43
+ name: mypy
44
+ entry: ./activated.py mypy
45
+ language: system
46
+ pass_filenames: false
@@ -0,0 +1,2 @@
1
+ var_overrides:
2
+ DEPENDABOT_ACTIONS_REVIEWERS: '["cmmarslender", "altendky"]'