Skip to content

Commit 889b04f

Browse files
committed
readme: updated installation instructions
docs: updated installation instructions fix: changed git link for integration_tests of cloning model repo. Updated plotting in reporting
1 parent df2dbe0 commit 889b04f

File tree

6 files changed

+31
-17
lines changed

6 files changed

+31
-17
lines changed

README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,25 @@
3838
The core of `floatCSEP` is built around the `pyCSEP`
3939
package (https://github.com/sceccode/pycsep), which itself contains the core dependencies.
4040

41-
The simplest way to install `floatCSEP`, is by creating a `conda`
42-
environment (https://conda.io - checkout Anaconda or Miniconda) and install `pyCSEP`
41+
## Stable Release
42+
43+
The simplest way to install `floatCSEP` is by creating a `conda`
44+
environment (https://conda.io - checkout Anaconda or Miniforge) and install `floatCSEP`
4345
from `conda-forge`
4446

4547
```
46-
conda env create -n $NAME
48+
conda create -n $NAME -y
4749
conda activate $NAME
48-
conda install -c conda-forge pycsep
50+
conda install -c conda-forge floatcsep -y
4951
```
5052

53+
## Latest version
54+
5155
Clone and install the floatCSEP source code using `pip`
5256

5357
```
58+
conda create -n $NAME -y
59+
conda activate $NAME
5460
git clone https://github.com/cseptesting/floatcsep
5561
cd floatcsep
5662
pip install .

docs/intro/installation.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To install **floatCSEP**, first a ``conda`` manager should be installed (https:/
1818

1919
.. code-block:: console
2020
21-
$ conda env create -n csep_env
21+
$ conda create -n csep_env
2222
$ conda activate csep_env
2323
2424
Then, clone and install the floatCSEP source code using ``pip``
@@ -60,7 +60,7 @@ Having a ``conda`` manager installed (https://conda.io), type in a console:
6060

6161
.. code-block:: console
6262
63-
$ conda env create -n csep_env
63+
$ conda create -n csep_env
6464
$ conda activate csep_env
6565
$ conda install -c conda-forge floatcsep
6666
@@ -95,7 +95,7 @@ It is recommended (not obligatory) to use a ``conda`` environment to make sure y
9595

9696
.. code-block:: console
9797
98-
$ conda env create -n csep_dev
98+
$ conda create -n csep_dev
9999
$ conda activate csep_dev
100100
$ git clone https://github.com/${your_fork}/floatcsep
101101
$ cd floatcsep

floatcsep/postprocess/plot_handler.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ def plot_forecasts(experiment: "Experiment") -> None:
8888

8989
for model in experiment.models:
9090
for window in time_windows:
91-
ax = model.get_forecast(window, experiment.region).plot(
92-
plot_args=plot_forecast_config
93-
)
91+
forecast = model.get_forecast(window, region=experiment.region)
92+
ax = forecast.plot(plot_args=plot_forecast_config)
9493

9594
# If catalog option is passed, catalog is plotted on top of the forecast
9695
if plot_forecast_config.get("catalog"):

floatcsep/postprocess/reporting.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,14 @@ def generate_report(experiment, timewindow=-1):
5959
report.add_figure(
6060
"Input catalog",
6161
[
62-
experiment.registry.get_figure("main_catalog_map"),
63-
experiment.registry.get_figure("main_catalog_time"),
62+
os.path.relpath(
63+
experiment.registry.get_figure("main_catalog_map"),
64+
experiment.registry.run_dir,
65+
),
66+
os.path.relpath(
67+
experiment.registry.get_figure("main_catalog_time"),
68+
experiment.registry.run_dir,
69+
),
6470
],
6571
level=3,
6672
ncols=1,
@@ -78,7 +84,12 @@ def generate_report(experiment, timewindow=-1):
7884
fig_path = experiment.registry.get_figure(timestr, test)
7985
width = test.plot_args[0].get("figsize", [4])[0] * 96
8086
report.add_figure(
81-
f"{test.name}", fig_path, level=3, caption=test.markdown, add_ext=True, width=width
87+
f"{test.name}",
88+
os.path.relpath(fig_path, experiment.registry.run_dir),
89+
level=3,
90+
caption=test.markdown,
91+
add_ext=True,
92+
width=width,
8293
)
8394
for model in experiment.models:
8495
try:

tests/integration/test_model_interface.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,7 @@ def test_from_git(self, mock_build_tree, mock_create_environment):
238238
path_ = os.path.join(tempfile.tempdir, _dir)
239239
if os.path.exists(path_):
240240
shutil.rmtree(path_)
241-
giturl = (
242-
"https://git.gfz-potsdam.de/csep-group/" "rise_italy_experiment/models/template.git"
243-
)
241+
giturl = "https://github.com/pabloitu/" "template.git"
244242
model_a = self.init_model(name=name, model_path=path_, giturl=giturl)
245243
model_a.stage()
246244

tutorials/case_a/best_model.dat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# lon_min lon_max lat_min lat_max depth_min depth_max mag_min mag_max rate mask
1+
# lon_min lon_max lat_min lat_max depth_min depth_max mag_min mag_max rate
22
0 1 0 1 0 70 6 7 5e-1 1
33
1 2 0 1 0 70 6 7 5e-1 0.1

0 commit comments

Comments
 (0)