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

Add state filter tests and handle readonly database #8

Merged
merged 5 commits into from
Jul 23, 2024

Conversation

183amir
Copy link
Collaborator

@183amir 183amir commented Jul 22, 2024

fix: more error handling

Handle cases when job_manager.logs_dir is not relative to logs.
Also output valid states when state callback fails.

fix: when the database is read-only

It can happen that the database could be read-only but running commands like gridtk list should still work.

test: add tests for state-based filtering

Adding some tests to make sure state-based filtering of jobs works

📚 Documentation preview 📚: https://gridtk--8.org.readthedocs.build/en/8/

Adding some tests to make sure state-based filtering of jobs works
It can happen that the database could be read-only but running commands like gridtk list should still work.
Handle cases when job_manager.logs_dir is not relative to logs.
Also output valid states when state callback fails.
Copy link

github-actions bot commented Jul 22, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/gridtk
  cli.py 50-53, 55-56, 58-60, 62-63, 74, 79, 423-424
  manager.py
Project Total  

This report was generated by python-coverage-comment-action

Copy link
Contributor

@Yannick-Dayer Yannick-Dayer left a comment

Choose a reason for hiding this comment

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

Looks good.

Can you just confirm the output path comment (that it is doing what is expected).

src/gridtk/cli.py Outdated Show resolved Hide resolved
src/gridtk/cli.py Outdated Show resolved Hide resolved
@Yannick-Dayer Yannick-Dayer changed the title Add state fitler tests and handle readonly database Add state filter tests and handle readonly database Jul 22, 2024
Yannick-Dayer
Yannick-Dayer previously approved these changes Jul 23, 2024
Copy link
Contributor

@Yannick-Dayer Yannick-Dayer left a comment

Choose a reason for hiding this comment

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

Seems much more logical to me like this.

Add an indication on how to specify ranges in the help message of the
`--jobs` (`-j`) option of the `gridtk list` command.
@183amir 183amir merged commit c013c41 into main Jul 23, 2024
10 checks passed
@183amir 183amir deleted the test/add-state-fitler-tests branch July 23, 2024 13:30
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