-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
207 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,68 @@ | ||
|
||
name: 'Tests' | ||
name: CI_pyMAP | ||
|
||
on: | ||
push: | ||
|
||
pull_request: | ||
types: [opened, synchronize] #labeled, assigned] | ||
# We run CI on push commits and pull requests on all branches | ||
on: [push, pull_request] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build-and-test: | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-18.04 | ||
python-version: 3.7 | ||
python: xvfb-run python3 | ||
pip_arg: "" | ||
- os: ubuntu-18.04 | ||
python-version: 3.8 | ||
python: xvfb-run python3 | ||
pip_arg: "" | ||
- os: macos-10.15 | ||
python-version: 3.8 | ||
python: python3 | ||
pip_arg: "" | ||
- os: windows-2019 | ||
python-version: 3.8 | ||
python: python | ||
pip_arg: --user | ||
runs-on: ${{ matrix.os }} | ||
|
||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@main | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install python package | ||
run: | | ||
python -m pip install numpy | ||
python setup.py install | ||
- name: Python unittests | ||
run: | | ||
python -m unittest discover -v | ||
build_pip: | ||
name: Pip Build (${{ matrix.os }}) - ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
strategy: | ||
fail-fast: false #true | ||
matrix: | ||
os: ["ubuntu-latest", "macOS-latest", "windows-latest"] | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- name: Setup C/C++ Compiler | ||
id: install_cc | ||
uses: rlalik/[email protected] | ||
with: | ||
compiler: gcc #clang | ||
|
||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
id: cp | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
update-environment: true | ||
|
||
- name: Editable Pip Install pyMAP | ||
env: | ||
CC: '${{ steps.install_cc.outputs.cc }}' | ||
CXX: '${{ steps.install_cc.outputs.cxx }}' | ||
run: | | ||
'${{ steps.cp.outputs.python-path }}' -m pip install --upgrade pip | ||
'${{ steps.cp.outputs.python-path }}' -m pip install numpy setuptools | ||
'${{ steps.cp.outputs.python-path }}' -m pip install -e . | ||
- name: Editable Test run | ||
run: | | ||
'${{ steps.cp.outputs.python-path }}' -m unittest discover -v | ||
- name: Pip Install pyFrame3DD | ||
env: | ||
CC: '${{ steps.install_cc.outputs.cc }}' | ||
CXX: '${{ steps.install_cc.outputs.cxx }}' | ||
run: | | ||
'${{ steps.cp.outputs.python-path }}' -m pip uninstall pymap | ||
'${{ steps.cp.outputs.python-path }}' -m pip install -v .[test] | ||
#- name: Setup tmate session | ||
# uses: mxschmitt/action-tmate@v3 | ||
# with: | ||
# detached: true | ||
# if: contains( matrix.os, 'ubuntu') | ||
|
||
- name: Test run | ||
run: | | ||
'${{ steps.cp.outputs.python-path }}' -m unittest discover -v | ||
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from pymap.pymap import pyMAP | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
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.
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.
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.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel","numpy"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "pymap" | ||
version = "1.1.0" | ||
description = "Python module wrapping around MAP++" | ||
readme = "README.md" | ||
requires-python = ">=3.9" | ||
license = {text = "Apache-2.0"} | ||
keywords = ["wind", "turbine", "mdao", "design", "optimization"] | ||
authors = [ | ||
{name = "NREL WISDEM Team", email = "[email protected]" } | ||
] | ||
maintainers = [ | ||
{name = "NREL WISDEM Team", email = "[email protected]" } | ||
] | ||
classifiers = [ # Optional | ||
# How mature is this project? Common values are | ||
# 3 - Alpha | ||
# 4 - Beta | ||
# 5 - Production/Stable | ||
"Development Status :: 4 - Beta", | ||
|
||
# Indicate who your project is intended for | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering", | ||
|
||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
|
||
# Specify the Python versions you support here. In particular, ensure | ||
# that you indicate you support Python 3. These classifiers are *not* | ||
# checked by "pip install". See instead "python_requires" below. | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: C", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: POSIX", | ||
"Operating System :: Unix", | ||
"Operating System :: MacOS", | ||
] | ||
|
||
dependencies = [ | ||
"numpy", | ||
"matplotlib", | ||
] | ||
|
||
# List additional groups of dependencies here (e.g. development | ||
# dependencies). Users will be able to install these using the "extras" | ||
# syntax, for example: | ||
# | ||
# $ pip install sampleproject[dev] | ||
# | ||
# Similar to `dependencies` above, these must be valid existing | ||
# projects. | ||
#[project.optional-dependencies] # Optional | ||
#test = ["pytest"] | ||
|
||
# List URLs that are relevant to your project | ||
# | ||
# This field corresponds to the "Project-URL" and "Home-Page" metadata fields: | ||
# https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use | ||
# https://packaging.python.org/specifications/core-metadata/#home-page-optional | ||
# | ||
# Examples listed include a pattern for specifying where the package tracks | ||
# issues, where the source is hosted, where to say thanks to the package | ||
# maintainers, and where to support the project financially. The key is | ||
# what's used to render the link text on PyPI. | ||
[project.urls] # Optional | ||
homepage = "https://github.com/WISDEM/pyMAP" | ||
source = "https://github.com/WISDEM/pyMAP" | ||
|
||
# This is configuration specific to the `setuptools` build backend. | ||
# If you are using a different build backend, you will need to change this. | ||
[tool.setuptools] | ||
include-package-data = true | ||
zip-safe = false | ||
|
||
#[tool.setuptools.packages] | ||
#find = {} | ||
|
||
[tool.setuptools.packages.find] | ||
exclude = ["docs", "examples", "test"] | ||
namespaces = true | ||
|
||
[tool.setuptools.package-data] | ||
# If there are data files included in your packages that need to be | ||
# installed, specify them here. | ||
"*" = ["*.txt", "*.md"] | ||
|
||
[tool.black] | ||
line-length = 120 | ||
target-version = ['py311'] | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
/( | ||
\.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
)/ | ||
''' | ||
|
||
[tool.isort] | ||
# https://github.com/PyCQA/isort | ||
multi_line_output = "3" | ||
include_trailing_comma = true | ||
force_grid_wrap = false | ||
use_parentheses = true | ||
line_length = "120" | ||
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] | ||
known_first_party = ["wisdem"] | ||
length_sort = "1" | ||
profile = "black" | ||
skip_glob = ['__init__.py'] | ||
atomic = true | ||
#lines_after_imports = 2 | ||
#lines_between_types = 1 | ||
#src_paths=isort,test | ||
|
||
[tool.cibuildwheel] | ||
skip = ["cp36-*", "cp37-*", "cp38-*", "*-win32"] | ||
build-frontend = "build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
# encoding: utf-8 | ||
|
||
from setuptools import setup, Extension | ||
# from numpy.distutils.core import setup, Extension | ||
import os | ||
import sys | ||
import platform | ||
|
@@ -21,28 +20,14 @@ | |
#cflags = ['-O1', '-m64', '-fPIC', '-std=c99', '-D WITH_LAPACK'] | ||
cflags = ['-O1', '-m64', '-fPIC', '-std=c99'] | ||
|
||
pymapExt = Extension('_libmap', sources=glob.glob(os.path.join('src','pymap','**','*.c'), recursive=True)+ | ||
glob.glob(os.path.join('src','pymap','**','*.cc'), recursive=True), | ||
pymapExt = Extension('pymap._libmap', | ||
sources=glob.glob(os.path.join('pymap','src','**','*.c'), recursive=True)+ | ||
glob.glob(os.path.join('pymap','src','**','*.cc'), recursive=True), | ||
extra_compile_args=cflags, | ||
include_dirs=[os.path.join('src','pymap','lapack')]) | ||
include_dirs=[os.path.join('pymap','src','lapack')]) | ||
|
||
setup( | ||
name='pyMAP', | ||
version='1.0.0', | ||
description='Python module wrapping around MAP++', | ||
author='NREL WISDEM Team', | ||
author_email='[email protected]', | ||
license='Apache License, Version 2.0', | ||
package_dir={'': 'src'}, | ||
py_modules=['pymap'+os.sep+'pymap'], | ||
package_data={'pymap': []}, | ||
packages=['pymap'], | ||
ext_modules=[pymapExt], | ||
install_requires=[ | ||
'matplotlib', | ||
'numpy', | ||
], | ||
zip_safe=False | ||
) | ||
|
||
|
This file was deleted.
Oops, something went wrong.