Skip to content
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

feat!: reorganize crates #4970

Merged
merged 59 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
5f0941a
feat!: rename `iroha_client_cli` crate to `iroha_cli`, match director…
nxsaken Aug 12, 2024
e1ec009
refactor: merge `iroha_wasm_builder` with its CLI, move `iroha_swarm`…
nxsaken Aug 12, 2024
1ad53ad
refactor: move `iroha_executor` and `iroha_trigger` out of `iroha_sma…
nxsaken Aug 12, 2024
8bedd6c
refactor: rename `config` directory to `iroha_config`
nxsaken Aug 12, 2024
4ec97f8
refactor: rename `core` directory to `iroha_core`
nxsaken Aug 12, 2024
4d1c2e0
refactor: rename `crypto` directory to `iroha_crypto`
nxsaken Aug 12, 2024
8ac9e21
refactor: rename `data_model` directory to `iroha_data_model`
nxsaken Aug 12, 2024
a07ef6b
refactor: rename `futures` directory to `iroha_futures`
nxsaken Aug 12, 2024
6399f01
refactor: rename `logger` directory to `iroha_logger`
nxsaken Aug 12, 2024
2b00965
refactor: rename `macro` directory to `iroha_macro`
nxsaken Aug 12, 2024
8256962
refactor: rename `p2p` directory to `iroha_p2p`
nxsaken Aug 12, 2024
0bea88c
refactor: rename `telemetry` directory to `iroha_telemetry`
nxsaken Aug 12, 2024
6a1fd1e
refactor: rename `version` directory to `iroha_version`
nxsaken Aug 12, 2024
530e657
refactor: rename `genesis` directory to `iroha_genesis`
nxsaken Aug 12, 2024
da18633
refactor: rename `ffi` directory to `iroha_ffi`
nxsaken Aug 12, 2024
702a031
refactor: rename `executor` directory to `iroha_executor`
nxsaken Aug 12, 2024
66948ea
refactor: rename `trigger` directory to `iroha_trigger`
nxsaken Aug 12, 2024
13846de
refactor: rename `smart_contract` directory to `iroha_smart_contract`
nxsaken Aug 12, 2024
3a456e2
refactor: rename `primitives` directory to `iroha_primitives`
nxsaken Aug 12, 2024
26e88c6
refactor: rename `torii` directory to `iroha_torii`
nxsaken Aug 12, 2024
dd2bac3
refactor: rename `schema` directory to `iroha_schema`
nxsaken Aug 12, 2024
aaf9aac
refactor: rename `test_samples` to `iroha_test_samples`
nxsaken Aug 12, 2024
08f686e
refactor: rename `wasm_builder` to `iroha_wasm_builder`
nxsaken Aug 13, 2024
59c2445
refactor: rename `wasm_codec` to `iroha_wasm_codec`
nxsaken Aug 13, 2024
7ba4d97
refactor: unnest and rename `wasm_test_runner` to `iroha_wasm_test_ru…
nxsaken Aug 13, 2024
073ee91
refactor: unnest and rename `kagami` to `iroha_kagami`
nxsaken Aug 13, 2024
dbb58f5
refactor: unnest `kura_inspector`
nxsaken Aug 13, 2024
098d967
refactor: unnest and rename `parity_scale_cli` to `iroha_parity_scale…
nxsaken Aug 13, 2024
4350467
test: ignore test_docker directory
nxsaken Aug 13, 2024
7e700b8
fix: iroha_cli pytests
nxsaken Aug 13, 2024
1cb07eb
fix: workflow paths
nxsaken Aug 13, 2024
9141bac
build: use bin names in dockerfile
nxsaken Aug 13, 2024
b9c843e
fix: ui tests
nxsaken Aug 13, 2024
031523c
feat: rename `iroha_parity_scale_cli` to `iroha_codec`
nxsaken Aug 14, 2024
a09d6e8
fix: post-merge conflicts
nxsaken Aug 14, 2024
9d28003
refactor: unnest `iroha_config` satellite crates
nxsaken Aug 19, 2024
6536453
refactor: unnest and rename `test_network` to `iroha_test_network`
nxsaken Aug 19, 2024
ec1c653
refactor: unnest `iroha_data_model_derive`
nxsaken Aug 19, 2024
aa44420
refactor: unnest `iroha_ffi_derive`
nxsaken Aug 19, 2024
cd98d9b
refactor: unnest `iroha_futures_derive`
nxsaken Aug 19, 2024
85a9770
refactor: unnest `iroha_executor` satellite crates
nxsaken Aug 19, 2024
dcf6a0b
refactor: unnest `iroha_macro` satellite crates
nxsaken Aug 19, 2024
a99c205
refactor: unnest `iroha_primitives` satellite crates
nxsaken Aug 19, 2024
8d5bf2b
refactor: unnest `iroha_schema` satellite crates
nxsaken Aug 19, 2024
5a62423
refactor: unnest `iroha_smart_contract` satellite crates
nxsaken Aug 19, 2024
27ce947
refactor: unnest `iroha_telemetry` satellite crates
nxsaken Aug 19, 2024
e2f2070
refactor: unnest `iroha_torii` satellite crates
nxsaken Aug 19, 2024
dced097
refactor: unnest `iroha_trigger` satellite crates
nxsaken Aug 19, 2024
28ac1e9
refactor: unnest `iroha_version` satellite crates
nxsaken Aug 19, 2024
3e4487c
refactor: unnest `iroha_wasm_codec_derive`, rename from `iroha_core_w…
nxsaken Aug 19, 2024
cb7b067
refactor: move crates to `crates` directory
nxsaken Aug 19, 2024
957b0ba
refactor: unnest pytests from crate directories
nxsaken Aug 19, 2024
9a7ce8a
refactor: use wildcard in workspace members
nxsaken Aug 20, 2024
6c3bc1d
style: formatting
nxsaken Aug 20, 2024
6246d64
fix: update wasm test related paths
nxsaken Aug 20, 2024
7c9f726
fix(pytests): use relative imports
nxsaken Aug 20, 2024
1ddb043
fix: use correct defaults directory in `kura_not_miss_replace_block`
nxsaken Sep 9, 2024
c05feaa
build: update Cargo.lock
nxsaken Sep 10, 2024
ab4c1de
fix: imports
nxsaken Sep 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 5 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ updates:

- package-ecosystem: "pip"
target-branch: "main"
directory: "/client_cli/pytests/"
directories:
- /pytests/*
schedule:
interval: "daily"
commit-message:
Expand All @@ -30,16 +31,9 @@ updates:

- package-ecosystem: "cargo"
target-branch: "main"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: chore
include: scope

- package-ecosystem: "cargo"
target-branch: "main"
directory: "/wasm_samples/"
directories:
- /
- /wasm_samples
schedule:
interval: "daily"
commit-message:
Expand Down
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ api-changes:
- changed-files:
- any-glob-to-any-file:
- 'docs/source/references/schema.json'
- 'torii/src/**'
- 'torii/const/src/**'
- 'crates/iroha_torii/src/**'
- 'crates/iroha_torii_const/src/**'

config-changes:
- all:
Expand Down
40 changes: 13 additions & 27 deletions .github/workflows/iroha2-dev-pr-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: I2::Dev::Static

on:
pull_request:
branches: [main]
branches: [ main ]
paths:
- '**.rs'
- '**.json'
- '**.toml'
- '.github/workflows/iroha2-dev-pr-static.yml'
- 'client_cli/pytests/**/*.py'
- 'pytests/**.py'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -62,39 +62,25 @@ jobs:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2024-09-09
strategy:
matrix:
suite: [ iroha_cli_tests, iroha_torii_tests ]
steps:
- uses: actions/checkout@v4
- name: Install dependencies using Poetry for client_cli/pytests
working-directory: client_cli/pytests
- name: Install dependencies using Poetry for pytests/${{ matrix.suite }}
working-directory: pytests/${{ matrix.suite }}
run: |
poetry lock --no-update
poetry install
- name: Install dependencies using Poetry for torii/pytests
working-directory: torii/pytests
run: |
poetry lock --no-update
poetry install
- name: Check code formatting with Black in client_cli/pytests
working-directory: client_cli/pytests
run: |
poetry run black --check .
- name: Check code formatting with Black in torii/pytests
working-directory: torii/pytests
- name: Check code formatting with Black in pytests/${{ matrix.suite }}
working-directory: pytests/${{ matrix.suite }}
run: |
poetry run black --check .
- name: Run mypy (Type Checker) in client_cli/pytests
working-directory: client_cli/pytests
- name: Run mypy (Type Checker) in pytests/${{ matrix.suite }}
working-directory: pytests/${{ matrix.suite }}
run: |
poetry run mypy --explicit-package-bases --ignore-missing-imports .
- name: Run mypy (Type Checker) in torii/pytests
working-directory: torii/pytests
run: |
poetry run mypy --explicit-package-bases --ignore-missing-imports .
- name: Run flake8 (Linter) in client_cli/pytests
working-directory: client_cli/pytests
run: |
poetry run flake8 . --max-line-length=110 --ignore=F401,W503,E203
- name: Run flake8 (Linter) in torii/pytests
working-directory: torii/pytests
- name: Run flake8 (Linter) in pytests/${{ matrix.suite }}
working-directory: pytests/${{ matrix.suite }}
run: |
poetry run flake8 . --max-line-length=110 --ignore=F401,W503,E203
30 changes: 20 additions & 10 deletions .github/workflows/iroha2-dev-pr-wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,25 @@ on:
pull_request:
branches: [main]
paths:
- 'data_model/**.rs'
- 'data_model/**.yml'
- 'data_model/**.json'
- 'data_model/**.toml'
- 'crates/iroha_data_model/**.rs'
- 'crates/iroha_data_model/**.yml'
- 'crates/iroha_data_model/**.json'
- 'crates/iroha_data_model/**.toml'

- 'smart_contract/**.rs'
- 'smart_contract/**.yml'
- 'smart_contract/**.json'
- 'smart_contract/**.toml'
- 'crates/iroha_smart_contract/**.rs'
- 'crates/iroha_smart_contract/**.yml'
- 'crates/iroha_smart_contract/**.json'
- 'crates/iroha_smart_contract/**.toml'

- 'crates/iroha_executor/**.rs'
- 'crates/iroha_executor/**.yml'
- 'crates/iroha_executor/**.json'
- 'crates/iroha_executor/**.toml'

- 'crates/iroha_trigger/**.rs'
- 'crates/iroha_trigger/**.yml'
- 'crates/iroha_trigger/**.json'
- 'crates/iroha_trigger/**.toml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -54,7 +64,7 @@ jobs:
name: executor.wasm
path: ${{ env.DOCKER_COMPOSE_PATH }}
- name: Install iroha_wasm_test_runner
run: cargo install --path tools/wasm_test_runner
run: cargo install --path crates/iroha_wasm_test_runner
- name: Run smart contract tests on WebAssembly VM
working-directory: smart_contract
working-directory: crates/iroha_smart_contract
run: mold --run cargo test -p iroha_smart_contract -p iroha_smart_contract_utils --release --tests --target wasm32-unknown-unknown --no-fail-fast --quiet
28 changes: 16 additions & 12 deletions .github/workflows/iroha2-dev-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

env:
CARGO_TERM_COLOR: always
CLIENT_CLI_DIR: "/__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/test"
IROHA_CLI_DIR: "/__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/test"
DOCKER_COMPOSE_PATH: defaults
TEST_DIR: "tmp/test"
IROHA_BIN: "iroha"
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
path: ${{ env.DOCKER_COMPOSE_PATH }}/executor.wasm
retention-days: 1

# exclude: client/tests/integration/
# exclude: iroha/tests/integration/
with_coverage:
runs-on: [self-hosted, Linux, iroha2]
needs: build_executor
Expand All @@ -83,16 +83,16 @@ jobs:
LLVM_PROFILE_FILE: "iroha-%p-%m.profraw"
- name: Generate lcov report
if: always()
run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/client_cli" --ignore "**/main.rs" -o lcov.info
run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "crates/iroha_cli" --ignore "**/main.rs" -o lcov.info
- name: Upload lcov report artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: lcov.info
path: lcov.info

# include: client/tests/integration/
# exclude: client/tests/integration/extra_functional
# include: iroha/tests/integration/
# exclude: iroha/tests/integration/extra_functional
integration:
runs-on: [self-hosted, Linux, iroha2]
needs: build_executor
Expand All @@ -110,7 +110,7 @@ jobs:
- name: Run tests, with no-default-features
run: mold --run cargo test --no-default-features --no-fail-fast -p iroha integration -- --skip extra_functional

# include: client/tests/integration/extra_functional
# include: iroha/tests/integration/extra_functional
extra_functional:
runs-on: [self-hosted, Linux, iroha2]
needs: build_executor
Expand Down Expand Up @@ -230,18 +230,21 @@ jobs:
docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.local.yml down
- name: Run docker-compose.yml containers
run: docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml up --wait || exit 1

- name: Install Python and Poetry
run: |
yum install -y python${{ env.PYTHON_VERSION }} python${{ env.PYTHON_VERSION }}-devel
curl -sSL https://install.python-poetry.org | python3 -
echo 'export PATH="${{ env.POETRY_PATH }}:$PATH"' >> /etc/profile
source /etc/profile

- name: Install Torii API Dependencies
working-directory: torii/pytests
working-directory: pytests/iroha_torii_tests
run: ${{ env.POETRY_PATH }} install
- name: Run Torii API Tests
working-directory: torii/pytests
working-directory: pytests/iroha_torii_tests
run: ${{ env.POETRY_PATH }} run pytest

- name: Copy Client CLI Binary from Iroha Container
if: always()
run: |
Expand All @@ -251,14 +254,15 @@ jobs:
- name: Make Binaries Executable
run: chmod +x ${{ env.TEST_DIR }}/${{ env.IROHA_BIN }}
- name: Install Client CLI Dependencies
working-directory: client_cli/pytests
working-directory: pytests/iroha_cli_tests
run: ${{ env.POETRY_PATH }} install
- name: Run Client CLI Tests
working-directory: client_cli/pytests
working-directory: pytests/iroha_cli_tests
env:
CLIENT_CLI_BINARY: ../../${{ env.TEST_DIR }}/${{ env.IROHA_BIN }}
CLIENT_CLI_CONFIG: ../../${{ env.TEST_DIR }}/client.toml
IROHA_CLI_BINARY: ../../${{ env.TEST_DIR }}/${{ env.IROHA_BIN }}
IROHA_CLI_CONFIG: ../../${{ env.TEST_DIR }}/client.toml
run: ${{ env.POETRY_PATH }} run pytest

- name: Wipe docker-compose.yml containers
if: always()
run: docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml down
3 changes: 2 additions & 1 deletion .github/workflows/iroha2-pr-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
pull_request:
branches: [main, stable, lts]
paths:
- '**/derive/**.rs'
- 'crates/*_derive/**.rs'
- 'crates/*_macro*/**.rs'
- '**/tests/ui.rs'
- '**/tests/ui_*/**'
- 'rust-toolchain.toml'
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**/rusty-tags.vi
/**/Cargo.lock

config/__pycaсhe__
crates/iroha_config/__pycaсhe__
**/__pycache__/*
__pycache__/*
build/*
Expand Down Expand Up @@ -32,7 +32,7 @@ CMakeFiles/*
cmake-build-debu/*
cmake-build-debug/*
external/*
core/infra/protobuf
crates/iroha_core/infra/protobuf
include/generated/*
.obsidian/
.scannerwork/
Expand All @@ -50,5 +50,5 @@ result
/iroha-java/
/lcov.info
**/test-smartcontracts/

test_docker
**/*.wasm
Loading
Loading