Skip to content

Commit

Permalink
renamed names in the source code
Browse files Browse the repository at this point in the history
  • Loading branch information
jolly-fellow committed May 15, 2023
1 parent 10fbf0b commit 4a23d64
Show file tree
Hide file tree
Showing 44 changed files with 422 additions and 422 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ Depending on the distro you are using will determine which `python3` package to

### DUNES installation on Linux <a name="dunes-linux"></a>

This is the fastest way to get started. From the [latest release](https://github.com/AntelopeIO/DUNE/releases/latest) page, download DUNES `*.deb` file or visit the [release tags](https://github.com/AntelopeIO/DUNE/releases) page to download specific version of DUNES deb package.
This is the fastest way to get started. From the [latest release](https://github.com/AntelopeIO/DUNES/releases/latest) page, download DUNES `*.deb` file or visit the [release tags](https://github.com/AntelopeIO/DUNES/releases) page to download specific version of DUNES deb package.

Once you have a `*.deb` file downloaded, you can install it as follows:
```bash
sudo apt-get update
sudo apt-get install -y ~/Downloads/antelopeio-dunes*.deb
sudo apt-get install -y ~/Downloads/dunes*.deb
```
Your download path may vary.

#### Alternative: DUNES installation using RPM package

From the [latest release](https://github.com/AntelopeIO/DUNE/releases/latest) page, download DUNES `*.rpm` file.
From the [latest release](https://github.com/AntelopeIO/DUNES/releases/latest) page, download DUNES `*.rpm` file.

Once you have a `*.rpm` file downloaded, you can install it as follows:
```bash
sudo rpm -i ~/Downloads/antelopeio-dunes*.rpm
sudo rpm -i ~/Downloads/dunes*.rpm
```
Your download path may vary.

Expand Down Expand Up @@ -107,7 +107,7 @@ $ echo "PATH=<LocationOfDUNES>:$PATH" >> .bashrc
If you want to rebuild the DUNES image pick your preferred terminal application and input the following command:

```console
<PathToDUNE>/DUNES$ ./bootstrap.sh
<PathToDUNES>/DUNES$ ./bootstrap.sh
```

### Windows 10 & 11
Expand All @@ -133,19 +133,19 @@ Visit the download page for [Python 3](https://python.org/downloads). You should
Make sure you mark "Add Python to PATH" during installation.
After installation open `cmd.exe` and verify `python --version` returns current Python version.

#### DUNE installation on Windows <a name="dune-windows"></a>
#### DUNES installation on Windows <a name="dunes-windows"></a>

1. Install [Chocolatey](https://docs.chocolatey.org/en-us/choco/setup).
2. Download latest `*.nupkg` from [latest release](https://github.com/AntelopeIO/DUNE/releases/latest) page.
2. Download latest `*.nupkg` from [latest release](https://github.com/AntelopeIO/DUNES/releases/latest) page.
3. Run PowerShell as administrator and go to the directory where your *`.nupkg` was downloaded.
4. Run following commands:
```
choco uninstall antelopeio-dune -y
choco uninstall dunes -y
choco install netfx-4.8 python311 docker-desktop -y
```
5. Now restart PowerShell as administrator again (so that `python` command could be executed) and run:
```
choco install .\antelopeio-dunes.1.1.0.nupkg -y
choco install .\dunes.1.1.0.nupkg -y
```
5. Restart your computer (this is because %PATH% has to be reloaded. In cmd.exe it is enough to run command `refreshenv`).
6. Open PowerShell / cmd.exe and try that following command works: `dunes.bat --version`.
Expand Down Expand Up @@ -284,7 +284,7 @@ This will build a given CMake app project. This command takes a directory to the
**--destroy-container**
This will destroy and remove the currently running container.
WARNING! This will delete all data that is running.
This is useful if you need to update to a new version of DUNE or if you corrupt the container some how.
This is useful if you need to update to a new version of DUNES or if you corrupt the container some how.

---

Expand All @@ -294,7 +294,7 @@ This will stop the currently running container.
---

**--start-container**
This will start the `dune` container.
This will start the `dunes` container.

---

Expand Down Expand Up @@ -381,7 +381,7 @@ The core concept of this utility is to abstract over Leap programs such as `node
As such some of the commands might seem restrictive. Please take note that if you find any of the commands to be too
restrictive then you can use the command `--` followed by whatever normal `cleos`, `nodeos`, CDT and OS commands that you need.

When you run any command with DUNE, if a container has not been created yet it will automatically create one for you.
When you run any command with DUNES, if a container has not been created yet it will automatically create one for you.
The command of `start-container` shouldn't necessarily be needed during normal operation.

A developer wallet is automatically created for you and is always unlocked
Expand Down
2 changes: 1 addition & 1 deletion bootstrap.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off

SET mypath=%~dp0
docker build --no-cache -f Dockerfile.win -t dune %mypath%
docker build --no-cache -f Dockerfile.win -t dunes %mypath%
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ if [[ $(uname) == "Darwin" ]]; then
GROUP_ID=200
fi

docker build --no-cache --build-arg USER_ID=0 --build-arg GROUP_ID="$GROUP_ID" $LEAP_ARGUMENT $CDT_ARGUMENT -f Dockerfile.unix -t dune "$SDIR"
docker build --no-cache --build-arg USER_ID=0 --build-arg GROUP_ID="$GROUP_ID" $LEAP_ARGUMENT $CDT_ARGUMENT -f Dockerfile.unix -t dunes "$SDIR"
8 changes: 4 additions & 4 deletions docs/PLUGIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ DUNES allows users to extend its functionality through the use of plugins. DUNES
2. In the aforementioned subdirectory you need to create script `main.py`.
3. `main.py` needs to define 3 functions:
1. `add_parsing(parser)` - function that receives instance of [argparse.ArgumentParser](https://docs.python.org/3/library/argparse.html). It is used to add new DUNES command parsing arguments.
2. (optionally) `set_dune(dune)` - function that receives instance of DUNES so the user could interact with DUNES. It might be stored for later usage if needed.
2. (optionally) `set_dunes(dunes)` - function that receives instance of DUNES so the user could interact with DUNES. It might be stored for later usage if needed.
3. `handle_args(args)` - function that receives populated namespace returned by [ArgumentParser.parse_args](https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.parse_args). It is used to handle new DUNES command arguments.


## Plugin examples
You can find example plugins in [plugin_example directory](../plugin_example/).
To test the example plugins, copy or symbolically link the contents of the [../plugin_example/](../plugin_example) directory into the [../src/plugin/](../src/plugin/) directory. This way, DUNES will automatically discover the new plugins.

### dune_hello
### dunes_hello
The simplest plugin, which adds `--hello` to DUNES commands. When command `dunes --hello` is executed then an example output is printed.

### account_setup
Plugin adds command `--bootstrap-account` to DUNES commands. When it is executed 3 example accounts are created: `alice`, `bob` and `cindy`.
Additionally the contract `eosio.token` is deployed to all above accounts.

In this example you can see how `set_dune` function is being used to store `dune` instance and later use it to create and prepare accounts.
In this example you can see how `set_dunes` function is being used to store `dunes` instance and later use it to create and prepare accounts.

## Implementation details
DUNES starts with auto-discovering the plugins in the `src/plugin` subdirectories and dynamically loading each `main.py` file. The functions from each plugin are then called in the following order:
1. `add_parsing(parser)` - this function is called first to add parsing arguments. Users can also initialize their plugin at this stage, however, it should be noted that at this point it is not known if the plugin will be used.
2. (optionally) `set_dune(dune)` - if the user wants to interact with DUNES, they should store the DUNES object in this function.
2. (optionally) `set_dunes(dunes)` - if the user wants to interact with DUNES, they should store the DUNES object in this function.
3. `handle_args(args)` - the user should check if their parsing arguments are being used and handle them in this function. This is the main function where the plugin does its job. The DUNES object is usually needed in this function.
10 changes: 5 additions & 5 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# How to prepare new DUNES release?

## How to generate a package on Windows?
1. Edit `packaging\antelopeio-dunes\antelopeio-dunes.nuspec` and edit the current version in XML tag `version`
1. Edit `packaging\antelopeio-dunes\dunes.nuspec` and edit the current version in XML tag `version`
2. If you do not have yet [Chocolatey](https://chocolatey.org/) installed open Windows console as administrator.
Otherwise you can open Windows console as a regular user.
3. Go to `packaging` directory and run `generate_chocolatey.bat` (if you run it for the first time then Chocolatey will be installed)
Expand All @@ -14,8 +14,8 @@ Otherwise you can open Windows console as a regular user.
3. Run `./bootstrap.sh` in your DUNES directory
4. Change below `X.Y.Z` to your version and in DUNES directory run:
```
docker tag dune ghcr.io/antelopeio/dune:latest
docker push ghcr.io/antelopeio/dune:latest
docker tag dune ghcr.io/antelopeio/dune:X.Y.Z
docker push ghcr.io/antelopeio/dune:X.Y.Z
docker tag dunes ghcr.io/antelopeio/dunes:latest
docker push ghcr.io/antelopeio/dunes:latest
docker tag dunes ghcr.io/antelopeio/dunes:X.Y.Z
docker push ghcr.io/antelopeio/dunes:X.Y.Z
```
Loading

0 comments on commit 4a23d64

Please sign in to comment.