Package: allotropy
*Allotrope® is a registered trademark of the Allotrope Foundation; no affiliation with the Allotrope Foundation is claimed or implied.IntroductionWelcome toallotropy-- a Python library by Benchling for converting instrument data into the Allotrope Simple Model (ASM).The objective of this library is to read text or Excel based instrument software output and return a JSON representation that conforms to the published ASM schema. The code in this library does not convert from proprietary/binary output formats and so has no need to interact with any of the specific vendor softwares.If you aren't familiar with Allotrope, we suggest you start by reading theAllotrope Product Overview.We have chosen to have this library output ASM since JSON is easy to read and consume in most modern systems and can be checked by humans without any special tools needed. All of the published open source ASMs can be found in theASM Gitlab repository.We currently have parser support for the following instruments:Agilent Gen5Applied Bio QuantStudioApplied Bio AbsoluteQBeckman Vi-Cell BLUBeckman Vi-Cell XRChemoMetec NucleoviewLuminex xPONENTMolDev SoftMax ProNovaBio Flex2PerkinElmer EnvisionRoche Cedex BioHTThermo Fisher NanoDrop EightUnchained Labs LunaticThis code is published under the permissive MIT license because we believe that standardized instrument data is a benefit for everyone in science.ContributingWe welcome community contributions to this library and we hope that together we can expand the coverage of ASM-ready data for everyone. If you are interested, please read ourcontribution guidelines.UsageConvert a file to an ASM dictionary:fromallotropy.parser_factoryimportVendor
fromallotropy.to_allotropeimportallotrope_from_fileasm_schema=allotrope_from_file("filepath.txt",Vendor.MOLDEV_SOFTMAX_PRO)or, convert any IO:fromallotropy.parser_factoryimportVendor
fromallotropy.to_allotropeimportallotrope_from_io

withopen("filename.txt")asf:asm_schema=allotrope_from_io(f,Vendor.MOLDEV_SOFTMAX_PRO)bytes_io=BytesIO(file_stream)asm_schema=allotrope_from_io(bytes_io,Vendor.MOLDEV_SOFTMAX_PRO)Specific setup and build instructions.gitignore: used standard GitHub Python template and added their recommended JetBrains linesSetupInstall Hatch:https://hatch.pypa.io/latest/Install Python:https://www.python.org/downloads/This library supports Python 3.9 or higher. Hatch will install a matching version of Python (defined inpyproject.toml) when it sets up your environment.Add pre-push checks to your repo:hatchrunscripts:setup-pre-pushDependenciesTo add requirements used by the library, updatedependenciesinpyproject.toml:For project dependencies, updatedependenciesunder[project].For script dependencies, updatedependenciesunder[tool.hatch.envs.default].For lint dependencies, updatedependenciesunder[tool.hatch.envs.lint].For test dependencies, updatedependenciesunder[tool.hatch.envs.test].Useful Hatch commandsList all environments:hatchenvshowRun all lint:hatchrunlint:allAuto-fix all possible lint issues:hatchrunlint:fmtRun all tests:hatchruntest:testRun a specific test file (replace the filepath with your own):hatchruntest:testtests/allotrope/allotrope_test.pyRun all tests with coverage:hatchruntest:covSpawn a shell within an environment for development:hatchshellPublishTo publish a new version, update the version insrc/allotropy/__about__.pyand run:hatchbuild
hatchpublish