|
1 | 1 | # Aleph Core Channel Node (CCN) |
2 | 2 |
|
3 | | -Next generation network of decentralized big data applications. Development follows the [Aleph Whitepaper](https://github.com/moshemalawach/aleph-whitepaper). |
| 3 | +Next generation network of decentralized cloud applications. Development follows the [Aleph Whitepaper](https://github.com/moshemalawach/aleph-whitepaper). |
4 | 4 |
|
5 | 5 | ## Documentation |
6 | 6 |
|
7 | 7 | Albeit still incomplete as it is a work in progress, documentation |
8 | 8 | can be found at http://pyaleph.readthedocs.io/ or |
9 | | -built from this repository with `$ python setup.py docs` |
| 9 | +built from this repository with `$ python setup.py docs`. |
10 | 10 |
|
11 | 11 | ## Deployment |
12 | 12 |
|
@@ -66,45 +66,27 @@ nix-shell |
66 | 66 | hatch run testing:test |
67 | 67 | ``` |
68 | 68 |
|
69 | | -### Run test locally |
| 69 | +### Run tests locally |
70 | 70 |
|
71 | | -We do not recommend that you run tests directly on your machine because of the |
72 | | -complexity of doing so but if you want to do it you need to: |
| 71 | +Running tests locally requires setting up a local test environment through Docker Compose. |
| 72 | +From the root of the project, run the following commands to start the environment: |
73 | 73 |
|
74 | | -- install [hatch](https://github.com/pypa/hatch), you can use pipx for that (`pipx install hatch`) or install it in a virtualenv |
75 | | -- install postgresql, at least version 15.1, `apt install postgresql` |
76 | | -- install redis, at least version 7, `apt install redis` |
77 | | -- have de nightly version of rust install, you can use [rustup](https://rustup.rs/) for that and do a `rustup default nightly` |
78 | | - |
79 | | -Then configure PostgreSQL for your local application using a `config.yml` file in the root of the project. |
80 | | - |
81 | | -Here is an not extensible example configuration: |
82 | | - |
83 | | -```yaml |
84 | | -postgres: |
85 | | - port: 5432 |
86 | | - user: username |
87 | | - password: password |
88 | | - host: # leave empty to use unix socket |
| 74 | +```shell |
| 75 | +# Copy the template config file for local development |
| 76 | +cp deployment/docker-build/config.yml . |
| 77 | +# Start the environment |
| 78 | +docker-compose -f deployment/docker-build/docker-compose.yml up -d |
89 | 79 | ``` |
90 | 80 |
|
91 | | -All overloadable and default values can be found in `src/aleph/config.py` and |
92 | | -you can also customize the redis connection this way. |
93 | | - |
94 | | -The you can run: |
| 81 | +Once the environment is up, you can simply run tests from your IDE or from the command line: |
95 | 82 |
|
96 | | -```bash |
97 | | -hatch run testing:test |
| 83 | +```shell |
| 84 | +pytest -v . |
98 | 85 | ``` |
99 | 86 |
|
100 | | -Or any of the env you can see using `hatch env show`. |
101 | | - |
102 | | -In case of doubt you can refer to the file `.github/workflows/pyaleph-ci.yml`, |
103 | | -this is how it runs on our CI. |
104 | | - |
105 | 87 | ## Software used |
106 | 88 |
|
107 | | -The Aleph CCN is written in Python and requires Python v3.8+. It will not work with older versions of Python. |
| 89 | +The Aleph CCN is written in Python and requires Python v3.12+. It will not work with older versions of Python. |
108 | 90 |
|
109 | 91 | It also relies on [IPFS](https://ipfs.io/). |
110 | 92 |
|
|
0 commit comments