GithubHelp home page GithubHelp logo

henriquemiranda / py4vasp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vasp-dev/py4vasp

0.0 0.0 0.0 726 KB

Python interface for VASP

License: Apache License 2.0

Python 99.96% Makefile 0.04%

py4vasp's Introduction

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 [email protected]: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 [email protected]: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 the pull request to approximately 200 lines of code otherwise reviewing the changes gets unwieldy. Prefer splitting the work into multiple smaller chunks if necessary.

py4vasp's People

Contributors

henriquemiranda avatar jonathan271828 avatar martin-schlipf avatar orest-d avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.