alfasim-score


Namealfasim-score JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/ESSS/alfasim-score
SummaryPython package to convert the SCORE input JSON to Alfacase
upload_time2024-12-18 11:24:19
maintainerNone
docs_urlNone
authorESSS
requires_python>=3.8
licenseMIT license
keywords alfasim score
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===============
ALFAsim Score
===============


.. image:: https://img.shields.io/pypi/v/alfasim-score.svg
    :target: https://pypi.python.org/pypi/alfasim-score

.. image:: https://img.shields.io/pypi/pyversions/alfasim-score.svg
    :target: https://pypi.org/project/alfasim-score

.. image:: https://github.com/ESSS/alfasim-score/workflows/test/badge.svg
    :target: https://github.com/ESSS/alfasim-score/actions

.. image:: https://codecov.io/gh/ESSS/alfasim-score/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/ESSS/alfasim-score

.. image:: https://img.shields.io/readthedocs/alfasim-score.svg
    :target: https://alfasim-score.readthedocs.io/en/latest/

.. image:: https://sonarcloud.io/api/project_badges/measure?project=ESSS_alfasim-score&metric=alert_status
    :target: https://sonarcloud.io/project/overview?id=ESSS_alfasim-score


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
* 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
    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")
    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")
    converter.generate_score_output_file(alfasim_results_directory)


Development
-----------

For complete description of what type of contributions are possible,
see the full `CONTRIBUTING <CONTRIBUTING.rst>`_ 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


   .. note::

       If you use ``conda``, you can install ``virtualenv`` in the root environment::

           $ conda install -n root virtualenv

       Don't worry as this is safe to do.

#. 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

1. Create a ``release-VERSION`` branch from ``upstream/master``.
2. Update ``CHANGELOG.rst``.
3. Push a branch with the changes.
4. Once all builds pass, push a ``VERSION`` tag to ``upstream``. Ex: ``git tag v1.0.5; git push origin --tags``
5. Merge the PR.


.. _`GitHub page` :                   https://github.com/ESSS/alfasim-score
.. _pytest:                           https://github.com/pytest-dev/pytest
.. _tox:                              https://github.com/tox-dev/tox



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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ESSS/alfasim-score",
    "name": "alfasim-score",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ALFAsim, Score",
    "author": "ESSS",
    "author_email": "foss@esss.co",
    "download_url": "https://files.pythonhosted.org/packages/a7/f9/24a82b8ab3e337002f08242225d9aa86945c8f2da4af1f81132fc9ac51b5/alfasim_score-0.2.0.tar.gz",
    "platform": null,
    "description": "===============\nALFAsim Score\n===============\n\n\n.. image:: https://img.shields.io/pypi/v/alfasim-score.svg\n    :target: https://pypi.python.org/pypi/alfasim-score\n\n.. image:: https://img.shields.io/pypi/pyversions/alfasim-score.svg\n    :target: https://pypi.org/project/alfasim-score\n\n.. image:: https://github.com/ESSS/alfasim-score/workflows/test/badge.svg\n    :target: https://github.com/ESSS/alfasim-score/actions\n\n.. image:: https://codecov.io/gh/ESSS/alfasim-score/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/ESSS/alfasim-score\n\n.. image:: https://img.shields.io/readthedocs/alfasim-score.svg\n    :target: https://alfasim-score.readthedocs.io/en/latest/\n\n.. image:: https://sonarcloud.io/api/project_badges/measure?project=ESSS_alfasim-score&metric=alert_status\n    :target: https://sonarcloud.io/project/overview?id=ESSS_alfasim-score\n\n\nWhat is alfasim-score?\n=======================\n\nPython package to convert the SCORE input JSON to Alfacase (ALFAsim input file).\n\n\nFeatures\n-----------\n\n* Converter from Score input JSON to Alfacase\n* Parser for the ALFAsim results and generate a JSON compatible with SCORE\n\nHow to use it\n-------------\n#. First, the user needs to create an instance of the converter::\n\n    from pathlib import Path\n    from alfasim_score.converter.alfacase.alfasim_score_converter import AlfasimScoreConverter\n    # path indicating where the SCORE input file is\n    score_input_filepath = Path(\"path/to/score_input.json\")\n    # path indicating where the output file (converted from ALFAsim results) should be created\n    score_output_filepath = Path(\"path/to/score_output_result.json\")\n    # then create a converter instance\n    converter = AlfasimScoreConverter(score_input_filepath, score_output_filepath)\n\n#. To convert the SCORE input into an alfacase file, the user can do the following::\n\n    alfacase_filepath = Path(\"path/where/save/converted_score.alfacase\")\n    converter.generate_alfasim_input_file(alfacase_filepath)\n\n#. Run the ALFAsim with the generated file (and the pvt tables in the same folder)\n\n#. Once the result file of ALFAsim is generated, one can call the converter for the output file::\n\n    alfasim_results_directory = Path(\"path/to/alfasim_results_folder\")\n    converter.generate_score_output_file(alfasim_results_directory)\n\n\nDevelopment\n-----------\n\nFor complete description of what type of contributions are possible,\nsee the full `CONTRIBUTING <CONTRIBUTING.rst>`_ guide.\n\nHere is a quick summary of the steps necessary to setup your environment to contribute to ``alfasim-score``.\n\n#. Create a virtual environment and activate it::\n\n    $ python -m virtualenv .env\n    $ .env\\Scripts\\activate  # windows\n    $ source .env/bin/activate  # linux\n\n\n   .. note::\n\n       If you use ``conda``, you can install ``virtualenv`` in the root environment::\n\n           $ conda install -n root virtualenv\n\n       Don't worry as this is safe to do.\n\n#. Update ``pip``::\n\n    $ python -m pip install -U pip\n\n#. Install development dependencies::\n\n    $ pip install -e .[testing]\n\n#. Install pre-commit::\n\n    $ pre-commit install\n\n#. Run tests::\n\n    $ pytest --pyargs alfasim_score\n\n#. Generate docs locally::\n\n    $ tox -e docs\n\n   The documentation files will be generated in ``docs/_build``.\n\nRelease\n-------\n\nA reminder for the maintainers on how to make a new release.\n\nNote that the VERSION should folow the semantic versioning as X.Y.Z\nEx.: v1.0.5\n\n1. Create a ``release-VERSION`` branch from ``upstream/master``.\n2. Update ``CHANGELOG.rst``.\n3. Push a branch with the changes.\n4. Once all builds pass, push a ``VERSION`` tag to ``upstream``. Ex: ``git tag v1.0.5; git push origin --tags``\n5. Merge the PR.\n\n\n.. _`GitHub page` :                   https://github.com/ESSS/alfasim-score\n.. _pytest:                           https://github.com/pytest-dev/pytest\n.. _tox:                              https://github.com/tox-dev/tox\n\n\n\n0.1.0 (2024-06-10)\n------------------\n\n* First release on PyPI.\n\n\n0.2.0 (2024-12-18)\n------------------\n\n* Improvements on API.\n* Add documentation on how to use the API.\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Python package to convert the SCORE input JSON to Alfacase",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/ESSS/alfasim-score"
    },
    "split_keywords": [
        "alfasim",
        " score"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4cc988815eaf090f2d8c8305a32a46b2bab40814f7fa7965a37a82f5e470fb49",
                "md5": "5633e4fe25eaf0dd4eb63636731739e0",
                "sha256": "bb0ac1a2bab31c67355e3db18a624d5f7aca76aa4cf408490daee1dd63c3addf"
            },
            "downloads": -1,
            "filename": "alfasim_score-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5633e4fe25eaf0dd4eb63636731739e0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 1420596,
            "upload_time": "2024-12-18T11:24:16",
            "upload_time_iso_8601": "2024-12-18T11:24:16.198455Z",
            "url": "https://files.pythonhosted.org/packages/4c/c9/88815eaf090f2d8c8305a32a46b2bab40814f7fa7965a37a82f5e470fb49/alfasim_score-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a7f924a82b8ab3e337002f08242225d9aa86945c8f2da4af1f81132fc9ac51b5",
                "md5": "041910d743d98679de8957c8bd934c88",
                "sha256": "a2efca7a165fcf66a320d1099897de12b125083b6a7b275f10d9f8293da9ac93"
            },
            "downloads": -1,
            "filename": "alfasim_score-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "041910d743d98679de8957c8bd934c88",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1390109,
            "upload_time": "2024-12-18T11:24:19",
            "upload_time_iso_8601": "2024-12-18T11:24:19.152356Z",
            "url": "https://files.pythonhosted.org/packages/a7/f9/24a82b8ab3e337002f08242225d9aa86945c8f2da4af1f81132fc9ac51b5/alfasim_score-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-18 11:24:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ESSS",
    "github_project": "alfasim-score",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "alfasim-score"
}
        
Elapsed time: 0.35049s