Skip to main content

Python package to unify material management across the ansys portfolio

Project description

PyAnsys Python PyPI GH-CI Codecov MIT Black

PyMaterials Manager is a Python package for unifying material management across the Ansys portfolio.

Installation

Two installation modes are provided: user and developer.

Install in user mode

Before installing the ansys-materials-manager package, run this command to ensure that you have the latest version of pip:

python -m pip install -U pip

Then, install the latest package for use with this command:

poetry run python -m pip install ansys-materials-manager

Install in development mode

Installing the ansys-materials-manager package in developer mode allows you to modify the source and enhance it.

Before contributing to PyMaterials Manager, see the PyAnsys Developer’s Guide.

To install PyMaterials Manager in developer mode, perform these steps:

  1. Cloning the repository:

    git clone https://github.com/pyansys/pymaterials-manager
  2. Create a fresh-clean Python environment and activate it:

    # Create a virtual environment
    python -m venv .venv
    
    # Activate it in a POSIX system
    source .venv/bin/activate
    
    # Activate it in Windows CMD environment
    .venv\Scripts\activate.bat
    
    # Activate it in Windows Powershell
    .venv\Scripts\Activate.ps1
  3. Make sure that you have the latest required build system and doc, testing, and CI tools:

    python -m pip install -U pip poetry tox
    python -m pip install -r requirements/requirements_build.txt
    python -m pip install -r requirements/requirements_doc.txt
    python -m pip install -r requirements/requirements_tests.txt
  4. Install the project in editable mode:

    poetry run python -m pip install ansys-materials-manager
  5. Verify your development installation:

    tox

Testing

This project takes advantage of tox. This tool is used to automate common development tasks (similar to Makefile), but it is oriented towards Python development.

Use tox

tox uses environments, which are similar to Makefile rules, to make it highly customizable. In fact, this tool creates its own virtual environment so that anything being tested is isolated from the project to guarantee the project’s integrity.

Descriptions follow of some of the most widely used environments:

  • tox -e style: Checks the code style of your project.

  • tox -e py: Runs your test suite.

  • tox -e py-coverage: Checks unit tests and code coverage.

  • tox -e doc: Builds the documentation of your project.

Perform raw testing

If required, you can call style commands (such as black, isort, and flake8) or unit testing commands (such as pytest) from the command line. However, calling these commands does not guarantee that your project is being tested in an isolated environment, which is the reason why tools like tox exist.

Use pre-commit

The style checks take advantage of pre-commit. Developers are not forced but encouraged to install this tool by running this command:

python -m pip install pre-commit && pre-commit install

Every time you stage some changes and try to commit them, pre-commit only allows them to be committed if all defined hooks succeed.

Documentation and issues

For comprehensive information on PyMaterials Manager, see the latest release documentation. On the PyMaterials Manager Issues page, you can create issues to submit questions, report bugs, and request new features. This is the best place to post questions and code.

Distribution

If you want to create either source or wheel files, start by installing the building requirements and then executing the build module:

python -m pip install -r requirements/requirements_build.txt
python -m build
python -m twine check dist/*

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

ansys_materials_manager-0.2.3.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

ansys_materials_manager-0.2.3-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

Details for the file ansys_materials_manager-0.2.3.tar.gz.

File metadata

File hashes

Hashes for ansys_materials_manager-0.2.3.tar.gz
Algorithm Hash digest
SHA256 2bebda492a32b01b69b205157110a1ddba61d5e3d33c0ad6d1c4e730f2bd2fad
MD5 699e1d8b1ea0be5d8911963b9ce4358d
BLAKE2b-256 5d242ab58c8e825565bb5ba2c7d5f52b2d5786531c0fee83880ba900160f1d4d

See more details on using hashes here.

File details

Details for the file ansys_materials_manager-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_materials_manager-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3210b9126654eb49e66023b9e2ac0e498003105dacd304370de576186ccb7de0
MD5 4bb088332dc641958651cd6d0d5c5a3a
BLAKE2b-256 7016eb9e2677e4dec6f8fea08406d9e3bda389f9e9b2341f9bbbf0a76d6ab0ee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page