Skip to content

Commit

Permalink
Merge branch 'main' into updates/simplify-may2024
Browse files Browse the repository at this point in the history
  • Loading branch information
rieder authored Jul 8, 2024
2 parents 9c14d49 + cf040fe commit 746d466
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 18 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup MPI
id: setup-mpi
Expand All @@ -53,13 +53,13 @@ jobs:
if: ${{ matrix.mpi == 'openmpi' }}

- name: Set up JDK 1.8
uses: actions/setup-java@v3.9.0
uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
Expand Down Expand Up @@ -89,11 +89,14 @@ jobs:
amusifier --get-amuse-configmk
pip list
- name: move build log
run: |
mv build.log build-${{ matrix.mpi }}-${{ matrix.python }}.log
- name: archive build log
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4
with:
name: buildlog
path: build.log
name: buildlog-${{ matrix.mpi }}-${{ matrix.python }}
path: build-${{ matrix.mpi }}-${{ matrix.python }}.log

- name: test core_tests
run: |
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/community-seba.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ jobs:
java-version: [ '17' ]
name: Test AMUSE with ${{ matrix.mpi }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: ${{ matrix.mpi }}
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3.9.0
uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: ${{ matrix.java-version }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
Expand All @@ -54,11 +54,14 @@ jobs:
run: |
amusifier --get-amuse-configmk
pip list
- name: move build log
run: |
mv build.log build-${{ matrix.mpi }}-${{ matrix.python }}.log
- name: archive build log
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4
with:
name: buildlog
path: build.log
name: buildlog-${{ matrix.python }}-${{ matrix.mpi }}
path: build-${{ matrix.mpi }}-${{ matrix.python }}.log
- name: test seba
run: |
pytest --pyargs amuse.test.suite.codes_tests.test_seba -sv
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
9 changes: 9 additions & 0 deletions packages/amuse-hermite-grx/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
include support/__init__.py
include support/setup_codes.py
include support/version.py
include support/classifiers.py
include pyproject.toml

recursive-include src *
recursive-exclude src *.pyc *.o *~ .pc ccache *.a

1 change: 1 addition & 0 deletions packages/amuse-hermite-grx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This package installs the Hermite-GRX community code for AMUSE.
2 changes: 2 additions & 0 deletions packages/amuse-hermite-grx/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build-system]
requires = ["setuptools>=65.0.0", "wheel>=0.30", "amuse-framework>=2024.3.0"]
65 changes: 65 additions & 0 deletions packages/amuse-hermite-grx/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env python3
from support.classifiers import classifiers

from setuptools import setup

import support
support.use("system")
from support.setup_codes import setup_commands

name = 'amuse-hermite-grx'
author = 'The AMUSE team'
author_email = '[email protected]'
license_ = "Apache License 2.0"
url = 'http://www.amusecode.org/'
install_requires = [
'amuse-framework',
]
description = 'The Astrophysical Multipurpose Software Environment - Hermite-GRX'
with open("README.md", "r") as fh:
long_description = fh.read()
long_description_content_type = "text/markdown"

extensions = []

all_data_files = []

packages = [
'amuse.community.hermite_grx',
]

package_data = {
}

mapping_from_command_name_to_command_class = setup_commands()

setup_requires = ['setuptools_scm']
use_scm_version = {
"root": "../..",
"relative_to": __file__,
"version_file": "src/amuse/community/hermite_grx/_version.py",
}

setup(
name=name,
use_scm_version=use_scm_version,
setup_requires=setup_requires,
classifiers=classifiers,
url=url,
author_email=author_email,
author=author,
license=license_,
description=description,
long_description=long_description,
long_description_content_type=long_description_content_type,
install_requires=install_requires,
python_requires=">=3.7",
cmdclass=mapping_from_command_name_to_command_class,
ext_modules=extensions,
package_dir={
'amuse.community.hermite_grx': 'src/amuse/community/hermite_grx',
},
packages=packages,
package_data=package_data,
data_files=all_data_files,
)
1 change: 1 addition & 0 deletions packages/amuse-hermite-grx/src/amuse/community/hermite_grx
1 change: 1 addition & 0 deletions packages/amuse-hermite-grx/support
2 changes: 1 addition & 1 deletion src/amuse/community/hermite_grx/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# generated file
from .interface import Hermitegrx
11 changes: 8 additions & 3 deletions src/amuse/community/hermite_grx/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from amuse.community.interface.stopping_conditions import *


class HermiteGRXInterface(
class HermitegrxInterface(
CodeInterface, GravitationalDynamicsInterface, StoppingConditionInterface
):
include_headers = ["worker_code.h", "stopcond.h"]
Expand Down Expand Up @@ -423,11 +423,11 @@ def set_jerk():
return function


class HermiteGRX(GravitationalDynamics):
class Hermitegrx(GravitationalDynamics):
def __init__(self, convert_nbody=None, **options):
self.stopping_conditions = StoppingConditions(self)

legacy_interface = HermiteGRXInterface(**options)
legacy_interface = HermitegrxInterface(**options)
GravitationalDynamics.__init__(self, legacy_interface, convert_nbody, **options)

def define_state(self, object):
Expand Down Expand Up @@ -597,3 +597,8 @@ def define_particle_sets(self, object):
object.add_getter("small_particles", "get_jerk")

self.stopping_conditions.define_particle_set(object)


# for backwards compatibility reasons
HermiteGRXInterface = HermitegrxInterface
HermiteGRX = Hermitegrx

0 comments on commit 746d466

Please sign in to comment.