Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add a few best practice recommendations #134

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

0xbrayo
Copy link
Member

@0xbrayo 0xbrayo commented Jul 10, 2024

🚀 This description was created by Ellipsis for commit 612751c

Summary:

Updated documentation with best practices, version updates, and new examples for querying and handling data.

Key points:

  • Updated src/api/rest.rst to include a link to the Writing Queries documentation.
  • Updated version and release information in src/conf.py to 0.13 and v0.13.1 respectively.
  • Removed unused import timedelta in src/examples/client.py.
  • Added comments in src/examples/client.rs to handle errors and avoid drift using tokio intervals.
  • Updated src/examples/query_client.py to use timeperiods for querying data.
  • Added a new example script src/examples/raw_events.py for fetching and redacting raw events.
  • Updated src/examples/querying-data.rst to include the new example script for fetching raw events.
  • Added best practice recommendations in src/examples/writing-watchers.rst for naming conventions and flags.
  • Updated src/importers.rst to include a new importer for Wakatime data.

Generated with ❤️ by ellipsis.dev

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 612751c in 1 minute and 14 seconds

More details
  • Looked at 251 lines of code in 9 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. src/conf.py:90
  • Draft comment:
    The version and release numbers are updated, but there's a TODO comment about fetching these values from aw_server. It would be beneficial to implement this feature to avoid manual updates and potential inconsistencies.
# TODO: Implement automatic fetching of version and release numbers from aw_server
  • Reason this comment was not posted:
    Confidence of 30% on close inspection, compared to threshold of 50%.
2. src/examples/client.rs:65
  • Draft comment:
    Consider using a more robust error handling strategy rather than unwrapping directly, which could cause the program to panic if an error occurs. Using error handling or logging the error would make the application more resilient and easier to debug.
        .create_bucket(&aw_client, bucket_id.clone(), event_type).await?
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.
3. src/examples/query_client.py:24
  • Draft comment:
    The event_type parameter in create_bucket should match the intended use. Currently, it's set to "test" which might be a placeholder. Ensure this is intentional or update it to a more descriptive type if necessary.
event_type = "dummydata"
client.create_bucket(bucket_id, event_type=event_type)
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.
4. src/examples/querying-data.rst:92
  • Draft comment:
    The TODO comment should be addressed or updated to reflect the current status of the documentation. If the link to Bucket REST API is still needed, it should be correctly formatted and functional.
.. TODO: Update or finalize the `Bucket REST API` section and ensure the link is correct.
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.

Workflow ID: wflow_Xesd9lekolh2Eafq


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

src/api/rest.rst Outdated
@@ -95,5 +95,4 @@ The `heartbeat <heartbeats>` API is one of the most useful endpoints for writing
Query API
~~~~~~~~~~~~~

**TODO: Add link to writing queries once that page is done**
`Writing Queries <./../examples/querying-data.html>`_
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link to Writing Queries is incorrect. It should point to the correct relative path within the documentation structure.

Suggested change
`Writing Queries <./../examples/querying-data.html>`_
`Writing Queries <../examples/querying-data.html>`_

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link works

@0xbrayo
Copy link
Member Author

0xbrayo commented Oct 23, 2024

@ErikBjare ping. Sorry for all the pings merge this too?

@ErikBjare ErikBjare merged commit ecbd4d2 into ActivityWatch:master Oct 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants