Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@ jobs:
name: Setup Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements 📦
run: |
python3 -m pip install --upgrade pip
pip3 install setuptools
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
- name: Install package 📦
run: pip3 install .
run: |
pip3 install .
pip3 install ".[dev]"
pip3 install ".[release]"
- name: run tests ⚙️
run: python3 tests/run_tests.py
- name: run flake8 ⚙️
run: |
find . -type f -name "*.py" | xargs flake8
- name: build Python package 🏗️
run: python3 setup.py sdist bdist_wheel --universal
run: python3 -m build
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ cd pywiscat
. bin/activate
git clone https://github.com/wmo-im/pywiscat.git
cd pywiscat
pip3 install -r requirements.txt
pip3 install .
```

Expand Down Expand Up @@ -104,9 +103,7 @@ python3 -m venv pywiscat
cd pywiscat
source bin/activate
git clone https://github.com/wmo-im/pywiscat.git
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
python3 setup.py install
pip3 install .
```

### Running tests
Expand All @@ -119,21 +116,21 @@ python3 tests/run_tests.py

```bash
# create release (x.y.z is the release version)
vi pywiscat/__init__.py # update __version__
vi pyproject.toml # update [project]/version
git commit -am 'update release version x.y.z'
git push origin master
git tag -a x.y.z -m 'tagging release version x.y.z'
git push --tags

# upload to PyPI
rm -fr build dist *.egg-info
python3 setup.py sdist bdist_wheel --universal
python3 -m build
twine upload dist/*

# publish release on GitHub (https://github.com/wmo-im/pywiscat/releases/new)

# bump version back to dev
vi pywiscat/__init__.py # update __version__
vi pyproject.toml # update [project]/version
git commit -am 'back to dev'
git push origin master
```
Expand Down
48 changes: 48 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
[build-system]
requires = ["setuptools>=46.4", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "pywiscat"
version = "0.4.dev0"
description = "WMO WIS Catalogue Python client"
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
license-files = ["LICENSE.md"]
keywords = ["WMO", "WIS2"]
authors = [
{name = "Tom Kralidis", email = "tomkralidis@gmail.com"}
]
maintainers = [
{name = "Tom Kralidis", email = "tomkralidis@gmail.com"}
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Scientific/Engineering :: Information Analysis"
]
dependencies = [
"click",
"emoji-country-flag",
"iso3166",
"prettytable",
"pywcmp",
"requests"
]

[project.optional-dependencies]
dev = ["flake8"]
release = ["build", "twine", "wheel"]

[project.scripts]
pywiscat = "pywiscat:cli"

[project.urls]
homepage = "https://github.com/World-Meteorological-Organization/pywiscat"
source = "https://github.com/World-Meteorological-Organization/pywiscat"
documentation = "https://github.com/World-Meteorological-Organization/pywiscat"
issues = "https://github.com/World-Meteorological-Organization/pywiscat/issues"
3 changes: 2 additions & 1 deletion pywiscat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
from pywiscat.wis2.archive import archive
from pywiscat.wis2.catalogue import get_gdc_record, search_gdc
from pywiscat.wis2.metrics import metrics
from pywiscat.util import get_package_version

__version__ = '0.4.dev0'
__version__ = get_package_version()


@click.group()
Expand Down
40 changes: 40 additions & 0 deletions pywiscat/util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2026 Tom Kralidis
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# =================================================================

import importlib.metadata


def get_package_version() -> str:
"""
Helper function to get package version

:returns: `str` of version of package
"""

return importlib.metadata.version('pywiscat')
3 changes: 0 additions & 3 deletions requirements-dev.txt

This file was deleted.

6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

100 changes: 0 additions & 100 deletions setup.py

This file was deleted.