Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lbmpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
lbmpy
Commits
d5ead943
Commit
d5ead943
authored
1 year ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
Align build system to pystencils
parent
4a17e5ef
No related branches found
No related tags found
1 merge request
!163
Refactor build system
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
.flake8
+1
-1
1 addition, 1 deletion
.flake8
MANIFEST.in
+1
-5
1 addition, 5 deletions
MANIFEST.in
pyproject.toml
+11
-18
11 additions, 18 deletions
pyproject.toml
quicktest.py
+22
-0
22 additions, 0 deletions
quicktest.py
setup.cfg
+0
-11
0 additions, 11 deletions
setup.cfg
setup.py
+6
-115
6 additions, 115 deletions
setup.py
with
41 additions
and
150 deletions
.flake8
+
1
−
1
View file @
d5ead943
...
@@ -2,4 +2,4 @@
...
@@ -2,4 +2,4 @@
max-line-length=120
max-line-length=120
exclude=lbmpy/plot.py
exclude=lbmpy/plot.py
lbmpy/session.py
lbmpy/session.py
ignore = W293 W503 W291 E741
ignore = W293 W503 W291
C901
E741
This diff is collapsed.
Click to expand it.
MANIFEST.in
+
1
−
5
View file @
d5ead943
include README.md
include COPYING.txt
include AUTHORS.txt
include AUTHORS.txt
include CONTRIBUTING.md
include CONTRIBUTING.md
global-include *.pyx
include CHANGELOG.md
include versioneer.py
include lbmpy/_version.py
This diff is collapsed.
Click to expand it.
pyproject.toml
+
11
−
18
View file @
d5ead943
[project]
[project]
name
=
"
pystencils
"
name
=
"
lbmpy
"
description
=
"
Speeding up stencil computations on CPUs and GPU
s"
description
=
"
Code Generation for Lattice Boltzmann Method
s"
dynamic
=
[
"version"
]
dynamic
=
[
"version"
]
readme
=
"README.md"
readme
=
"README.md"
authors
=
[
authors
=
[
{
name
=
"Martin Bauer"
}
,
{
name
=
"Martin Bauer"
}
,
{
name
=
"Jan Hönig "
}
,
{
name
=
"Markus Holzer"
}
,
{
name
=
"Markus Holzer"
}
,
{
name
=
"Frederik Hennig"
}
,
{
name
=
"Frederik Hennig"
}
,
{
email
=
"cs10-codegen@fau.de"
}
,
{
email
=
"cs10-codegen@fau.de"
}
,
...
@@ -24,9 +23,9 @@ classifiers = [
...
@@ -24,9 +23,9 @@ classifiers = [
]
]
[project.urls]
[project.urls]
"Bug Tracker"
=
"https://i10git.cs.fau.de/pycodegen/
pystencils
/-/issues"
"Bug Tracker"
=
"https://i10git.cs.fau.de/pycodegen/
lbmpy
/-/issues"
"Documentation"
=
"https://pycodegen.pages.i10git.cs.fau.de/
pystencils
/"
"Documentation"
=
"https://pycodegen.pages.i10git.cs.fau.de/
lbmpy
/"
"Source Code"
=
"https://i10git.cs.fau.de/pycodegen/
pystencils
"
"Source Code"
=
"https://i10git.cs.fau.de/pycodegen/
lbmpy
"
[project.optional-dependencies]
[project.optional-dependencies]
gpu
=
[
'cupy'
]
gpu
=
[
'cupy'
]
...
@@ -40,6 +39,8 @@ interactive = [
...
@@ -40,6 +39,8 @@ interactive = [
'pyevtk'
,
'pyevtk'
,
'rich'
,
'rich'
,
'graphviz'
,
'graphviz'
,
'scipy'
,
'scikit-image'
]
]
use_cython
=
[
use_cython
=
[
'Cython'
'Cython'
...
@@ -70,22 +71,14 @@ requires = [
...
@@ -70,22 +71,14 @@ requires = [
"setuptools>
=
69
",
"setuptools>
=
69
",
"versioneer>
=
0.29
",
"versioneer>
=
0.29
",
"tomli; python_version < '3.11'"
,
"tomli; python_version < '3.11'"
,
# 'Cython'
]
]
build-backend
=
"setuptools.build_meta"
build-backend
=
"setuptools.build_meta"
[tool.setuptools.package-data]
[tool.setuptools.package-data]
pystencils
=
[
"include/*.h"
,
"backends/cuda_known_functions.txt"
,
"backends/opencl1.1_known_functions.txt"
,
"boundaries/createindexlistcython.c"
,
"boundaries/createindexlistcython.pyx"
,
]
[tool.setuptools.packages.find]
[tool.setuptools.packages.find]
where
=
[
"."
]
where
=
[
"."
]
include
=
[
"
pystencils"
,
"pystencils
.*"
]
include
=
[
"
lbmpy"
,
"lbmpy
.*"
]
namespaces
=
false
namespaces
=
false
[tool.versioneer]
[tool.versioneer]
...
@@ -94,7 +87,7 @@ namespaces = false
...
@@ -94,7 +87,7 @@ namespaces = false
# resulting files.
# resulting files.
VCS
=
"git"
VCS
=
"git"
style
=
"pep440"
style
=
"pep440"
versionfile_source
=
"
pystencils
/_version.py"
versionfile_source
=
"
lbmpy
/_version.py"
versionfile_build
=
"
pystencils
/_version.py"
versionfile_build
=
"
lbmpy
/_version.py"
tag_prefix
=
"release/"
tag_prefix
=
"release/"
parentdir_prefix
=
"
pystencils
-"
parentdir_prefix
=
"
lbmpy
-"
This diff is collapsed.
Click to expand it.
quicktest.py
0 → 100644
+
22
−
0
View file @
d5ead943
#!/usr/bin/env python3
from
contextlib
import
redirect_stdout
import
io
from
lbmpy_tests.test_quicktests
import
(
test_poiseuille_channel_quicktest
,
test_entropic_methods
,
test_cumulant_ldc
)
quick_tests
=
[
test_poiseuille_channel_quicktest
,
test_entropic_methods
,
test_cumulant_ldc
,
]
if
__name__
==
"
__main__
"
:
print
(
"
Running lbmpy quicktests
"
)
for
qt
in
quick_tests
:
print
(
f
"
->
{
qt
.
__name__
}
"
)
with
redirect_stdout
(
io
.
StringIO
()):
qt
()
This diff is collapsed.
Click to expand it.
setup.cfg
deleted
100644 → 0
+
0
−
11
View file @
4a17e5ef
# See the docstring in versioneer.py for instructions. Note that you must
# re-run 'versioneer.py setup' after changing this section, and commit the
# resulting files.
[versioneer]
VCS
=
git
style
=
pep440
versionfile_source
=
lbmpy/_version.py
versionfile_build
=
lbmpy/_version.py
tag_prefix
=
release/
parentdir_prefix
=
lbmpy-
\ No newline at end of file
This diff is collapsed.
Click to expand it.
setup.py
+
6
−
115
View file @
d5ead943
import
os
from
setuptools
import
setup
import
io
from
setuptools
import
setup
,
find_packages
import
distutils
from
contextlib
import
redirect_stdout
from
importlib
import
import_module
import
versioneer
import
versioneer
try
:
import
cython
# noqa
USE_CYTHON
=
True
except
ImportError
:
USE_CYTHON
=
False
quick_tests
=
[
'
test_quicktests.test_poiseuille_channel_quicktest
'
,
'
test_quicktests.test_entropic_methods
'
,
'
test_quicktests.test_cumulant_ldc
'
,
]
class
SimpleTestRunner
(
distutils
.
cmd
.
Command
):
"""
A custom command to run selected tests
"""
description
=
'
run some quick tests
'
user_options
=
[]
@staticmethod
def
_run_tests_in_module
(
test
):
"""
Short test runner function - to work also if py.test is not installed.
"""
test
=
'
lbmpy_tests.
'
+
test
mod
,
function_name
=
test
.
rsplit
(
'
.
'
,
1
)
if
isinstance
(
mod
,
str
):
mod
=
import_module
(
mod
)
func
=
getattr
(
mod
,
function_name
)
with
redirect_stdout
(
io
.
StringIO
()):
func
()
def
initialize_options
(
self
):
pass
def
finalize_options
(
self
):
pass
def
run
(
self
):
"""
Run command.
"""
for
test
in
quick_tests
:
self
.
_run_tests_in_module
(
test
)
def
readme
():
with
open
(
'
README.md
'
)
as
f
:
return
f
.
read
()
def
cython_extensions
(
*
extensions
):
from
distutils.extension
import
Extension
if
USE_CYTHON
:
ext
=
'
.pyx
'
result
=
[
Extension
(
e
,
[
os
.
path
.
join
(
*
e
.
split
(
"
.
"
))
+
ext
])
for
e
in
extensions
]
from
Cython.Build
import
cythonize
result
=
cythonize
(
result
,
language_level
=
3
)
return
result
elif
all
([
os
.
path
.
exists
(
os
.
path
.
join
(
*
e
.
split
(
"
.
"
))
+
'
.c
'
)
for
e
in
extensions
]):
ext
=
'
.c
'
result
=
[
Extension
(
e
,
[
os
.
path
.
join
(
*
e
.
split
(
"
.
"
))
+
ext
])
for
e
in
extensions
]
return
result
else
:
return
None
def
get_cmdclass
():
def
get_cmdclass
():
cmdclass
=
{
"
quicktest
"
:
SimpleTestRunner
}
return
versioneer
.
get_cmdclass
()
cmdclass
.
update
(
versioneer
.
get_cmdclass
())
return
cmdclass
major_version
=
versioneer
.
get_version
().
split
(
"
+
"
)[
0
]
setup
(
setup
(
name
=
'
lbmpy
'
,
version
=
versioneer
.
get_version
(),
version
=
versioneer
.
get_version
(),
cmdclass
=
get_cmdclass
(),
description
=
'
Code Generation for Lattice Boltzmann Methods
'
,
)
long_description
=
readme
(),
long_description_content_type
=
"
text/markdown
"
,
author
=
'
Martin Bauer, Markus Holzer, Frederik Hennig
'
,
license
=
'
AGPLv3
'
,
author_email
=
'
cs10-codegen@fau.de
'
,
url
=
'
https://i10git.cs.fau.de/pycodegen/lbmpy/
'
,
packages
=
[
'
lbmpy
'
]
+
[
'
lbmpy.
'
+
s
for
s
in
find_packages
(
'
lbmpy
'
)],
install_requires
=
[
f
'
pystencils>=0.4.0,<=
{
major_version
}
'
,
'
sympy>=1.5.1,<=1.11.1
'
,
'
numpy>=1.11.0
'
],
package_data
=
{
'
lbmpy
'
:
[
'
phasefield/simplex_projection.pyx
'
,
'
phasefield/simplex_projection.c
'
]},
ext_modules
=
cython_extensions
(
"
lbmpy.phasefield.simplex_projection
"
),
classifiers
=
[
'
Development Status :: 4 - Beta
'
,
'
Framework :: Jupyter
'
,
'
Topic :: Software Development :: Code Generators
'
,
'
Topic :: Scientific/Engineering :: Physics
'
,
'
Intended Audience :: Developers
'
,
'
Intended Audience :: Science/Research
'
,
'
License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
'
,
],
project_urls
=
{
"
Bug Tracker
"
:
"
https://i10git.cs.fau.de/pycodegen/lbmpy/-/issues
"
,
"
Documentation
"
:
"
https://pycodegen.pages.i10git.cs.fau.de/lbmpy/
"
,
"
Source Code
"
:
"
https://i10git.cs.fau.de/pycodegen/lbmpy
"
,
},
extras_require
=
{
'
gpu
'
:
[
'
cupy
'
],
'
opencl
'
:
[
'
pyopencl
'
],
'
alltrafos
'
:
[
'
islpy
'
,
'
py-cpuinfo
'
],
'
interactive
'
:
[
'
scipy
'
,
'
scikit-image
'
,
'
cython
'
,
'
matplotlib
'
,
'
ipy_table
'
,
'
imageio
'
,
'
jupyter
'
,
'
pyevtk
'
],
'
doc
'
:
[
'
sphinx
'
,
'
sphinx_rtd_theme
'
,
'
nbsphinx
'
,
'
sphinxcontrib-bibtex
'
,
'
sphinx_autodoc_typehints
'
,
'
pandoc
'
],
'
phasefield
'
:
[
'
Cython
'
]
},
python_requires
=
"
>=3.8
"
,
cmdclass
=
get_cmdclass
()
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment