Package: oncvpsp-tools
oncvpsp-toolsTools for handling input and output files ofoncvpsp.x💪 Getting Startedoncvpsp-toolsallows you to inspect input filesfromoncvpsp_toolsimportONCVPSPInputinp=ONCVPSPInput.from_file('/path/to/file')print(inp.reference_configuration)and output filesimportmatplotlib.pyplotaspltfromoncvpsp_toolsimportONCVPSPOutputout=ONCVPSPOutput.from_file('/path/to/file')out.arctan_log_derivatives.plot()plt.show()and even runoncvpsp.xfrom within aPythonshellinp=ONCVPSPInput.from_file('/path/to/file')out=inp.run('/path/to/oncvpsp.x')Command Line InterfaceTheoncvpsp-toolscommand line interface is automatically installed, and allows the
user to quickly plot the contents ofoncvpsp.xoutput files. For exampleoncvpsp-toolsplot/path/to/fileUse the--helpflag to explore all the possible options.🚀 InstallationThe most recent code and data can be installed directly from GitHub with:pipinstallgit+https://github.com/pseudopotential-tools/oncvpsp-tools.git👐 ContributingContributions, whether filing an issue, making a pull request, or forking, are appreciated. SeeCONTRIBUTING.mdfor more information on getting involved.👋 Attribution⚖️ LicenseThe code in this package is licensed under the MIT License.🍪 CookiecutterThis package was created with@audreyfeldroy'scookiecutterpackage using@cthoyt'scookiecutter-snekpacktemplate.🛠️ For DevelopersSee developer instructionsThe final section of the README is for if you want to get involved by making a code contribution.Development InstallationTo install in development mode, use the following:gitclonegit+https://github.com/pseudopotential-tools/oncvpsp-tools.gitcdoncvpsp-tools
pipinstall-e.🥼 TestingAfter cloning the repository and installingtoxwithpip install tox, the unit tests in thetests/folder can be
run reproducibly with:toxAdditionally, these tests are automatically re-run with each commit in aGitHub Action.📖 Building the DocumentationThe documentation can be built locally using the following:gitclonegit+https://github.com/pseudopotential-tools/oncvpsp-tools.gitcdoncvpsp-tools
tox-edocs
opendocs/build/html/index.htmlThe documentation automatically installs the package as well as thedocsextra specified in thesetup.cfg.sphinxplugins
liketexextcan be added there. Additionally, they need to be added to theextensionslist indocs/source/conf.py.The documentation can be deployed toReadTheDocsusingthis guide.
The.readthedocs.ymlYAML file contains all the configuration you'll need.
You can also set up continuous integration on GitHub to check not only that
Sphinx can build the documentation in an isolated environment (i.e., withtox -e docs-test)
but also thatReadTheDocs can build it too.📦 Making a ReleaseAfter installing the package in development mode and installingtoxwithpip install tox, the commands for making a new release are contained within thefinishenvironment
intox.ini. Run the following from the shell:tox-efinishThis script does the following:UsesBump2Versionto switch the version number in thesetup.cfg,src/oncvpsp_tools/version.py, anddocs/source/conf.pyto not have the-devsuffixPackages the code in both a tar archive and a wheel usingbuildUploads to PyPI usingtwine. Be sure to have a.pypircfile configured to avoid the need for manual input at this
stepPush to GitHub. You'll need to make a release going with the commit where the version was bumped.Bump the version to the next patch. If you made big changes and want to bump the version by minor, you can
usetox -e bumpversion -- minorafter.