Skip to content

Commit afb54e7

Browse files
authored
Merge pull request #49 from ActivityWatch/dev/script-restructure
Dev/script restructure
2 parents c854304 + 989a277 commit afb54e7

17 files changed

+65
-20
lines changed

.travis.yml

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

5656
before_install:
5757
- if [[ "$TRAVIS_OS_NAME" == "osx" ]];
58-
then ./scripts/setup_venv_osx.sh;
58+
then ./scripts/ci/setup_venv_osx.sh;
5959
source venv/bin/activate;
6060
fi
6161
- pip install --upgrade pip

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ install:
2121
make --directory=aw-qt install
2222
# Installation is already happening in the `make build` step currently.
2323
# We might want to change this.
24-
# bash scripts/install.sh
24+
# We should also add some option to install as user (pip3 install --user) or editable (pip3 install --editable)
25+
26+
uninstall:
27+
./scripts/uninstall.sh
2528

2629
test:
2730
make --directory=aw-core test
2831
make --directory=aw-qt test
2932
# TODO: Move "integration tests" to aw-client
30-
./scripts/integration_tests.sh
33+
./scripts/tests/integration_tests.sh
3134

3235
package:
3336
mkdir -p dist/activitywatch
@@ -44,7 +47,7 @@ package:
4447
make --directory=aw-qt package
4548
cp -r aw-qt/dist/aw-qt/* dist/activitywatch
4649
#
47-
bash scripts/package-zip.sh
50+
bash scripts/package/package-zip.sh
4851

4952
clean:
5053
rm -r build dist

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,26 @@ You can read more on our [website](https://activitywatch.github.io/about/).
4949

5050
Yes, but we found that most time trackers lack in one or more important features.
5151

52-
Common dealbreakers:
52+
**Common dealbreakers:**
5353

54-
- Open Source
55-
- Syncronization
56-
- Ease of use (most others tend to only target programmers)
57-
- High data resolution (storage of raw data)
58-
- Plugins (simplicity to collect more data)
54+
- Not open source
55+
- The user does not own the data (common with non-open source options)
56+
- Lack of syncronization (and when available: it's centralized)
57+
- Difficult to setup/use (most open source options tend to target programmers)
58+
- Low data resolution (does not store raw data)
59+
- Hard or impossible to extend (collecting more data is not as simple as it could be)
5960

60-
We aim to address all of these and we're well on our way, see the table below.
61+
**To sum it up:**
62+
63+
- Closed source solutions suffer from privacy issues and limited features.
64+
- Open source solutions aren't developed with end-users in mind and are usually not written to be easily extended (they lack a proper API). They also lack syncronization.
65+
66+
We have a plan to address all of these and we're well on our way. See the table below for our progress.
6167

6268
#### Feature comparison
6369

6470

65-
<!-- TODO: Replace Platform names with icons, yes/no with checkbox icons, -->
71+
<!-- TODO: Replace Platform names with icons -->
6672

6773
| | User owns data | GUI | Sync | Open Source | Platforms |
6874
| ------------- |:------------------:|:------------------:|:------------------------:|:------------------:| ----------------------------------------- |
@@ -75,7 +81,7 @@ We aim to address all of these and we're well on our way, see the table below.
7581
**Tracking**
7682

7783
| | Application | Window Title | AFK | Browser Extensions | Editor Plugins |
78-
| ------------- |:------------------:|:------------------:|:------------------:|:------------------:| ------------------------ |
84+
| ------------- |:------------------:|:------------------:|:------------------:|:------------------:|:------------------------:|
7985
| ActivityWatch | :white_check_mark: | :white_check_mark: | :white_check_mark: | In Beta | Possible |
8086
| Selfspy | :white_check_mark: | :white_check_mark: | :white_check_mark:?| :x: | :white_check_mark:? |
8187
| ulogme | :white_check_mark: | :white_check_mark: | :white_check_mark:?| :x: | :x:? |

appveyor.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ environment:
77
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
88
# /E:ON and /V:ON options are not enabled in the batch script intepreter
99
# See: http://stackoverflow.com/a/13751649/163740
10-
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\scripts\\run_with_env.cmd"
10+
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\scripts\\ci\\run_with_env.cmd"
1111

1212
matrix:
1313
# Pre-installed Python versions, which Appveyor may upgrade to
@@ -43,7 +43,7 @@ install:
4343

4444
# Install Python (from the official .msi of http://python.org) and pip when
4545
# not already installed.
46-
- ps: if (-not(Test-Path($env:PYTHON))) { & scripts\install_python.ps1 }
46+
- ps: if (-not(Test-Path($env:PYTHON))) { & scripts\ci\install_python.ps1 }
4747

4848
# Required in order to get `make` to work
4949
- "copy C:\\MinGW\\bin\\mingw32-make.exe C:\\MinGW\\bin\\make.exe"
@@ -63,6 +63,13 @@ install:
6363
- "SET PATH=%PYTHON%;%PATH%"
6464
- "SET PATH=%PYTHON%\\Scripts;%PATH%"
6565

66+
# Create bin overrides dir and add it to path
67+
- ps: "mkdir C:/bin-override/"
68+
- "SET PATH=C:\\bin-override\\;%PATH%"
69+
70+
# FIXME: Created due to issue #51 (mypy issues on Appveyor)
71+
- "copy .\\scripts\\nop.sh C:\\bin-override\\mypy"
72+
6673
# For debugging: Echo the path variable, one path per line
6774
- ps: "$env:path.split(\";\")"
6875
- ECHO "%PYTHON%"
@@ -76,20 +83,23 @@ install:
7683
- "%CMD_IN_ENV% python3 --version"
7784

7885
# Install node and npm
79-
- ps: "./scripts/install_node.ps1"
86+
- ps: "./scripts/ci/install_node.ps1"
8087
- "SET PATH=C:\\Program Files\\nodejs;%PATH%"
8188

8289
# Upgrade to the latest version of pip to avoid it displaying warnings
8390
# about it being out of date.
8491
- "%CMD_IN_ENV% pip install --disable-pip-version-check --user --upgrade pip"
8592

93+
# FIXME: Testing a workaround to bug #52
94+
- "%CMD_IN_ENV% pip install requests==2.14.1"
95+
8696
# Testing dependencies
87-
- "%CMD_IN_ENV% pip install --upgrade pytest pytest-cov mypy"
97+
- "%CMD_IN_ENV% pip install --upgrade pytest pytest-cov mypy==0.510"
8898

8999
# Build dependencies
90100
# Don't install as user, since that puts the pyrcc5 script in a user-specific place
91101
- "%CMD_IN_ENV% pip install --upgrade pyqt5"
92-
- "%CMD_IN_ENV% powershell scripts\\install_pyhook.ps1"
102+
- "%CMD_IN_ENV% powershell scripts\\ci\\install_pyhook.ps1"
93103

94104
# Packaging dependencies
95105
- "%CMD_IN_ENV% pip install --upgrade pyinstaller"
@@ -123,9 +133,10 @@ after_test:
123133
#- ps: "ls dist"
124134
- "%CMD_IN_ENV% make package"
125135

126-
#artifacts:
136+
artifacts:
127137
# Archive the generated packages in the ci.appveyor.com build report.
128-
#- path: dist\*
138+
- path: dist\*.zip
139+
#- name:
129140

130141
#on_success:
131142
# - TODO: upload the content of dist/*.whl to a public wheelhouse

scripts/checkout-latest-tag.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
latest_version_tag=$(git tag -l | grep "^v[0-9]\..*" | sort --version-sort | tail -n1 )
4+
current_version_tag=$(git describe --tags)
5+
echo "Latest version: $latest_version_tag"
6+
echo "Current version: $current_version_tag"

scripts/chores/make-release.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
#
4+
# We should create a release checklist to ensure releases are consistent.
5+
#
6+
7+
# Create an annotated tag
8+
#git tag -a $
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)