Skip to content

Commit

Permalink
Merge pull request #15 from paulromano/release-0.1.0
Browse files Browse the repository at this point in the history
Add GH action for publishing to PyPI
  • Loading branch information
nstauff authored Feb 24, 2022
2 parents bb1fe10 + 2792554 commit 0af2085
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 13 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).


## [Unreleased]
## [0.1.0]

### Added

Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ questions, please contact [[email protected]](mailto:[email protected]).

## Installation

- git clone https://github.com/watts-dev/watts
- cd watts
- pip install -U pip
- pip install .
- pip install watts

## Documentation

Expand Down
10 changes: 10 additions & 0 deletions doc/source/_static/switcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"name": "dev",
"version": "latest"
},
{
"name": "0.1.0",
"version": "v0.1.0"
}
]
18 changes: 13 additions & 5 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
'astropy': ('https://docs.astropy.org/en/stable/', None)
}

import watts
version = release = watts.__version__

# -- Options for HTML output -------------------------------------------------

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

html_theme = 'pydata_sphinx_theme'

html_theme_options = {
'github_url': 'https://github.com/watts-dev/watts',
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_logo = '_static/watts.svg'

html_theme_options = {
"github_url": "https://github.com/watts-dev/watts",
"favicons": [
{
"rel": "icon",
Expand All @@ -86,5 +88,11 @@
"sizes": "32x32",
"href": "watts_32x32.png",
},
]
],
"switcher": {
"json_url": "https://watts.readthedocs.io/en/latest/_static/switcher.json",
"url_template": "https://watts.readthedocs.io/en/{version}/",
"version_match": version if '-dev' not in version else 'dev',
},
"navbar_end": ["version-switcher", "navbar-icon-links"]
}
12 changes: 12 additions & 0 deletions doc/source/dev/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,15 @@ Review Process
Once your pull request is submitted, a member of the WATTS core development team
will review your pull request. They will check your contribution against the
above checklist to ensure that it is of sufficient quality.

Installation for Developers
+++++++++++++++++++++++++++

As a developer, it is advisable to install WATTS from the local source tree in
"`editable <https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs>`_"
mode::

pip install -e <path-to-watts-dir>

This will install the package via a link to the original location so that any
local changes are immediately reflected in your environment.
19 changes: 16 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
[metadata]
name = watts
version = 0.0.1
version = 0.1.0
author = UChicago Argonne, LLC
author_email = [email protected]
description = Workflow and Template Toolkit for Simulation
long_description = file: README.md
long_description =
WATTS (Workflow and Template Toolkit for Simulation) provides a set of
Python classes that can manage simulation workflows for multiple codes where
information is exchanged at a coarse level. For each code, input files rely
on placeholder values that are filled in based on a set of user-defined
parameters.

WATTS is being developed with support from Argonne National Laboratory. For
any questions, please contact [[email protected]](mailto:[email protected]).
long_description_content_type = text/markdown
license = MIT License
url = https://github.com/watts-dev/watts
project_urls =
Bug Tracker = https://github.com/watts-dev/watts/issues
Documentation = https://watts.readthedocs.io
Source Code = https://github.com/watts-dev/watts
classifiers =
Development Status :: 2 - Pre-Alpha
Development Status :: 3 - Alpha
Intended Audience :: Developers
Intended Audience :: End Users/Desktop
Intended Audience :: Science/Research
Expand Down
2 changes: 2 additions & 0 deletions src/watts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@

# This allows a user to write watts.Quantity
from astropy.units import Quantity

__version__ = '0.1.0'

0 comments on commit 0af2085

Please sign in to comment.