Python package to convert the SCORE input JSON to Alfacase
Project description
What is alfasim-score?
Python package to convert the SCORE input JSON to Alfacase (ALFAsim input file).
Features
Converter from Score input JSON to Alfacase
Converter from Wellprop pvt tables to .tab pvt table format
Parser for the ALFAsim results and generate a JSON compatible with SCORE
How to use it
First, the user needs to create an instance of the converter:
from pathlib import Path from alfasim_score.converter.alfacase.alfasim_score_converter import AlfasimScoreConverter # path indicating where the SCORE input file is score_input_filepath = Path("path/to/score_input.json") # path indicating where the output file (converted from ALFAsim results) should be created score_output_filepath = Path("path/to/score_output_result.json") # then create a converter instance alfacase_converter = AlfasimScoreConverter(score_input_filepath, score_output_filepath)To convert the SCORE input into an alfacase file, the user can do the following:
alfacase_filepath = Path("path/where/save/converted_score.alfacase") alfacase_converter.generate_alfasim_input_file(alfacase_filepath)Run the ALFAsim with the generated file (and the pvt tables in the same folder)
Once the result file of ALFAsim is generated, one can call the converter for the output file:
alfasim_results_directory = Path("path/to/alfasim_results_folder") alfacase_converter.generate_score_output_file(alfasim_results_directory)The user also must remember to convert and save the pvt table (as .tab file) if wellprop tables are being used:
from alfasim_score.converter.wellprop.wellprop_pvt_table_converter import WellpropToPvtConverter table_converter = WellpropToPvtConverter(Path("name_of_folder_with_wellprop_tables")) table_converter.generate_pvt_table_file(Path("name_of_folder_to_save_converted_pvt_table"))
Development
For complete description of what type of contributions are possible, see the full CONTRIBUTING guide.
Here is a quick summary of the steps necessary to setup your environment to contribute to alfasim-score.
Create a virtual environment and activate it:
$ python -m virtualenv .env $ .env\Scripts\activate # windows $ source .env/bin/activate # linux
Update pip:
$ python -m pip install -U pip
Install development dependencies:
$ pip install -e .[testing]
Install pre-commit:
$ pre-commit install
Run tests:
$ pytest --pyargs alfasim_score
Generate docs locally:
$ tox -e docs
The documentation files will be generated in docs/_build.
Release
A reminder for the maintainers on how to make a new release.
Note that the VERSION should folow the semantic versioning as X.Y.Z Ex.: v1.0.5
Create a release-VERSION branch from upstream/master.
Update CHANGELOG.rst.
Push a branch with the changes.
Once all builds pass, push a VERSION tag to upstream. Ex: git tag v1.0.5; git push origin --tags
Merge the PR.
0.1.0 (2024-06-10)
First release on PyPI.
0.2.0 (2024-12-18)
Improvements on API.
Add documentation on how to use the API.
1.0.0 (2025-04-11)
Update the alfacase converter to create files compatible with ALFAsim APB plugin v1.1.0
Add new converter for pvt tables from wellprops to .tab format
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alfasim_score-1.0.0.tar.gz.
File metadata
- Download URL: alfasim_score-1.0.0.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9aa9f450becd9f6f489273b625f924a499d87ebb4ca28b8f6744f9d2b60d059f
|
|
| MD5 |
7ffc08981b97bb594f34906d73825987
|
|
| BLAKE2b-256 |
87cc52336620b017e8b0ac1f8435be0f99d4b618b990f8359202ef08e5bb6cb5
|
Provenance
The following attestation bundles were made for alfasim_score-1.0.0.tar.gz:
Publisher:
deploy.yml on ESSS/alfasim-score
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alfasim_score-1.0.0.tar.gz -
Subject digest:
9aa9f450becd9f6f489273b625f924a499d87ebb4ca28b8f6744f9d2b60d059f - Sigstore transparency entry: 195633991
- Sigstore integration time:
-
Permalink:
ESSS/alfasim-score@0c097c91c7f99f606771ac1faf74ff88e0c25208 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ESSS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@0c097c91c7f99f606771ac1faf74ff88e0c25208 -
Trigger Event:
push
-
Statement type:
File details
Details for the file alfasim_score-1.0.0-py3-none-any.whl.
File metadata
- Download URL: alfasim_score-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bd503b42ba382b79730c3dbf3f3a8b8f8518749eb2a26739553691799421f60
|
|
| MD5 |
50e2a7b6e89ae5408bced26986e5443e
|
|
| BLAKE2b-256 |
8b5886b392bae874711a79300b6c6e4777b8b03c95d1c1701417eaf426917898
|
Provenance
The following attestation bundles were made for alfasim_score-1.0.0-py3-none-any.whl:
Publisher:
deploy.yml on ESSS/alfasim-score
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alfasim_score-1.0.0-py3-none-any.whl -
Subject digest:
0bd503b42ba382b79730c3dbf3f3a8b8f8518749eb2a26739553691799421f60 - Sigstore transparency entry: 195633992
- Sigstore integration time:
-
Permalink:
ESSS/alfasim-score@0c097c91c7f99f606771ac1faf74ff88e0c25208 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ESSS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@0c097c91c7f99f606771ac1faf74ff88e0c25208 -
Trigger Event:
push
-
Statement type: