diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..be49b52 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +## v0.8.0 2020-09-29 + +✨ Support for aiida-core >= 1.4.0 + +- drop support for python<3.5 +- remove `six` dependency +- fix deprecation warnings +- improve pre-commit code style +- add Github CI, tox.ini and docker-compose.yml for improved test infrastructure + +♻️ Refactor potential plugins: +Potential plugins are now structured as a class, which inherit from an abstract base class. + +✨ Add `MdMultiCalculation`: +This is a generalisation of MdCalculation, which can sequentially run 1 or more integration 'stages', that may have different integration styles and dump rates + +✨ implement `LammpsTrajectory`: Instead of using `aiida.orm.TrajectoryData` use a bespoke data object, that directly stores the trajectory file. The trajectory file is also read/stored in step chunks, so will not over exert the memory buffer, and is stored in a compressed zip file. In testing, this halved the memory footprint. + +## v0.4.1b3 2019-06-26 + +Support for aiida-core v1.0.0b3 diff --git a/README.md b/README.md index 0913503..aba57b5 100644 --- a/README.md +++ b/README.md @@ -426,32 +426,29 @@ calc_node.outputs.trajectory_data.attributes ### Coding Style Requirements -The code style is tested using [flake8](http://flake8.pycqa.org), -with the configuration set in `.flake8`, -and code should be formatted with [black](https://github.com/ambv/black). - -Installing with `aiida-lammps[code_style]` makes the [pre-commit](https://pre-commit.com/) -package available, which will ensure these tests are passed by reformatting the code -and testing for lint errors before submitting a commit. -It can be setup by: +The code is formatted and linted using [pre-commit](https://pre-commit.com/), which runs in an isolated, virtual environment: ```shell ->> cd aiida-lammps ->> pre-commit install +>> pip install pre-commit +>> pre-commit run --all ``` -Optionally you can run `black` and `flake8` separately: +or to automate runs, triggered before each commit: ```shell ->> black . ->> flake8 . +>> pre-commit install ``` -Editors like VS Code also have automatic code reformat utilities, which can adhere to this standard. - ### Testing -The following will discover and run all unit test: +the test suite can be run in an isolated, virtual environment using `tox` (see `tox.ini` in the repo): + +```shell +>> pip install tox +>> tox -e py37 +``` + +or directly: ```shell >> pip install -e .[testing] @@ -459,6 +456,24 @@ The following will discover and run all unit test: >> pytest -v ``` +The tests require that both PostgreSQL and RabbitMQ are running. +If you wish to run an isolated RabbitMQ instance, see the `docker-compose.yml` file in the repo. + +Some tests require that a `lammps` executable be present. + +The easiest way to achieve this is to use Conda: + +```shell +>> conda install lammps==2019.06.05 +# this will install lmp_serial and lmp_mpi +``` + +You can specify a different executable name for LAMMPS with: + +```shell +>> tox -e py37 -- --lammps-exec lmp_exec +``` + To output the results of calcjob executions to a specific directory: ```shell diff --git a/aiida_lammps/__init__.py b/aiida_lammps/__init__.py index dfc3d09..777f190 100644 --- a/aiida_lammps/__init__.py +++ b/aiida_lammps/__init__.py @@ -1 +1 @@ -__version__ = "0.7.0b5" +__version__ = "0.8.0" diff --git a/setup.json b/setup.json index 12437e1..e422a6e 100644 --- a/setup.json +++ b/setup.json @@ -1,6 +1,6 @@ { "name": "aiida-lammps", - "version": "0.7.0b5", + "version": "0.8.0", "description": "AiiDA plugin for LAMMPS", "url": "https://github.com/aiidaplugins/aiida-lammps", "author": "Abel Carreras, Chris Sewell", diff --git a/tox.ini b/tox.ini index cc00f07..63876d0 100644 --- a/tox.ini +++ b/tox.ini @@ -10,25 +10,7 @@ deps = black flake8 commands_pre = reentry scan -commands = pytest --lammps-exec lmp_serial {posargs} - -[testenv:py{36,37,38}-docs-{clean,update}] -extras = docs -commands_pre = reentry scan -setenv = - update: RUN_APIDOC = False -changedir = docs -whitelist_externals = make -commands = - clean: make clean - make debug - -[testenv:py{36,37,38}-{sync,syncrm}] -description=sync notebooks with jupytext -skip_install = true -deps = jupytext >=1.6 -commands = jupytext --sync {posargs:docs/source/notebooks/*.ipynb} -; run docs/source/notebooks/*.md before docs builds +commands = pytest {posargs:--lammps-exec lmp_serial} [pytest] addopts = --ignore=setup.py