From c5aff448b504ff0e3e3e3b2b4049aab96e93611d Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Sun, 19 Jul 2020 09:01:09 +0200
Subject: [PATCH] Fix gallery example

---
 examples/plot_calculator.py | 22 ----------------------
 examples/plot_usage.py      | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 22 deletions(-)
 delete mode 100644 examples/plot_calculator.py
 create mode 100644 examples/plot_usage.py

diff --git a/examples/plot_calculator.py b/examples/plot_calculator.py
deleted file mode 100644
index 5ccf7e1..0000000
--- a/examples/plot_calculator.py
+++ /dev/null
@@ -1,22 +0,0 @@
-"""
-How to use the Calculator
-=========================
-
-The following example shows how to use the `Calculator` class.
-"""
-from km3net_testdata import Calculator
-
-#####################################################
-# Initialising a Calculator
-# -------------------------
-# Initialising is a simple as this:
-
-calc = Calculator()
-
-#####################################################
-# Adding numbers
-# ~~~~~~~~~~~~~~
-#
-# You can add two numbers by calling the `.add(a, b)` method:
-
-print(calc.add(5, 23))
diff --git a/examples/plot_usage.py b/examples/plot_usage.py
new file mode 100644
index 0000000..b6a93d4
--- /dev/null
+++ b/examples/plot_usage.py
@@ -0,0 +1,15 @@
+"""
+How to use the package
+=======================
+
+The following example shows how to use the `Calculator` class.
+"""
+from km3net_testdata import data_path
+
+#####################################################
+# Getting a filename
+# ------------------
+# To get the filename of a sample file:
+
+filename = data_path("km3net_online.root")
+print(filename)
-- 
GitLab