Skip to content

Conversation

@khsrali
Copy link
Collaborator

@khsrali khsrali commented Jun 5, 2025

Note to myself:

For some reason to properly launch the docker, I have to rebuild, use this:
sudo docker compose -f 'docker-compose.yml' up -d --build
instead of what's the readme file says in https://github.com/eth-cscs/firecrest-v2

All these issues (in upstream) has to addressed before this PR, could happen:

What remains to do is to launch the docker on CI, (#66), which is currently functional on local. And disable and dispose the mock tests!

These tests are failing due to the above mentioned issues:
tests/test_calculation.py::test_calculation_file_transfer FAILED
tests/test_transport.py::test_copy[copy] FAILED
tests/test_transport.py::test_copy[copytree] FAILED
tests/test_transport.py::test_copyfile FAILED

@khsrali khsrali marked this pull request as ready for review June 17, 2025 14:39
@codecov
Copy link

codecov bot commented Jun 18, 2025

Codecov Report

Attention: Patch coverage is 88.42105% with 11 lines in your changes missing coverage. Please review.

Project coverage is 82.04%. Comparing base (f6562f5) to head (15c617c).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
aiida_firecrest/scheduler.py 83.33% 5 Missing ⚠️
aiida_firecrest/transport.py 92.30% 4 Missing ⚠️
aiida_firecrest/utils.py 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
- Coverage   82.38%   82.04%   -0.34%     
==========================================
  Files           4        4              
  Lines         806      752      -54     
==========================================
- Hits          664      617      -47     
+ Misses        142      135       -7     
Flag Coverage Δ
pytests 82.04% <88.42%> (-0.34%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@khsrali khsrali requested a review from Copilot June 18, 2025 21:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Firecrest v2 support and adapts tests, configuration, and scheduler/transport interfaces to the new API changes. Key changes include updating dependencies and imports from pyfirecrest and aiida-core, replacing touch() with write_text("touch") in tests due to empty file handling, and modifying scheduler job query and cancellation methods to align with Firecrest v2.

Reviewed Changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_transport.py Updated file creation commands and header comments to reference aiida-firecrest.
tests/test_scheduler.py Adjusted job ID testing and comments to reflect updated error handling.
tests/test_computer.py & test_calculation.py Updated assertions and file operations to support Firecrest v2 behavior.
tests/conftest.py Updated Firecrest client import and configuration (billing_account, rm instead of delete).
pyproject.toml, .pre-commit-config.yaml Updated dependency versions and source revisions.
aiida_firecrest/utils.py Modified convert_header_exceptions error conversion and introduced JobNotFoundError.
aiida_firecrest/scheduler.py Adjusted job information extraction, cancellation method, and API field mappings.
README.md, GitHub workflows Updated documentation and CI steps for docker compose with Firecrest v2.
.firecrest-demo-config.json Updated configuration with valid credentials and API details for Firecrest v2.
Comments suppressed due to low confidence (1)

tests/test_transport.py:13

  • [nitpick] It may be helpful to reference this limitation in a common test utilities or documentation section so that future tests follow the same pattern consistently.
FirecREST cannot send over empty files, therefore I do `Path.write_text("touch")` instead of Path.touch() in all tests.

# TODO: investigate this, if not needed, raise
pass
else:
results = [[]]
Copy link

Copilot AI Jun 18, 2025

Choose a reason for hiding this comment

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

Setting 'results = [[]]' when jobs is empty may lead to runtime errors when iterating over results. Consider initializing 'results' as an empty list instead.

Suggested change
results = [[]]
results = []

Copilot uses AI. Check for mistakes.
c = converters.get(header)
if c is not None:
raise c(data) from exc
raise c(exc) if callable(c) else c from exc
Copy link

Copilot AI Jun 18, 2025

Choose a reason for hiding this comment

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

[nitpick] The updated error conversion in convert_header_exceptions now conditionally calls the converter; please ensure that all converters provided are callable and that this behavior is well documented for maintainability.

Copilot uses AI. Check for mistakes.
@khsrali khsrali merged commit 6db78f7 into aiidateam:main Jun 20, 2025
7 checks passed
@khsrali khsrali deleted the v2 branch July 9, 2025 09:57
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.

1 participant