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

Better resource manager #66

Closed
wants to merge 34 commits into from
Closed

Better resource manager #66

wants to merge 34 commits into from

Conversation

idocx
Copy link
Member

@idocx idocx commented May 7, 2024

Summary

Include a summary of major changes in bullet points:

  • Fix 1: Fix the bug that the task in REQUESTING_RESOURCES status cannot be canceled.
  • Fix 2: Clean up the code. Basically remove some while loop that waits for status update. It is because the MongoDB update operation itself is blocking. So, there is no need to wait for the status change after you do update_status.
  • Fix 3: add canceling REQUESTING_RESOURCES task into unittest.

Additional dependencies introduced (if any)

  • List all new dependencies needed and justify why. While adding dependencies that bring
    significantly useful functionality is perfectly fine, adding ones that add trivial
    functionality, e.g., to use one single easily implementable function, is frowned upon.
    Provide a justification why that dependency is needed. Especially frowned upon are
    circular dependencies.

TODO (if any)

If this is a work-in-progress, write something about what else needs to be done.

  • Feature 1 supports A, but not B.

Checklist

Work-in-progress pull requests are encouraged, but please put [WIP] in the pull request
title.

Before a pull request can be merged, the following items must be checked:

  • Code is in the standard Python style.
    The easiest way to handle this is to run the following in the correct sequence on
    your local machine. Start with running black on your new code. This will
    automatically reformat your code to PEP8 conventions and removes most issues. Then run
    pycodestyle, followed by flake8.
  • Docstrings have been added in theNumpy docstring format.
    Run pydocstyle on your code.
  • Type annotations are highly encouraged. Run mypy to
    type check your code.
  • Tests have been added for any new functionality or bug fixes.
  • All linting and tests pass.

Note that the CI system will run all the above checks. But it will be much more
efficient if you already fix most errors prior to submitting the PR. It is highly
recommended that you use the pre-commit hook provided in the repository. Simply
cp pre-commit .git/hooks and a check will be run prior to allowing commits.

@idocx idocx requested review from bernardusrendy and odartsi May 7, 2024 06:44
@idocx idocx self-assigned this May 7, 2024
@idocx idocx added the bug not't working as it should be label May 7, 2024
@idocx
Copy link
Member Author

idocx commented May 7, 2024

No need for reviewing right now. It is mostly based on the pull request #65. We can start to merge this after the previous one is merged.

@idocx idocx marked this pull request as ready for review May 8, 2024 00:18
@idocx
Copy link
Member Author

idocx commented May 8, 2024

The code is ready for review.

@idocx idocx marked this pull request as draft May 8, 2024 00:20
@idocx
Copy link
Member Author

idocx commented May 8, 2024

I think it is overlap a lot with the previous pull request. Will close this one and open a new one.

@idocx idocx closed this May 8, 2024
@idocx idocx removed request for bernardusrendy and odartsi May 8, 2024 00:21
@idocx idocx removed their assignment May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug not't working as it should be
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant