Skip to content

Commit

Permalink
Merge pull request #1 from stfc/setup-repo
Browse files Browse the repository at this point in the history
Add initial repo contents
  • Loading branch information
alinelena authored Feb 7, 2024
2 parents 160b941 + 3737a8e commit ac3cc56
Showing 10 changed files with 201 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
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/
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
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
48 changes: 48 additions & 0 deletions README.md
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

[![PSDI](docs/source/images/psdi-100.webp)](https://www.psdi.ac.uk/)
[![ALC](docs/source/images/alc-100.webp)](https://adalovelacecentre.ac.uk/)
[![CoSeC](docs/source/images/cosec-100.webp)](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 added docs/source/images/alc-100.webp
Binary file not shown.
Binary file added docs/source/images/cosec-100.webp
Binary file not shown.
Binary file added docs/source/images/psdi-100.webp
Binary file not shown.
8 changes: 8 additions & 0 deletions janus_core/__init__.py
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"

73 changes: 73 additions & 0 deletions pyproject.toml
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']
8 changes: 8 additions & 0 deletions tests/__init__.py
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__))
8 changes: 8 additions & 0 deletions tests/test_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""Example test."""

def test_example():
"""
Example test.
"""
assert 1 == 1

0 comments on commit ac3cc56

Please sign in to comment.