Skip to content

Commit

Permalink
Merge pull request #189 from WISDEM/modern_setup
Browse files Browse the repository at this point in the history
move to pyproject.toml, should make it pypi friendly now too
  • Loading branch information
gbarter authored Jun 19, 2023
2 parents 4e437ad + ea1e76e commit 6838b5f
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 65 deletions.
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[![Build Status](https://travis-ci.com/WISDEM/LandBOSSE.svg?branch=issue_136_add_tests)](https://travis-ci.com/WISDEM/LandBOSSE)
# LandBOSSE

## Welcome to LandBOSSE!
Expand Down
2 changes: 1 addition & 1 deletion landbosse/tests/landbosse_omdao/test_landbosse.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def landbosse_costs_by_module_type_operation():
Executes LandBOSSE and extracts cost output for the regression
test.
"""
prob = om.Problem()
prob = om.Problem(reports=False)
prob.model = LandBOSSE()
prob.setup()
prob.run_model()
Expand Down
127 changes: 127 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "landbosse"
version = "2.5.0"
description = "Wind-Plant Integrated System Design & Engineering Model"
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 :: Apache Software License",

# 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 :: Only",
"Programming Language :: C",
"Programming Language :: Fortran",
]

dependencies = ['numpy', 'openpyxl', 'pandas', 'scipy', 'xlsxwriter']

# 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 = ["coveralls", "pytest"]
docs = ["sphinx", "sphinx_rtd_theme"]

# 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/LandBOSSE"
#"Documentation" = "https://wisdem.readthedocs.io"
"Project" = "https://www.nrel.gov/wind/systems-engineering.html"

#[project.scripts]
# What to do about main.py program

# 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

#[tool.setuptools.packages]
#find = {}

[tool.setuptools.packages.find]
#where = ["wisdem"]
exclude = ["docs", "post_processing_scripts"]
namespaces = true

[tool.setuptools.package-data]
# If there are data files included in your packages that need to be
# installed, specify them here.
"*" = ["*.yaml", "*.yml", "*.xlsx", "*.txt", "*.csv", "*.md", "*.png"]

[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
36 changes: 1 addition & 35 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
import os
import setuptools

name = 'landbosse'
version = '2.1.5'

with open('README.md', 'r') as fh:
long_description = fh.read()

PACKAGE_PATH = os.path.abspath(os.path.join(__file__, os.pardir))

setuptools.setup(
url='https://github.com/WISDEM/LandBOSSE',
name=name,
version=version,
author='NREL',
author_email='[email protected]',
description='LandBOSSE',
long_description=long_description,
long_description_content_type='text/markdown',
#packages=['landbosse'],
packages=setuptools.find_packages(PACKAGE_PATH, "test"),
install_requires=[
'pandas',
'numpy',
'scipy',
'xlsxwriter',
'openpyxl',
'pytest'
],
command_options={
'build_sphinx': {
'project': ('setup.py', name),
'version': ('setup.py', version),
# 'release': ('setup.py', release), # Not yet needed
'source_dir': ('setup.py', 'docs')}}
)
setuptools.setup()

0 comments on commit 6838b5f

Please sign in to comment.