Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several improvements #35

Merged
merged 13 commits into from
Aug 1, 2024
18 changes: 1 addition & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.10"]
aiida-version: ["stable"]

services:
Expand Down Expand Up @@ -50,22 +50,6 @@ jobs:
PYTEST_ADDOPTS: "--durations=0"
run: pytest --cov aiida_atomistic --cov-append .

docs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install python dependencies
run: |
pip install --upgrade pip
pip install -e .[docs]
- name: Build docs
run: cd docs && make

pre-commit:
runs-on: ubuntu-latest
timeout-minutes: 15
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file was created automatically with `myst init --gh-pages` 🪄 💚

name: MyST GitHub Pages Deploy
name: aiida-atomistic GitHub Pages Deploy
on:
push:
# Runs on pushes targeting the default branch
branches: [develop]
branches: [main, develop]
env:
# `BASE_URL` determines the website is served from, including CSS & JS assets
# You may need to change this to `BASE_URL: ''`
Expand Down Expand Up @@ -37,10 +37,11 @@ jobs:
run: npm install -g mystmd
- name: Build HTML Assets
run: myst build --html
working-directory: ./docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './_build/html'
path: './docs/_build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
23 changes: 1 addition & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,13 @@

AiiDA plugin which contains data and methods for atomistic simulations.


## Installation

```shell
git clone https://github.com/aiidateam/aiida-atomistic .
pip install ./aiida-atomistic
verdi quicksetup # better to set up a new profile
verdi plugin list aiida.calculations # should now show your calclulation plugins
```


## Usage

Here goes a complete example of how to submit a test calculation using this plugin.

A quick demo of how to submit a calculation:
```shell
verdi daemon start # make sure the daemon is running
cd examples
./example_01.py # run test calculation
verdi process list -a # check record of calculation
```

The plugin also includes verdi commands to inspect its data types:
```shell
verdi data atomistic list
verdi data atomistic export <PK>
verdi plugin list aiida.data # should now show your data plugins
```

## Development
Expand All @@ -46,7 +26,6 @@ pip install -e .[pre-commit,testing] # install extra dependencies
pre-commit install # install pre-commit hooks
pytest -v # discover and run all tests
```

See the [developer guide](http://aiida-atomistic.readthedocs.io/en/latest/developer_guide/index.html) for more information.

## License
Expand Down
24 changes: 20 additions & 4 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def supported_properties():
"charge",
"magmom",
"kind_name",
"weight",
"weights",
]


Expand All @@ -48,7 +48,8 @@ def example_structure_dict():
"position": [0.0, 0.0, 0.0],
"mass": 63.546,
"charge": 1.0,
"magmom": [0,0,0],
"magmom": [0.0,0.0,0.0],
"weights": (1,)
}
],
}
Expand Down Expand Up @@ -117,16 +118,31 @@ def example_structure_dict_for_kinds():
[-1.7391821518091137e-16, 2.8403, 1.7391821518091137e-16],
[0.0, 0.0, 2.8403]],
'sites': [{'symbol': 'Fe',
'weights': 55.845,
'mass': 55.845,
'position': [0.0, 0.0, 0.0],
'charge': 0.0,
'magmom': [2.5, 0.1, 0.1],
'kind_name': 'Fe'},
{'symbol': 'Fe',
'weights': 55.845,
'mass': 55.845,
'position': [1.42015, 1.42015, 1.4201500000000002],
'charge': 0.0,
'magmom': [2.4, 0.1, 0.1],
'kind_name': 'Fe'}]}

return structure_dict

@pytest.fixture
def example_structure_dict_alloy():
"""
Return the dictionary of properties as to be used in the standards tests.
"""
structure_dict ={
'pbc': [True, True, True],
'cell': [[0.0, 1.8, 1.8], [1.8, 0.0, 1.8], [1.8, 1.8, 0.0]],
'sites': [{'symbol': 'CuAl',
'position': [0.0, 0.0, 0.0],
'weights': (0.5,0.5)
}],}

return structure_dict
2 changes: 1 addition & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# MyST build outputs
/_build/
/_build/
Loading
Loading