Skip to content

Commit

Permalink
README update (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
approxit authored May 4, 2023
1 parent b95ab83 commit 650a945
Showing 1 changed file with 51 additions and 33 deletions.
84 changes: 51 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,74 @@
# Golem Core

## Current state
## Install

Few apps are in a "pretty advanced POC" state:
This project uses [Poetry](https://python-poetry.org/) for management, which needs to be installed to run following instructions.
Checkout the repository and run:

* blender - just like the `yapapi` blender
* verification by redundance
* yacat-with-business-logic ("Run as many tasks as possible but ensure they cost at most X per result")
```bash
$ poetry install
```

## Start
## Examples

### Install
To run examples you need invoke them via poetry:

```
poetry install
```bash
$ poetry run python examples/rate_providers/rate_providers.py
```

### Docs
## CLI

```
poetry run poe sphinx
firefox build/api.html
```bash
$ python -m golem_core status

$ python -m golem_core find-node --runtime vm
$ python -m golem_core find-node --runtime vm --subnet public-beta
$ python -m golem_core find-node --runtime vm --timeout 7 # stops after 7 seconds
$ python -m golem_core find-node --runtime vm --timeout 1m # stops after 60 seconds

$ python -m golem_core allocation list

$ python -m golem_core allocation new 1
$ python -m golem_core allocation new 2 --driver erc20 --network rinkeby

$ python -m golem_core allocation clean
```

### Examples
## Docs

1. `low_example.py` - few low-level interface examples
2. `mid_example.py` - a mid-level interface example
3. `cli_example.sh` - command line interface example
4. `blender.py`
5. `redundace.py` - verification by redundance example
6. `yacat.py` - yacat with business logic
7. `detached_activity.py` - create activity, print activity\_id, stop (but keep the activity running)
8. `attach.py` - take an activity\_id and start using it
To build docs run following commands:

```bash
$ poetry run poe sphinx
```

## CLI
Then you can open `build/api.html` file in your web browser.

## Contributing

### Running code auto format

```bash
python3 -m golem_core status
$ poetry run poe format
```

python3 -m golem_core find-node --runtime vm
python3 -m golem_core find-node --runtime vm --subnet public-beta
python3 -m golem_core find-node --runtime vm --timeout 7 # stops after 7 seconds
python3 -m golem_core find-node --runtime vm --timeout 1m # stops after 60 seconds
### Running code checks

python3 -m golem_core allocation list
```bash
$ poetry run poe checks
```

### Running tests

python3 -m golem_core allocation new 1
python3 -m golem_core allocation new 2 --driver erc20 --network rinkeby
Unit tests:

python3 -m golem_core allocation clean
```bash
$ poetry run poe tests_unit
```

"Status" command is not really useful now, but we don't yet have components to make it good.
Integration tests (requires running local `yagna` in requestor mode or `goth` in interactive mode):

```bash
$ poetry run poe tests_integration
```

0 comments on commit 650a945

Please sign in to comment.