ActivityWatch / aw-core

Core library for ActivityWatch
Mozilla Public License 2.0
48 stars 46 forks source link

How to test own code? #96

Closed watertrainer closed 3 years ago

watertrainer commented 3 years ago

I am sorry if there already is an explanation online, I couldn't find anything. How would I compile own code from aw-core, so that a test server would be able to use it, or more spefically, after I run make build from aw-server, which should include my aw-core code, where do I find the finished binary/where can I run the compiled code now?

ErikBjare commented 3 years ago

See the building from source guide: https://docs.activitywatch.net/en/latest/installing-from-source.html

watertrainer commented 3 years ago

First of all, thanks for the quick Answer

I read that guide, but it didn't tell me where to run aw-server or aw-watcher-*. Doing it in the root directory of the repo didn't work, I did not find anything in the Makefile.

johan-bjareholt commented 3 years ago

"it didn't work" isn't enough information for us to help you, please be more specific.

Aw-server and aw-core is built with the popular python build tool poetry as specified in the guide and configured with the project.toml file. Exactly how to change the version of aw-core built with aw-server can be done in multiple ways, but that's more of a python specific question rather than an ActivityWatch question.

ErikBjare commented 3 years ago

Once you've built with make build they should be available in your virtualenv's PATH. If you're asking for a binary you need to complete the packaging with PyInstaller step at the end of the guide.

watertrainer commented 3 years ago

Ok, thank you for your help. The adding to the PATH was the problem, but running the console as Admin fixed it.

Thanks for the help, sorry for not being specific enough.