Contact: [email protected]
Date | Author | Description |
---|---|---|
2023-08-21 | numbworks | Created. |
2024-01-16 | numbworks | Updated to v1.3.0. |
2024-01-21 | numbworks | Updated to v2.0.0. |
2024-03-19 | numbworks | Updated to v3.0.0. |
2024-05-19 | numbworks | Updated to v3.2.0. |
2024-05-20 | numbworks | Updated to v3.3.0. |
2024-08-12 | numbworks | Updated to v3.4.0. |
2024-10-01 | numbworks | Updated to v3.7.0. |
nwtimetracking
is a Jupyter Notebook
designed to analyze the Excel file I use to annotate the durations of all my sessions of extra work and continuos learning, so that I can run analyses on them.
This software is born to overcome the lack of support for durations (timedeltas) in Excel.
This project may not be useful for many (not generic enough), but I decided to upload it to Github
anyway, in order to showcase my way of working when I face similar data analysis tasks and I decide to tackle them with Python
and Jupyter Notebook
.
To run this application on Windows and Linux:
-
Download and install Visual Studio Code;
-
Download and install Docker;
-
Download and install Git;
-
Open your terminal application of choice and type the following commands:
mkdir nwtimetracking cd nwtimetracking git clone https://github.com/numbworks/nwtimetracking.git
-
Launch Visual Studio Code and install the following extensions:
-
In order for the Jupyter Notebook to automatically detect changes in the underlying library, click on File > Preferences > Settings and change the following setting as below:
"jupyter.runStartupCommands": [ "%load_ext autoreload", "%autoreload 2" ]
-
In order for Pylance to perform type checking, set the
python.analysis.typeCheckingMode
setting tobasic
; -
Click on File > Open folder >
nwtimetracking
; -
Click on View > Command Palette and type:
> Dev Container: Reopen in Container
-
Wait some minutes for the container defined in the .devcointainer folder to be built;
-
Open the notebook file (src/nwtimetracking.ipynb);
-
Edit the
SettingBag
object according to your needs; -
Click on Run All;
-
Done!
To run the unit tests in Visual Studio Code (while still connected to the Dev Container):
- click on the Testing icon on the sidebar, right-click on tests > Run Test;
- select the Python interpreter inside the Dev Container (if asked);
- Done!
To calculate the total unit test coverage in Visual Studio Code (while still connected to the Dev Container):
-
Terminal > New Terminal;
-
Run the following commands to get the total unit test coverage:
cd tests coverage run -m unittest nwtimetrackingtests.py coverage report --omit=nwtimetrackingtests.py
-
Run the following commands to get the unit test coverage per class:
cd tests coverage run -m unittest nwtimetrackingtests.py coverage html --omit=nwtimetrackingtests.py && sed -n '/<table class="index" data-sortable>/,/<\/table>/p' htmlcov/class_index.html | pandoc --from html --to plain && sleep 3 && rm -rf htmlcov
-
Done!
If nwshared
creates some issues for you, please refer to its documentation on Github.
Suggested toolset to view and edit this Markdown file: