Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Tool for assisting with the analysis and setup of VASP calculations.

Project description

py4vasp

Code style: black tests

Please note that this document is intended mostly for developers that want to use the version of py4vasp provided on Github. If you just want to install py4vasp to use it, please follow the official documentation.

Installation

We use the poetry dependency manager which takes care of all dependencies and maintains a virtual environment to check the code. If you want to test something in the virtual environment, just use e.g. poetry run jupyter-notebook.

Using poetry installing and the code requires the following steps. The last step will test whether everything worked

git clone git@github.com:vasp-dev/py4vasp.git
pip install poetry
poetry install
poetry run pytest

Note that this will install py4vasp into a virtual environment managed by poetry. This isolates the code from all other packages you have installed and makes sure that when you modify the code all the relevant dependencies are tracked.

Occasionally, we encountered errors when installing the mdtraj dependency in this fashion, in particular on MacOS and Windows. If you notice the same behavior, we recommend to manage your environment with conda and install py4vasp in the following manner

git clone git@github.com:vasp-dev/py4vasp.git
conda create --name py4vasp-env python=3.8
conda activate py4vasp-env
conda install -c conda-forge poetry
conda install -c conda-forge mdtraj
poetry config virtualenvs.create false --local
poetry install
poetry run pytest

Code style

Code style is enforced, but is not something the developer should spend time on, so we decided on using the black formatter. Please run black . before committing the code.

Contributing to py4vasp

We welcome contributions to py4vasp. To improve the code please follow this workflow

  • Create an issue for the bugfix or feature you plan to work on, this gives the option to provide some input before work is invested.
  • Implement your work in a fork of the repository and create a pull request for it. Please make sure to test your code thoroughly and commit the tests in the pull request in the tests directory.
  • In the message to your merge request mention the issue the code attempts to solve.
  • We will try to include your merge request rapidly when all the tests pass and your code is covered by tests.

Please limit the size of a pull request to approximately 200 lines of code otherwise reviewing the changes gets unwieldy. Prefer splitting the work into multiple smaller chunks if necessary.

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

py4vasp-0.7.4.tar.gz (66.1 kB view details)

Uploaded Source

Built Distribution

py4vasp-0.7.4-py3-none-any.whl (94.9 kB view details)

Uploaded Python 3

File details

Details for the file py4vasp-0.7.4.tar.gz.

File metadata

  • Download URL: py4vasp-0.7.4.tar.gz
  • Upload date:
  • Size: 66.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.16 Linux/4.18.0-477.27.1.el8_8.x86_64

File hashes

Hashes for py4vasp-0.7.4.tar.gz
Algorithm Hash digest
SHA256 11c1f40bc9f11bc5e4d736745922c0b99f4bb668ee7eb21146a161381cb9dd5e
MD5 5a938f5ab06f0d5fb2875929597578d5
BLAKE2b-256 697158ad51d2a6f3514f9f0127e30aa28b2ec8d844d459afe24f92ac6daccda2

See more details on using hashes here.

File details

Details for the file py4vasp-0.7.4-py3-none-any.whl.

File metadata

  • Download URL: py4vasp-0.7.4-py3-none-any.whl
  • Upload date:
  • Size: 94.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.16 Linux/4.18.0-477.27.1.el8_8.x86_64

File hashes

Hashes for py4vasp-0.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2e86698c01ed8cfe9280129d50cf88cd8d433d051d88939ae70ced7de52e668b
MD5 e4c0a1eb5803ad6e665d610854f9c02a
BLAKE2b-256 74020476568a27121e897a1609da02c864245a0bcdb2a465a9429a6420e44761

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