-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fb-PWPA-2308-release-0.2.0
- Loading branch information
Showing
27 changed files
with
1,629 additions
and
528 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Keep GitHub Actions up to date with GitHub's Dependabot... | ||
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot | ||
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
groups: | ||
github-actions: | ||
patterns: | ||
- "*" # Group all Actions updates into a single larger pull request | ||
schedule: | ||
interval: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,16 @@ jobs: | |
if: startsWith(github.event.ref, 'refs/tags') | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
python-version: "3.x" | ||
- name: Install build | ||
run: | | ||
python -m pip install --upgrade pip | ||
|
@@ -27,11 +30,8 @@ jobs: | |
run: | | ||
python -m build | ||
- name: Publish package to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_token }} | ||
uses: pypa/[email protected] | ||
- name: GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+516 KB
(140%)
src/alfasim_score/converter/alfacase/_tests/data/case.data/results/results_00000
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 12 additions & 15 deletions
27
src/alfasim_score/converter/alfacase/_tests/test_output_results.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
import json | ||
import pandas as pd | ||
import pytest | ||
from barril.units import Scalar | ||
from pathlib import Path | ||
from pytest_regressions.file_regression import FileRegressionFixture | ||
|
||
from alfasim_score.common import AnnulusLabel | ||
from alfasim_score.converter.alfacase.score_output_generator import ScoreOutputGenerator | ||
from alfasim_score.converter.alfacase.alfasim_score_converter import AlfasimScoreConverter | ||
|
||
|
||
def test_generate_output_file_results( | ||
shared_datadir: Path, datadir: Path, file_regression: FileRegressionFixture | ||
) -> None: | ||
alfasim_results_directory = shared_datadir / "case.data" | ||
well_start_position = Scalar(2072, "m") | ||
active_annuli = [AnnulusLabel.A, AnnulusLabel.B, AnnulusLabel.C] | ||
output_generator = ScoreOutputGenerator( | ||
alfasim_results_directory, well_start_position, active_annuli | ||
) | ||
output_generator.element_name = "7-SRR-2-RJS (2022-07-28_15-01-27)" | ||
output_filepath = datadir / "output_score.json" | ||
output_generator.generate_output_file(datadir / "output_score.json") | ||
output_content = output_filepath.read_text(encoding="utf-8") | ||
alfasim_results_path = shared_datadir / "case.data" | ||
# dummy input file just to have the reader for this test | ||
score_input_file = shared_datadir / "score_input_natural_flow.json" | ||
output_file = datadir / "output_score.json" | ||
converter = AlfasimScoreConverter(score_input_file, output_file) | ||
# change the element name to match this test result well name | ||
converter.output_builder.element_name = "7-SRR-2-RJS (2022-07-28_15-01-27)" | ||
# TODO: remember to get these annuli inside the output class | ||
converter.output_builder.active_annuli = [AnnulusLabel.A, AnnulusLabel.B, AnnulusLabel.C] | ||
converter.generate_score_output_file(alfasim_results_path) | ||
output_content = converter.output_builder.score_output_filepath.read_text(encoding="utf-8") | ||
file_regression.check(output_content, extension=".json", encoding="utf-8") |
Oops, something went wrong.