Skip to content

Commit

Permalink
prepare to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
aerorahul committed Jul 5, 2023
1 parent 263302f commit 6b81a6c
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 66 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Python distributions to PyPI

on:
release:
types: [published]

jobs:
build-and-publish:
name: Build and publish Python distribution to PyPI
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install pypa/build
run: |
python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: |
python3 -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
[![pynorms](https://github.com/NOAA-EMC/wxflow/actions/workflows/pynorms.yaml/badge.svg)](https://github.com/NOAA-EMC/wxflow/actions/workflows/pynorms.yaml)
[![pytests](https://github.com/NOAA-EMC/wxflow/actions/workflows/pytests.yaml/badge.svg)](https://github.com/NOAA-EMC/wxflow/actions/workflows/pytests.yaml)
![PyPI](https://img.shields.io/pypi/v/:wxflow)

# Tools for Weather Workflows

Common set of tools used in weather workflows

## Installation
Simple installation instructions
```sh
$> git clone https://github.com/noaa-emc/wxflow
$> cd wxflow
$> pip install .
```

It is not required to install this package. Instead,
```sh
$> cd wxflow
$> export PYTHONPATH=${PWD}/src/wxflow
$> pip install wxflow
```
would put this package in the `PYTHONPATH`

### Note:
These instructions will be updated and the tools are under development.

### Running python tests:
Simple instructions to enable executing pytests manually
Expand Down
46 changes: 0 additions & 46 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,49 +1,3 @@
[project]
name = "wxflow"
version = "0.1.0"
description = "Tools for Weather Workflows"
readme = "README.md"
requires-python = ">=3.6"
license = {file = "LICENSE.md"}
keywords = ["NWP", "Workflow"]
authors = [
{name = "NOAA/NWS/NCEP/EMC", email = "First.Last@noaa.gov" }
]
maintainers = [
{name = "NOAA/NWS/NCEP/EMC", email = "First.Last@noaa.gov" }
]

classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU Lesser General Public License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
]

dependencies = [
"numpy>=1.21.6",
"PyYAML>=6.0",
"Jinja2>=3.1.2"
]

[project.optional-dependencies]
dev = ["check-manifest", "pytest>=7", "pytest-cov[all]"]
test = ["pytest>=7", "pytest-cov[all]"]
lint = ["pycodestyle"]

[project.urls]
"Homepage" = "https://github.com/NOAA-EMC/wxflow"
"Bug Reports" = "https://github.com/NOAA-EMC/wxflow/issues"
"Source" = "https://github.com/NOAA-EMC/wxflow/"

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
64 changes: 64 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[metadata]
name = wxflow
version = attr: wxflow.__version__
description = Tools for Weather Workflows
long_description = file: README.md
long_description_content_type = text/markdown
author = NOAA/NWS/NCEP/EMC
#author_email = first.last@domain.tld
keywords = NOAA, NWS, NCEP, EMC
home_page = https://github.com/noaa-emc/wxflow
license = GNU Lesser General Public License v3 or later (LGPLv3+)
classifiers =
Development Status :: 4 - Beta
Intended Audience :: Developers
Intended Audience :: Science/Research
License :: OSI Approved :: GNU Lesser General Public License
Natural Language :: English
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: OS Independent
Typing :: Typed
project_urls =
Bug Tracker = https://github.com/noaa-emc/wxflow/issues
CI = https://github.com/noaa-emc/wxflow/actions

[options]
zip_safe = False
include_package_data = True
package_dir =
=src
packages = find_namespace:
python_requires = >= 3.6
setup_requires =
setuptools
install_requires =
numpy>=1.22.0
PyYAML>=6.0
Jinja2>=3.1.2
tests_require =
pytest

[options.packages.find]
where=src

[options.package_data]
* = *.txt, *.md

[options.extras_require]
dev = pytest>=7; pytest-cov>=3

[green]
file-pattern = test_*.py
verbose = 2
no-skip-report = true
quiet-stdout = true
run-coverage = true
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
''' Standard file for building the package with Distutils. '''

import setuptools
setuptools.setup()
10 changes: 4 additions & 6 deletions src/wxflow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""
Commonly used toolset in weather workflow applications.
"""
import os

from .yaml_file import YAMLFile, parse_yaml, parse_yamltmpl, parse_j2yaml, save_as_yaml, dump_as_yaml, vanilla_yaml
from .timetools import *
from .template import TemplateConstants, Template
Expand All @@ -14,8 +13,7 @@
from .exceptions import WorkflowException, msg_except_handle
from .configuration import Configuration, cast_strdict_as_dtypedict, cast_as_dtype
from .attrdict import AttrDict
__docformat__ = "restructuredtext"

import os

__docformat__ = "restructuredtext"
__version__ = "0.1.0"
wxflow_directory = os.path.dirname(__file__)

0 comments on commit 6b81a6c

Please sign in to comment.