Package: ansys-materials-manager
PyMaterials Manager is a Python package for unifying material management across the Ansys portfolio.InstallationTwo installation modes are provided: user and developer.Install in user modeBefore installing theansys-materials-managerpackage, run this command to
ensure that you have the latest version ofpip:python-mpipinstall-UpipThen, install the latest package for use with this command:poetryrunpython-mpipinstallansys-materials-managerInstall in development modeInstalling theansys-materials-managerpackage in developer mode allows
you to modify the source and enhance it.Before contributing to PyMaterials Manager, see thePyAnsys Developer’s Guide.To install PyMaterials Manager in developer mode, perform these steps:Cloning the repository:gitclonehttps://github.com/pyansys/pymaterials-managerCreate a fresh-clean Python environment and activate it:# Create a virtual environmentpython-mvenv.venv# Activate it in a POSIX systemsource.venv/bin/activate# Activate it in Windows CMD environment.venv\Scripts\activate.bat# Activate it in Windows Powershell.venv\Scripts\Activate.ps1Make sure that you have the latest required build system and doc, testing,
and CI tools:python-mpipinstall-Upippoetrytoxpython-mpipinstall-rrequirements/requirements_build.txtpython-mpipinstall-rrequirements/requirements_doc.txtpython-mpipinstall-rrequirements/requirements_tests.txtInstall the project in editable mode:poetryrunpython-mpipinstallansys-materials-managerVerify your development installation:toxTestingThis project takes advantage oftox. This tool is used to automate common
development tasks (similar to Makefile), but it is oriented towards Python
development.Usetoxtoxuses environments, which are similar toMakefilerules, 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 testingIf required, you can call style commands (such asblack,isort,
andflake8) or unit testing commands (such aspytest) 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
liketoxexist.Use pre-commitThe style checks take advantage ofpre-commit. Developers are not forced but
encouraged to install this tool by running this command:python-mpipinstallpre-commit&&pre-commitinstallEvery time you stage some changes and try to commit them,pre-commitonly allows them to be committed if all defined hooks succeed.Documentation and issuesFor comprehensive information on PyMaterials Manager, see the latest releasedocumentation.
On thePyMaterials Manager Issuespage, you can create issues to submit questions,
report bugs, and request new features. This is the best place to post questions and code.DistributionIf you want to create either source or wheel files, start by installing
the building requirements and then executing the build module:python-mpipinstall-rrequirements/requirements_build.txtpython-mbuildpython-mtwinecheckdist/*