-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from stfc/setup-repo
Add initial repo contents
- Loading branch information
Showing
10 changed files
with
201 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
*.lock | ||
*.pyc | ||
*.swo | ||
*.swp | ||
~* | ||
*~ | ||
.project | ||
*.egg* | ||
.DS_Store | ||
.coverage | ||
.pytest_cache | ||
.vscode | ||
build/ | ||
dist/ | ||
pip-wheel-metadata/ | ||
__pycache__/ | ||
.tox/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Install pre-commit hooks via: | ||
# pre-commit install | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
- id: check-json | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: ["--py310-plus"] | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 24.1.1 | ||
hooks: | ||
- id: black | ||
|
||
- repo: local | ||
hooks: | ||
- id: pylint | ||
language: system | ||
types: [file, python] | ||
name: pylint | ||
description: "This hook runs the pylint static code analyzer" | ||
exclude: &exclude_files > | ||
(?x)^( | ||
docs/.*| | ||
)$ | ||
entry: pylint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[![Build Status][ci-badge]][ci-link] | ||
[![Coverage Status][cov-badge]][cov-link] | ||
[![Docs status][docs-badge]][docs-link] | ||
[![PyPI version][pypi-badge]][pypi-link] | ||
[![License][license-badge]][license-link] | ||
|
||
# janus-core | ||
|
||
Tools for machine learnt interatomic potentials | ||
|
||
## Development | ||
|
||
1. Install [poetry](https://python-poetry.org/docs/#installation) | ||
2. (Optional) Create a virtual environment | ||
3. Install `janus-core` with dependencies: | ||
|
||
```shell | ||
git clone https://github.com/stfc/janus-core | ||
cd janus-core | ||
pip install --upgrade pip | ||
poetry install --with pre-commit,dev,docs # install extra dependencies | ||
pre-commit install # install pre-commit hooks | ||
pytest -v # discover and run all tests | ||
``` | ||
|
||
## License | ||
|
||
[BSD 3-Clause License](LICENSE) | ||
|
||
## Funding | ||
|
||
Contributors to this project were funded by | ||
|
||
[](https://www.psdi.ac.uk/) | ||
[](https://adalovelacecentre.ac.uk/) | ||
[](https://www.scd.stfc.ac.uk/Pages/CoSeC.aspx) | ||
|
||
|
||
[ci-badge]: https://github.com/stfc/janus-core/workflows/ci/badge.svg | ||
[ci-link]: https://github.com/stfc/janus-core/actions | ||
[cov-badge]: https://coveralls.io/repos/github/stfc/janus-core/badge.svg?branch=main | ||
[cov-link]: https://coveralls.io/github/stfc/janus-core?branch=main | ||
[docs-badge]: https://github.com/stfc/janus-core/actions/workflows/pages/pages-build-deployment/badge.svg | ||
[docs-link]: https://stfc.github.io/janus-core/ | ||
[pypi-badge]: https://badge.fury.io/py/janus-core.svg | ||
[pypi-link]: https://badge.fury.io/py/janus-core | ||
[license-badge]: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg | ||
[license-link]: https://opensource.org/licenses/BSD-3-Clause |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
""" | ||
janus_core | ||
Tools for machine learnt interatomic potentials | ||
""" | ||
|
||
__version__ = "0.1.0a0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
[tool.poetry] | ||
name = "janus-core" | ||
version = "0.1.0a0" | ||
description = "Tools for machine learnt interatomic potentials" | ||
authors = [ | ||
"Elliott Kasoar", | ||
"Federica Zanca", | ||
"Patrick Austin", | ||
"David Mason", | ||
"Jacob Wilkins", | ||
"Alin M. Elena", | ||
] | ||
license = "LICENSE" | ||
readme = "README.md" | ||
packages = [{include = "janus_core"}] | ||
classifiers = [ | ||
"Programming Language :: Python", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD 3-Clause License", | ||
"Natural Language :: English", | ||
"Development Status :: 3 - Alpha", | ||
] | ||
repository = "https://github.com/stfc/janus-core/" | ||
documentation = "https://stfc.github.io/janus-core/" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
ase = "^3.22.1" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
coverage = {extras = ["toml"], version = "^7.4.1"} | ||
pgtest = "^1.3.2" | ||
pytest = "^8.0" | ||
pytest-cov = "^4.1.0" | ||
wheel = "^0.42" | ||
|
||
[tool.poetry.group.pre-commit] | ||
optional = true | ||
[tool.poetry.group.pre-commit.dependencies] | ||
black = "^24.1.1" | ||
pre-commit = "^3.6.0" | ||
pylint = "^2.15.10" | ||
|
||
[tool.poetry.group.docs] | ||
optional = true | ||
[tool.poetry.group.docs.dependencies] | ||
furo = "^2024.1.29" | ||
markupsafe = "<2.1" | ||
sphinx = "^7.2.6" | ||
sphinxcontrib-contentui = "^0.2.5" | ||
sphinxcontrib-details-directive = "^0.1" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.pylint.format] | ||
max-line-length = 125 | ||
|
||
[tool.pytest.ini_options] | ||
# Configuration for [pytest](https://docs.pytest.org) | ||
python_files = "test_*.py" | ||
|
||
[tool.coverage.run] | ||
# Configuration of [coverage.py](https://coverage.readthedocs.io) | ||
# reporting which lines of your plugin are covered by tests | ||
source=["janus_core"] | ||
|
||
[tool.isort] | ||
# Configuration of [isort](https://isort.readthedocs.io) | ||
line_length = 120 | ||
force_sort_within_sections = true | ||
sections = ['FUTURE', 'STDLIB', 'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
""" Tests for janus_core. | ||
Includes example test (test.py). | ||
""" | ||
|
||
import os | ||
|
||
TEST_DIR = os.path.dirname(os.path.realpath(__file__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"""Example test.""" | ||
|
||
def test_example(): | ||
""" | ||
Example test. | ||
""" | ||
assert 1 == 1 | ||
|