Skip to content

Commit

Permalink
Merge pull request #179 from nRiccobo/release/1.1
Browse files Browse the repository at this point in the history
Final clean up in dev for Release v1.1
  • Loading branch information
nRiccobo authored Sep 13, 2024
2 parents 78bd3ac + 6338de6 commit e6ad5f5
Show file tree
Hide file tree
Showing 32 changed files with 382 additions and 1,103 deletions.
50 changes: 30 additions & 20 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
name: Upload to PyPi
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

on: push
name: Deploy to PyPI

on:
release:
types: [published]

jobs:
deploy:
release-pypi:
environment: release
# Upload to PyPI on every published release
if: github.event.action == 'published'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
if: startsWith(github.ref, 'refs/tags/v')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Build package
run: |
python -m pip install --upgrade pip
pip install setuptools build wheel twine
python -m build
twine check --strict dist/*
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: True
37 changes: 37 additions & 0 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Deploy to Test PyPI

on:
push:
tags:
- 'v*'

jobs:
release-test-pypi:
# Upload to Test PyPI on every pushed tag.
environment: release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Build package
run: |
python -m pip install --upgrade pip
pip install setuptools build wheel twine
python -m build
twine check --strict dist/*
- name: Publish package to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: True
repository-url: https://test.pypi.org/legacy/
13 changes: 9 additions & 4 deletions ORBIT/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
"""Initializes ORBIT and provides the top-level import objects."""

__author__ = ["Jake Nunemaker", "Matt Shields", "Rob Hammond"]
__author__ = [
"Jake Nunemaker",
"Matt Shields",
"Rob Hammond",
"Nick Riccobono",
]
__copyright__ = "Copyright 2020, National Renewable Energy Laboratory"
__maintainer__ = "Jake Nunemaker"
__email__ = ["jake.nunemaker@nrel.gov", "robert[email protected]"]
__maintainer__ = "Nick Riccobono"
__email__ = ["nicholas.riccobono@nrel.gov", "rob[email protected]"]
__status__ = "Development"


Expand All @@ -12,4 +17,4 @@
from ORBIT.parametric import ParametricManager
from ORBIT.supply_chain import SupplyChainManager

__version__ = "1.0.8"
__version__ = "1.1"
2 changes: 1 addition & 1 deletion ORBIT/core/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
__author__ = "Rob Hammond"
__copyright__ = "Copyright 2020, National Renewable Energy Laboratory"
__maintainer__ = "Rob Hammond"
__email__ = "robert[email protected]"
__email__ = "rob[email protected]"


import os
Expand Down
2 changes: 0 additions & 2 deletions ORBIT/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
SemiSubmersibleDesign,
CustomArraySystemDesign,
OffshoreSubstationDesign,
SemiTautMooringSystemDesign,
OffshoreFloatingSubstationDesign,
)
from ORBIT.phases.install import (
Expand Down Expand Up @@ -78,7 +77,6 @@ class ProjectManager:
OffshoreSubstationDesign,
OffshoreFloatingSubstationDesign,
MooringSystemDesign,
SemiTautMooringSystemDesign,
SemiSubmersibleDesign,
SparDesign,
ElectricalDesign,
Expand Down
2 changes: 1 addition & 1 deletion ORBIT/phases/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__author__ = ["Jake Nunemaker", "Rob Hammond"]
__copyright__ = "Copyright 2020, National Renewable Energy Laboratory"
__maintainer__ = ["Jake Nunemaker", "Rob Hammond"]
__email__ = ["[email protected]" "robert[email protected]"]
__email__ = ["[email protected]" "rob[email protected]"]


from .base import BasePhase
Expand Down
189 changes: 0 additions & 189 deletions ORBIT/phases/design/SemiTaut_mooring_system_design.py

This file was deleted.

3 changes: 1 addition & 2 deletions ORBIT/phases/design/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__author__ = ["Jake Nunemaker", "Rob Hammond"]
__copyright__ = "Copyright 2020, National Renewable Energy Laboratory"
__maintainer__ = ["Jake Nunemaker", "Rob Hammond"]
__email__ = ["[email protected]" "robert[email protected]"]
__email__ = ["[email protected]" "rob[email protected]"]


from .design_phase import DesignPhase # isort:skip
Expand All @@ -17,4 +17,3 @@
from .mooring_system_design import MooringSystemDesign
from .scour_protection_design import ScourProtectionDesign
from .semi_submersible_design import SemiSubmersibleDesign
from .SemiTaut_mooring_system_design import SemiTautMooringSystemDesign
2 changes: 1 addition & 1 deletion ORBIT/phases/design/_cables.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__author__ = ["Matt Shields", "Rob Hammond"]
__copyright__ = "Copyright 2020, National Renewable Energy Laboratory"
__maintainer__ = "Rob Hammond"
__email__ = "robert[email protected]"
__email__ = "rob[email protected]"


import math
Expand Down
2 changes: 1 addition & 1 deletion ORBIT/phases/design/array_system_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__author__ = "Rob Hammond"
__copyright__ = "Copyright 2020, National Renewable Energy Laboratory"
__maintainer__ = "Rob Hammond"
__email__ = "robert[email protected]"
__email__ = "rob[email protected]"


import warnings
Expand Down
2 changes: 1 addition & 1 deletion ORBIT/phases/design/export_system_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__author__ = "Rob Hammond"
__copyright__ = "Copyright 2020, National Renewable Energy Laboratory"
__maintainer__ = "Rob Hammond"
__email__ = "robert[email protected]"
__email__ = "rob[email protected]"

from warnings import warn

Expand Down
2 changes: 1 addition & 1 deletion ORBIT/phases/design/oss_design_floating.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def calc_substructure_mass_and_cost(self):
substructure_mass * oss_substructure_cost_rate
+ substructure_pile_mass * oss_pile_cost_rate
)
# print('substructure cost:' + str(self.substructure_cost))

self.substructure_mass = substructure_mass + substructure_pile_mass

@property
Expand Down
Loading

0 comments on commit e6ad5f5

Please sign in to comment.