Skip to content

Commit 0af2085

Browse files
authored
Merge pull request #15 from paulromano/release-0.1.0
Add GH action for publishing to PyPI
2 parents bb1fe10 + 2792554 commit 0af2085

File tree

8 files changed

+81
-13
lines changed

8 files changed

+81
-13
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install build
20+
- name: Build package
21+
run: python -m build
22+
- name: Publish a Python distribution to PyPI
23+
uses: pypa/gh-action-pypi-publish@release/v1
24+
with:
25+
user: __token__
26+
password: ${{ secrets.PYPI_API_TOKEN }}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88

9-
## [Unreleased]
9+
## [0.1.0]
1010

1111
### Added
1212

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ questions, please contact [watts@anl.gov](mailto:watts@anl.gov).
1414

1515
## Installation
1616

17-
- git clone https://github.com/watts-dev/watts
18-
- cd watts
19-
- pip install -U pip
20-
- pip install .
17+
- pip install watts
2118

2219
## Documentation
2320

doc/source/_static/switcher.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
{
3+
"name": "dev",
4+
"version": "latest"
5+
},
6+
{
7+
"name": "0.1.0",
8+
"version": "v0.1.0"
9+
}
10+
]

doc/source/conf.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
'astropy': ('https://docs.astropy.org/en/stable/', None)
5353
}
5454

55+
import watts
56+
version = release = watts.__version__
57+
5558
# -- Options for HTML output -------------------------------------------------
5659

5760
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -65,16 +68,15 @@
6568

6669
html_theme = 'pydata_sphinx_theme'
6770

68-
html_theme_options = {
69-
'github_url': 'https://github.com/watts-dev/watts',
70-
}
71-
7271
# Add any paths that contain custom static files (such as style sheets) here,
7372
# relative to this directory. They are copied after the builtin static files,
7473
# so a file named "default.css" will overwrite the builtin "default.css".
7574
html_static_path = ['_static']
75+
7676
html_logo = '_static/watts.svg'
77+
7778
html_theme_options = {
79+
"github_url": "https://github.com/watts-dev/watts",
7880
"favicons": [
7981
{
8082
"rel": "icon",
@@ -86,5 +88,11 @@
8688
"sizes": "32x32",
8789
"href": "watts_32x32.png",
8890
},
89-
]
91+
],
92+
"switcher": {
93+
"json_url": "https://watts.readthedocs.io/en/latest/_static/switcher.json",
94+
"url_template": "https://watts.readthedocs.io/en/{version}/",
95+
"version_match": version if '-dev' not in version else 'dev',
96+
},
97+
"navbar_end": ["version-switcher", "navbar-icon-links"]
9098
}

doc/source/dev/contributing.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,15 @@ Review Process
114114
Once your pull request is submitted, a member of the WATTS core development team
115115
will review your pull request. They will check your contribution against the
116116
above checklist to ensure that it is of sufficient quality.
117+
118+
Installation for Developers
119+
+++++++++++++++++++++++++++
120+
121+
As a developer, it is advisable to install WATTS from the local source tree in
122+
"`editable <https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs>`_"
123+
mode::
124+
125+
pip install -e <path-to-watts-dir>
126+
127+
This will install the package via a link to the original location so that any
128+
local changes are immediately reflected in your environment.

setup.cfg

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
[metadata]
22
name = watts
3-
version = 0.0.1
3+
version = 0.1.0
44
author = UChicago Argonne, LLC
55
author_email = watts@anl.gov
66
description = Workflow and Template Toolkit for Simulation
7-
long_description = file: README.md
7+
long_description =
8+
WATTS (Workflow and Template Toolkit for Simulation) provides a set of
9+
Python classes that can manage simulation workflows for multiple codes where
10+
information is exchanged at a coarse level. For each code, input files rely
11+
on placeholder values that are filled in based on a set of user-defined
12+
parameters.
13+
14+
WATTS is being developed with support from Argonne National Laboratory. For
15+
any questions, please contact [watts@anl.gov](mailto:watts@anl.gov).
816
long_description_content_type = text/markdown
917
license = MIT License
18+
url = https://github.com/watts-dev/watts
19+
project_urls =
20+
Bug Tracker = https://github.com/watts-dev/watts/issues
21+
Documentation = https://watts.readthedocs.io
22+
Source Code = https://github.com/watts-dev/watts
1023
classifiers =
11-
Development Status :: 2 - Pre-Alpha
24+
Development Status :: 3 - Alpha
1225
Intended Audience :: Developers
1326
Intended Audience :: End Users/Desktop
1427
Intended Audience :: Science/Research

src/watts/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111

1212
# This allows a user to write watts.Quantity
1313
from astropy.units import Quantity
14+
15+
__version__ = '0.1.0'

0 commit comments

Comments
 (0)