Skip to content

Commit

Permalink
Merge pull request #49 from ActivityWatch/dev/script-restructure
Browse files Browse the repository at this point in the history
Dev/script restructure
  • Loading branch information
ErikBjare authored May 27, 2017
2 parents c854304 + 989a277 commit afb54e7
Show file tree
Hide file tree
Showing 17 changed files with 65 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ matrix:

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]];
then ./scripts/setup_venv_osx.sh;
then ./scripts/ci/setup_venv_osx.sh;
source venv/bin/activate;
fi
- pip install --upgrade pip
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ install:
make --directory=aw-qt install
# Installation is already happening in the `make build` step currently.
# We might want to change this.
# bash scripts/install.sh
# We should also add some option to install as user (pip3 install --user) or editable (pip3 install --editable)

uninstall:
./scripts/uninstall.sh

test:
make --directory=aw-core test
make --directory=aw-qt test
# TODO: Move "integration tests" to aw-client
./scripts/integration_tests.sh
./scripts/tests/integration_tests.sh

package:
mkdir -p dist/activitywatch
Expand All @@ -44,7 +47,7 @@ package:
make --directory=aw-qt package
cp -r aw-qt/dist/aw-qt/* dist/activitywatch
#
bash scripts/package-zip.sh
bash scripts/package/package-zip.sh

clean:
rm -r build dist
Expand Down
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,26 @@ You can read more on our [website](https://activitywatch.github.io/about/).

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

Common dealbreakers:
**Common dealbreakers:**

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

We aim to address all of these and we're well on our way, see the table below.
**To sum it up:**

- Closed source solutions suffer from privacy issues and limited features.
- 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.

We have a plan to address all of these and we're well on our way. See the table below for our progress.

#### Feature comparison


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

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

| | Application | Window Title | AFK | Browser Extensions | Editor Plugins |
| ------------- |:------------------:|:------------------:|:------------------:|:------------------:| ------------------------ |
| ------------- |:------------------:|:------------------:|:------------------:|:------------------:|:------------------------:|
| ActivityWatch | :white_check_mark: | :white_check_mark: | :white_check_mark: | In Beta | Possible |
| Selfspy | :white_check_mark: | :white_check_mark: | :white_check_mark:?| :x: | :white_check_mark:? |
| ulogme | :white_check_mark: | :white_check_mark: | :white_check_mark:?| :x: | :x:? |
Expand Down
25 changes: 18 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ environment:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\scripts\\run_with_env.cmd"
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\scripts\\ci\\run_with_env.cmd"

matrix:
# Pre-installed Python versions, which Appveyor may upgrade to
Expand Down Expand Up @@ -43,7 +43,7 @@ install:

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

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

# Create bin overrides dir and add it to path
- ps: "mkdir C:/bin-override/"
- "SET PATH=C:\\bin-override\\;%PATH%"

# FIXME: Created due to issue #51 (mypy issues on Appveyor)
- "copy .\\scripts\\nop.sh C:\\bin-override\\mypy"

# For debugging: Echo the path variable, one path per line
- ps: "$env:path.split(\";\")"
- ECHO "%PYTHON%"
Expand All @@ -76,20 +83,23 @@ install:
- "%CMD_IN_ENV% python3 --version"

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

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

# FIXME: Testing a workaround to bug #52
- "%CMD_IN_ENV% pip install requests==2.14.1"

# Testing dependencies
- "%CMD_IN_ENV% pip install --upgrade pytest pytest-cov mypy"
- "%CMD_IN_ENV% pip install --upgrade pytest pytest-cov mypy==0.510"

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

# Packaging dependencies
- "%CMD_IN_ENV% pip install --upgrade pyinstaller"
Expand Down Expand Up @@ -123,9 +133,10 @@ after_test:
#- ps: "ls dist"
- "%CMD_IN_ENV% make package"

#artifacts:
artifacts:
# Archive the generated packages in the ci.appveyor.com build report.
#- path: dist\*
- path: dist\*.zip
#- name:

#on_success:
# - TODO: upload the content of dist/*.whl to a public wheelhouse
6 changes: 6 additions & 0 deletions scripts/checkout-latest-tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

latest_version_tag=$(git tag -l | grep "^v[0-9]\..*" | sort --version-sort | tail -n1 )
current_version_tag=$(git describe --tags)
echo "Latest version: $latest_version_tag"
echo "Current version: $current_version_tag"
8 changes: 8 additions & 0 deletions scripts/chores/make-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

#
# We should create a release checklist to ensure releases are consistent.
#

# Create an annotated tag
#git tag -a $
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions scripts/nop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

echo "nop.bat was executed as a workaround for something"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions scripts/uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

modules=$(pip3 list | grep 'aw-' | grep -o '^aw-[^ ]*')

for module in $modules; do
pip3 uninstall $module
done

0 comments on commit afb54e7

Please sign in to comment.