Skip to content
Snippets Groups Projects
Commit 3f12e397 authored by Your Name's avatar Your Name
Browse files

include doc

parent 70315bea
No related branches found
No related tags found
No related merge requests found
Pipeline #25436 canceled
before_script:
- |
docker build --build-arg CACHE_BUSTER=$(openssl rand -hex 12) --build-arg USER=${CI_REGISTRY_USER} --build-arg PASS=${CI_JOB_TOKEN} -t hwmd -f - . <<EOF
FROM debian:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y bash git gcc-12 openmpi-bin libopenmpi-dev build-essential python3 pip indent
RUN rm /usr/lib/python*/EXTERNALLY-MANAGED
RUN pip install -U autopep8 Jinja2 numpy PyYAML libclang
ENV HW_FLAGS="-Wl,--no-as-needed"
ENV MPIRUN='mpirun --allow-run-as-root -n 2'
ENV OMP_NUM_THREADS=2
ARG USER
ARG PASS
RUN git config --global url."https://\${USER}:\${PASS}@www.ict.inaf.it/gitlab".insteadOf ssh://git@git.ia2.inaf.it
WORKDIR /app
COPY . /app
EOF
testing:
script:
- docker run hwmd bash -c './test_install_octree.bash; ./test_checkup.bash; ./test_pip_all.bash; ./test_editable.bash; ./test_bulk.bash'
\ No newline at end of file
......@@ -9,7 +9,7 @@ For the user that is not going to edit the code and is only interested in runnin
For instance, to perform a simulation with particle mesh one can execute:
```bash
pip install 'hotwheels_PM[tested] @ git+ssh://git@git.ia2.inaf.it/hotwheels/PM.git@v0.0.0alpha'
::include{file=test_install_octree.bash}
```
This will install also the following hotwheels packages: core, io, timestep.
......@@ -20,7 +20,7 @@ The `[tested]` tag will install the versions of the dependencies used to test th
To run the C and python tests of the installed `hotwheels` components, run:
```bash
python -m hotwheels.checkup hotwheels
::include{file=test_checkup.bash}
```
Here below some relevant environment variables to change hotwheels default settings:
......@@ -46,10 +46,7 @@ Here below some relevant environment variables to change hotwheels default setti
In case you want to run the module with other `hotwheel` component version you can install each manually:
```bash
pip install git+ssh://git@git.ia2.inaf.it/hotwheels/core.git@v0.0.0alpha
pip install git+ssh://git@git.ia2.inaf.it/hotwheels/io.git@v0.0.0alpha
pip install git+ssh://git@git.ia2.inaf.it/hotwheels/timestep.git@v0.0.0alpha
pip install git+ssh://git@git.ia2.inaf.it/hotwheels/PM.git@v0.0.0alpha
::include{file=test_pip_all.bash}
```
## If you need to put hands on the source code
......@@ -58,14 +55,7 @@ In case you find that you need to edit the source code of hotwheels (maybe you f
can re-install a python module in **editable mode (use -e in pip install)**. For instance, let's suppose that now you need to edit the timestep module and re-run all tests. You can do the following
```bash
git clone ssh://git@git.ia2.inaf.it/hotwheels/timestep.git
cd timestep
# very IMPORTANT the -e will install in editable mode
pip install -e .
#
# edit the files of your choice. Edits will take effect
# without the need of re-installing the package
#
::include{file=test_editable.bash}
```
## Bulk install of all modules
......@@ -73,11 +63,11 @@ pip install -e .
In case you need to work on many modules, you can clone and install all default packages with the [cloneall.bash](cloneall.bash) script:
```bash
wget https://www.ict.inaf.it/gitlab/hotwheels/gitlab-profile/-/raw/main/cloneall.bash
bash cloneall.bash -c # will clone all hotwheels modules
::include{file=test_editable.bash}
```
If you want to create a folder with all the modules soft-linked into the folder `hotwheels/*`, add the flag `-l` to `cloneall.bash` to get this folder tree in a folder named `full/hotwheels/*`. This is helpful in navigating the files with the IDE when development has strong refactoring and one need to edit multiple modules.
If you want to create a folder with all the modules soft-linked into the folder `hotwheels/*`, add the flag `-l` to `cloneall.bash` to get this folder tree in a folder named `full/hotwheels/*`.
This is helpful in navigating the files with the IDE when development has strong refactoring and one need to edit multiple modules.
If you want to also create a multi-windows tmux session where each panel corresponds to a hotwheels module add the flag `-t` to `cloneall.bash` (will laso include the folder `full` if exists).
......
wget https://www.ict.inaf.it/gitlab/hotwheels/gitlab-profile/-/raw/main/cloneall.bash
bash cloneall.bash -c # will clone all hotwheels modules
python3 -m hotwheels_core.checkup hotwheels_io
git clone ssh://git@git.ia2.inaf.it/hotwheels/timestep.git
cd timestep
# very IMPORTANT the -e will install in editable mode
pip install -e .
#
# edit the files of your choice. Edits will take effect
# without the need of re-installing the package
#
pip install 'hotwheels_io[tested] @ git+ssh://git@git.ia2.inaf.it/hotwheels/io.git@v0.0.2alpha'
pip install git+ssh://git@git.ia2.inaf.it/hotwheels/core.git@v0.0.2alpha
pip install git+ssh://git@git.ia2.inaf.it/hotwheels/io.git@v0.0.2alpha
pip install git+ssh://git@git.ia2.inaf.it/hotwheels/timestep.git@v0.0.2alpha
pip install git+ssh://git@git.ia2.inaf.it/hotwheels/octree.git@v0.0.2alpha
pip install git+ssh://git@git.ia2.inaf.it/hotwheels/domain.git@v0.0.2alpha
pip install git+ssh://git@git.ia2.inaf.it/hotwheels/PM.git@v0.0.2alpha
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment