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

Use pyproject.toml and fix on newer Python #7

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ various environments using containers and perform compilation, run, regression,

```bash
# regular install
python setup.py install
pip install .

# for development install
python setup.py develop
pip install --editable .
```

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


[project]
name = "lammps_testing"
version = "1.0.1"
description = "Utilities to run LAMMPS tests"
authors = [
{name = "Richard Berger", email = "[email protected]"}
]
license = {text = "GPL"}
dependencies = [
"nose",
"gcovr",
"termcolor",
"matplotlib",
"pyyaml",
"Jinja2",
"coverage"
]

[project.urls]
Homepage = "https://github.com/lammps/lammps-testing"
Repository = "https://github.com/lammps/lammps-testing.git"

[project.scripts]
lammps_run_tests = "lammps_testing.run_tests:main"
lammps_generate_regression_xml = "lammps_testing.generate_regression_xml:main"
lammps_regression_tests = "lammps_testing.regression:main"
lammps_test = "lammps_testing.lammps_test:main"
lammps_run_regression_test = "lammps_testing.run_regression_test:main"
30 changes: 0 additions & 30 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 15 additions & 16 deletions lammps_testing/lammps_test.py → src/lammps_testing/lammps_test.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
#!/usr/bin/python
import argparse
import glob
import os
import re
import sys

from .common import logger, Settings, get_containers, get_configurations, get_container
from .tests import RunTest, RegressionTest, UnitTest

from .commands.env import init_command as init_env_command
from .commands.config import init_command as init_config_command
from .commands.build import init_command as init_build_command
from .commands.compile import init_command as init_compile_command
from .commands.runtest import init_command as init_runtest_command
from .commands.unit import init_command as init_unit_command
from .commands.reg import init_command as init_reg_command

from .commands.build import build_status
from .commands.runtest import run_status
from .commands.unit import unittest_status
from .commands.reg import reg_status
from lammps_testing.common import logger, Settings, get_containers, get_configurations, get_container
from lammps_testing.tests import RunTest, RegressionTest, UnitTest

from lammps_testing.commands.env import init_command as init_env_command
from lammps_testing.commands.config import init_command as init_config_command
from lammps_testing.commands.build import init_command as init_build_command
from lammps_testing.commands.compile import init_command as init_compile_command
from lammps_testing.commands.runtest import init_command as init_runtest_command
from lammps_testing.commands.unit import init_command as init_unit_command
from lammps_testing.commands.reg import init_command as init_reg_command

from lammps_testing.commands.build import build_status
from lammps_testing.commands.runtest import run_status
from lammps_testing.commands.unit import unittest_status
from lammps_testing.commands.reg import reg_status

def status(args, settings):
args.config = ["ALL"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import shutil
from datetime import datetime

from .formats import LammpsLog
from lammps_testing.formats import LammpsLog


def L1_norm(seq):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os
import sys
import argparse
from .common import Settings, LocalRunner, MPIRunner
from .regression_testing import RegressionTest
from lammps_testing.common import Settings, LocalRunner, MPIRunner
from lammps_testing.regression_testing import RegressionTest

def regression(args, settings):
test_directory = os.path.realpath(os.path.dirname(args.input_script))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/env python
from __future__ import print_function
import os
import nose
Expand All @@ -8,10 +7,6 @@
import glob
from multiprocessing import Pool

__author__ = 'Richard Berger'
__email__ = "[email protected]"


def load_tests(filename):
print("Loading tests from %s..." % filename)
tests = []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# LAMMPS regression test driver using Python's unittest
from __future__ import print_function
__author__ = 'Richard Berger'
__email__ = "[email protected]"

import unittest
import os
Expand Down
File renamed without changes.