Skip to content

Commit e444423

Browse files
authored
Merge pull request #24 from vsoch/add/requests
Paper edits for JoSS, (add/requests, update docs, paper)
2 parents 1e06a6d + cd8d38a commit e444423

File tree

6 files changed

+42
-13
lines changed

6 files changed

+42
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Critical items to know are:
1313
- changed behaviour
1414

1515
## [master](https://github.com/vsoch/watchme/tree/master)
16+
- requests is missing from install dependencies (0.0.15)
1617
- small bug fixes (0.0.14)
1718
- added headers, params, and json args for post and get urls. (0.0.13)
1819
- added ability to specify URL params for Get and Get with selector functions (0.0.12)

docs/_docs/getting-started/index.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ watcher below:
1616
- [Background](#what-is-a-watcher): What is a watcher, exactly?
1717
- [Setup](#setup-watchme): Watchme on your computer, meaning setting a base with a default watcher
1818
- [Create a Watcher](#how-do-i-create-a-watcher): Create your first watcher to monitor one or more things
19+
- [Rename a Watcher](#how-do-i-rename-a-watcher): Rename a watching by changing the folder name
1920

2021
## Tasks
2122

@@ -114,16 +115,31 @@ Notice how the `--base` argument comes before init? That's because it's a global
114115
argument, meaning you can supply it to any command group (init, create, etc.). If
115116
you don't want to set it and want to change the default, remember that you can
116117
export `WATCHME_BASE_DIR` in your bash profile for a permanent setting.
118+
For the reminder of this tutorial, we will assume that you ran init without
119+
`--empty`, and interact with a watcher named "watcher."
117120
118121
### How do I create a watcher?
119122
120-
If you didn't create a watcher above, or want to create
123+
If you didn't create a watcher above (meaning you ran the init command with `--empty`)
124+
this is ok! You can create as many watchers as you like with the "create" command.
121125

122126
```bash
123-
$ watchme init
124-
Creating /home/vanessa/.watchme...
125-
Adding watcher /home/vanessa/.watchme/watcher...
126-
Generating watcher config /home/vanessa/.watchme/watcher/watchme.cfg
127+
$ watchme create --help
128+
usage: watchme create [-h] [watchers [watchers ...]]
129+
130+
positional arguments:
131+
watchers watchers to create (default: single watcher)
132+
133+
optional arguments:
134+
-h, --help show this help message and exit
135+
```
136+
137+
As an example (after running watchme init) let's create a watcher called "weather"
138+
139+
```bash
140+
$ watchme create weather
141+
Adding watcher /home/vanessa/.watchme/weather...
142+
Generating watcher config /home/vanessa/.watchme/weather/watchme.cfg
127143
```
128144
129145
You can then see an empty watcher directory is created with a configuration
@@ -132,13 +148,22 @@ file:
132148
```bash
133149
$ tree /home/vanessa/.watchme/
134150
/home/vanessa/.watchme/
135-
└── watcher
151+
└── weather
136152
└── watchme.cfg
137153
```
138154
139155
and what you can't see is that there is a Git repo (a .git folder) in the
140156
watcher directory too. Good job! The watcher is set up, and ready to add
141-
tasks to it.
157+
tasks to it.
158+
159+
### How do I rename a watcher?
160+
161+
The watcher name coincides with the folder name. For example, if you created
162+
the "weather" watcher and want to change the name at a later point, just rename
163+
the folder. For the remainder of this getting started guide, we will be using
164+
a watcher named "watcher," so if you didn't create this watcher, you can
165+
either create it or rename an existing folder.
166+
142167
143168
### How do I add tasks?
144169

docs/pages/changelog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
---
55

66
<p>Subscribe with <a href="{{ site.baseurl }}/feed.xml">RSS</a> to keep up with the latest changes.
7-
The most detailed and up to date changes are kept with the <a href="{{ site.repo }}/blob/master/CHANGELOG.md">CHANGELOG</a>
7+
The most detailed and up to date changes are kept with the <a href="https://github.com/vsoch/watchme/blob/master/CHANGELOG.md">CHANGELOG</a>
88
with the code base.</p>
99

1010
<p class="editor-link"><a href="cloudcannon:collections/_posts" class="btn"><strong>&#9998;</strong> Update Change Log</a></p>

paper/paper.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,17 @@ While only two commits are shown in the result above, an actual export for this
169169
The researcher could then perform an [analysis](https://github.com/vsoch/watchme-system/blob/master/data/watchme-task-analysis.ipynb) using the data collected.
170170
As an example, here is a plot from such an analysis that tracks virtual memory usage of this author, recorded every hour, over two weekend days.
171171

172-
![img/virtual-memory-used.png](img/virtual-memory-used.png)
172+
![Virtual memory usage graph](img/virtual-memory-used.png)
173173

174174
Interestingly, we can see a pattern that correlates with the activity of the author during the day. Virtual memory usage is low from the previous evening (1800 hours) through the early morning (0600 hours) and then rises sharply when the author starts to work.
175175
It goes down briefly in the early afternoon when the author pauses for a break, and picks up afterward, stopping when it's time for dinner.
176176
We see that the system's core temperature follows a similar trend:
177177

178-
![img/core-temp.png](img/core-temp.png)
178+
![Core temperature graph](img/core-temp.png)
179179

180180
We also see that the computer was briefly unplugged after the morning work session.
181181

182-
![img/battery.png](img/battery.png)
182+
![Battery usage graph](img/battery.png)
183183

184184
These kinds of metrics are interesting to answer research questions about system resources and behavior, and represent only the tip of the iceberg in terms of the scope of data that WatchMe could help collect.
185185
For example, WatchMe would have interesting use cases for monitoring resources or jobs for HPC, or watching for changes in any kind of web resource (prices, climate data, API endpoints, etc.).

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
python-crontab==2.3.6
1+
python-crontab>=2.3.6
2+
configparser>=3.5.3
3+
requests>=2.21.0

watchme/version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
77

88

9-
__version__ = "0.0.14"
9+
__version__ = "0.0.15"
1010
AUTHOR = 'Vanessa Sochat'
1111
AUTHOR_EMAIL = '[email protected]'
1212
NAME = 'watchme'
@@ -18,6 +18,7 @@
1818
INSTALL_REQUIRES = (
1919
('python-crontab', {"min_version": "2.3.6"}),
2020
('configparser', {"min_version": "3.5.3"}),
21+
('requests', {"min_version": "2.21.0"})
2122
)
2223

2324
## beautiful soup selection task

0 commit comments

Comments
 (0)