Skip to content

Commit

Permalink
added pyproject.toml, misc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Dec 27, 2019
1 parent 2e3b4aa commit 0eb41c5
Show file tree
Hide file tree
Showing 9 changed files with 2,579 additions and 553 deletions.
1 change: 1 addition & 0 deletions .venv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
quantifiedme
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
dashboard:
pipenv run python3 build_dashboard.py

install:
pipenv install

test:
pipenv run python3 -m pytest scripts/habitbull.py
#make --directory=smartertime2activitywatch test
make --directory=QSlang test
make --directory=chatalysis test


build-notebooks:
sed -i 's/personal = True/personal = False/' 'QuantifiedMe - Dashboard.ipynb' # Set personal = False, in case it was accidentally comitted with `personal = True`
pipenv run jupyter nbconvert 'QuantifiedMe - Dashboard.ipynb' --execute --ExecutePreprocessor.kernel_name=python3

jupyter:
# From: https://stackoverflow.com/a/47296960/965332
Expand Down
23 changes: 10 additions & 13 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,24 @@ verify_ssl = true
name = "pypi"

[packages]
numpy = "*"
scipy = "==1.2.1"
pandas = "*"
matplotlib = "*"
pytest = "*"
statsmodels = "*"
calmap = {editable = true,git = "https://github.com/MarvinT/calmap.git"}
joblib = "*"
jupyter = "*"
ipykernel = "*"
aw-research = {editable = true,file = "./aw-research"}
qslang = {editable = true,file = "./QSlang"}
tabulate = "*"
togglcli = {editable = true,git = "https://github.com/AuHau/toggl-cli.git"}
#togglcli = {editable = true,git = "https://github.com/AuHau/toggl-cli.git"}
pint = "*"
toml = "*"
statsmodels = "*"
scipy = "==1.2.1"
numpy = "*"

[dev-packages]

[requires]
python_version = "3.7"

[pipenv]
allow_prereleases = true
jupyter = "*"
ipykernel = "*"
pytest = "*"
flake8 = "*"
mypy = "*"
jupyterlab = "*"
1,086 changes: 564 additions & 522 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion QSlang
2 changes: 1 addition & 1 deletion chatalysis
Submodule chatalysis updated 2 files
+0 −1 Makefile
+43 −12 main.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@
"# Valid options: 'activitywatch', 'smartertime', 'toggl', 'fake'\n",
"if personal:\n",
" # List of sources from which to fetch data when running in personal mode\n",
" datasources = ['activitywatch', 'smartertime', 'toggl']\n",
" datasources = ['activitywatch', 'smartertime'] #, 'toggl']\n",
"else:\n",
" # Use fake data if not in personal mode\n",
" datasources = ['fake']\n",
" \n",
"# Days of history to use\n",
"days_back = 90"
"days_back = 360"
]
},
{
Expand Down Expand Up @@ -311,7 +311,7 @@
" events_smartertime = []\n",
" for smartertime_awbucket_path in [\n",
" 'data/smartertime/smartertime_export_erb-a1_2019-02-18_bb7f26aa.awbucket.json',\n",
" 'data/smartertime/smartertime_export_erb-f1-miui_2019-07-04_f50e88de.awbucket.json'\n",
" 'data/smartertime/smartertime_export_erb-f1-miui_2019-10-17_6465fafb.awbucket.json'\n",
" ]:\n",
" new_events = aw_research.classify._get_events_smartertime(since, filepath=smartertime_awbucket_path)\n",
" events_smartertime = _union_no_overlap(events_smartertime, new_events)\n",
Expand Down Expand Up @@ -499,7 +499,7 @@
"# Now load the classes from within the notebook, or from a CSV file.\n",
"load_from_file = True if personal else False\n",
"if load_from_file:\n",
" aw_research.classify._init_classes(filename=\"./aw-research/categories.toml\")\n",
" aw_research.classify._init_classes(filename=\"./aw-research-sym/categories.toml\")\n",
"else:\n",
" aw_research.classify._init_classes(new_classes=classes)"
]
Expand Down Expand Up @@ -633,9 +633,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [],
"source": [
"# Work-related\n",
Expand Down Expand Up @@ -705,9 +703,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [],
"source": [
"plot_sunburst(events_today)"
Expand All @@ -719,7 +715,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot_sunburst([e for e in events if today - timedelta(days=7) < e.timestamp])"
"plot_sunburst([e for e in events if today - timedelta(days=30) < e.timestamp])"
]
},
{
Expand Down Expand Up @@ -883,13 +879,27 @@
" - Twitter\n",
" - ActivityWatch Forum (under the 'Projects' category)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "quantifiedme-mjhrr-x7",
"display_name": "Python 3",
"language": "python",
"name": "quantifiedme-mjhrr-x7"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -901,9 +911,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.8.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Loading

0 comments on commit 0eb41c5

Please sign in to comment.