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

Combine event loop cleanup with other style/modernization cleanup #4

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Commits on Aug 15, 2024

  1. Remove global util.main_event_loop

    gnzsnz committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    aa31ec4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    56795b3 View commit details
    Browse the repository at this point in the history
  3. fix github actions

    gnzsnz committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    9c941f1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0496e6d View commit details
    Browse the repository at this point in the history
  5. fix

    gnzsnz committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    b7b51e6 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2024

  1. Move to Python 3.10+ and add dev to optional group

    Python 3.10 as a minimum seems safe (4 years old right now).
    
    Also added more dev deps including pytest with a concurrency runner.
    Tests can now be run concurrently with:
    
    poetry run pytest -n auto
    mattsta committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    b49b2c8 View commit details
    Browse the repository at this point in the history
  2. Cleanup github CI configuration

    Improves:
    
    - uses only more modern python versions for tests
    - uses poetry for installs and running instead of pip directly
    mattsta committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    9dd6f13 View commit details
    Browse the repository at this point in the history
  3. Cleanup coding style for readability

    More new lines between different logical sections for easier reading.
    
    Cleaned up some other loop creation to be inline when possible.
    
    Replaced `asyncio.ensure_future()` in ops/transform.py with
    `create_task()` for more modern APIs and all the tests still pass.
    mattsta committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    2ae8bc8 View commit details
    Browse the repository at this point in the history
  4. Fix more event loop fetching

    Primarily due to version changes over time, this all used to work in
    older versions, but Python 3.12 started issuing new warnings and errors
    unless manual steps are used for event loop handling instead of automatic steps.
    
    Fixes #2
    mattsta committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    7af5787 View commit details
    Browse the repository at this point in the history
  5. Cleanup ruff style complaint

    Interestingly, ruff and µsort have different opinions on how headers
    should be sorted. Guess one has to win out over time (µsort prefers to
    have blank lines between regular "import" lines and "from X import Y"
    lines).
    mattsta committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    775c3ec View commit details
    Browse the repository at this point in the history
  6. Fix CI error with docs building

    Fixes:
    
    - Incorporates doc deps into poetry (poetry install --with dev,docs)
    - Removes manual version.py parsing to get version number
    - Fixes "no language" error in docs spec
    - Fixes doc syntax problem in docstring
    
    Docs can now be built using:
    
    poetry run sphinx-build -b html docs html
    mattsta committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    a29c3b7 View commit details
    Browse the repository at this point in the history
  7. Fix naming conflict in docs config

    version this, version that, it worked, but we were overwriting things
    incorrectly even though it didn't impact the final otuput.
    mattsta committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    b80e08c View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2024

  1. New test for emit_threadsafe

    gnzsnz committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    0dd4ad4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e8c314d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e6faadc View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2024

  1. Modernize Slots management into dataclasses

    Originally slots were using just nested ararys indexed by position, but
    we can do better now.
    
    This project was originally written in Python 3.6 before many more
    modern things like dataclasses exist, so now we can use
    dataclass(slots=True) for automatic slots generation as well as easily
    use dataclasses for inner-encapsulated data management.
    mattsta committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    eaf4c3f View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Configuration menu
    Copy the full SHA
    210f48d View commit details
    Browse the repository at this point in the history
  2. use Event._split to build slot

    gnzsnz committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    05ee827 View commit details
    Browse the repository at this point in the history
  3. remove unused import

    gnzsnz committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    ccf5325 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. apply Event._split

    gnzsnz committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    68ea189 View commit details
    Browse the repository at this point in the history
  2. Implement github actions

    - dependabot
    - build and test
    - publish
    gnzsnz committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    9ecec8d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8681633 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2024

  1. Changes

    - functools.cache is out
    - pytest-async plugin in
    - I had to rewrite all tests so they don't use unittest, so now all test are on pytest
    - All test pass, except when they are run with pytest-xdist, poetry run pytest -vs -n auto gives a warning. It's a warning, not an error
    
     > task: <Task pending name='Task-18' coro=<Aiterate._looper() done, defined at ~/Documents/dev/eventkit/eventkit/ops/create.py:42> wait_for=>
    
    - updated Event.repeat, as the parameters where in the wrong position. it should be Ok now.
    - update Aiterate and Wait to use tasks. removed __del__ method from Aiterate as it causes warnings. we can put it back and live with warnings on tests, which is not bad.
    - right now everything is task based, except timing module which uses loop.call_soon and loop.call_at
    gnzsnz committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    d63441e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    18e3a4f View commit details
    Browse the repository at this point in the history
  3. avoid duplicate execution

    gnzsnz committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    fde4203 View commit details
    Browse the repository at this point in the history
  4. add mypy hook to pre-commit

    gnzsnz committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    0851e26 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2024

  1. fix error on exception handling during emit/slots.__call__

    new test for exception handling during emit/slots.__call__
    enable pytest log on console
    gnzsnz committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    2bca019 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. pre-

    gnzsnz committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    5628f9f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    09cf836 View commit details
    Browse the repository at this point in the history