Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
pull_request:
push:
branches:
- master
- python3

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Install dependencies
run: uv sync

- name: Run tests
run: PYTHONPATH=. uv run pytest tests/
env:
PYTHONHASHSEED: 0
8 changes: 7 additions & 1 deletion kmos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@
#import kmos.types
#import kmos.io

__version__ = "0.3.21"
# Version is managed in pyproject.toml and read from package metadata
try:
from importlib.metadata import version
__version__ = version("kmos")
except Exception:
# Fallback for development installations
__version__ = "0.0.0+unknown"
VERSION = __version__


Expand Down
71 changes: 71 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "kmos"
version = "0.4.0" # Managed by bump-my-version
description = "kMC modeling on steroids"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "GPL-3.0-or-later"}
authors = [
{name = "Max J. Hoffmann", email = "mjhoffmann@gmail.com"}
]
maintainers = [
{name = "Max J. Hoffmann", email = "mjhoffmann@gmail.com"}
]
keywords = ["kmc", "kinetic monte carlo", "lattice", "chemistry", "physics", "surface science"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Fortran",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Education",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Visualization",
]
dependencies = [
"ase",
"ipython",
"lxml",
"numpy>=2.0.2",
"pytest>=8.4.2",
]

[project.urls]
Homepage = "https://github.com/mhoffman/kmos"
Repository = "https://github.com/mhoffman/kmos"

[project.scripts]
kmos = "kmos.cli:main"

[tool.setuptools.packages.find]
where = ["."]
include = ["kmos*"]

[tool.setuptools.package-data]
kmos = [
"fortran_src/*.f90",
"fortran_src/*.mpy",
"kmc_editor.glade",
"fortran_src/assert.ppc",
"kmc_project_v0.1.dtd",
"kmc_project_v0.2.dtd",
"kmc_project_v0.3.dtd"
]

[tool.pytest.ini_options]
# Tests now run deterministically without requiring PYTHONHASHSEED=0
# Example: PYTHONPATH=. uv run pytest tests/
89 changes: 0 additions & 89 deletions setup.py

This file was deleted.

Loading