Skip to content

Commit af270ba

Browse files
committed
[JTH] update package structure
1 parent c291f90 commit af270ba

File tree

7 files changed

+113
-90
lines changed

7 files changed

+113
-90
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish Python Package
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v3
15+
16+
- name: Set Up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.12"
20+
21+
- name: Install Dependencies
22+
run: |
23+
pip install build setuptools-scm twine
24+
conda install -c conda-forge conda-build anaconda-client
25+
26+
- name: Get Version
27+
id: get_version
28+
run: |
29+
echo "version=$(python -c 'import setuptools_scm; print(setuptools_scm.get_version())')" >> $GITHUB_ENV
30+
env:
31+
GITHUB_ENV: ${{ github.env }}
32+
33+
- name: Build Python Package
34+
run: python -m build
35+
36+
- name: Publish to PyPI
37+
run: twine upload dist/*
38+
env:
39+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
40+
41+
- name: Build Conda Package
42+
run: |
43+
conda-build recipe/
44+
anaconda upload $(conda build recipe/ --output)
45+
env:
46+
PKG_VERSION: ${{ env.version }}
47+
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}

.github/workflows/python-tests.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
name: Python Tests on Merge/Push to main
1+
name: Python Tests
22

33
on:
4-
push:
5-
branches:
6-
- main
74
pull_request:
85
branches:
96
- main
@@ -13,6 +10,7 @@ on:
1310
jobs:
1411
python-tests:
1512
runs-on: ubuntu-latest
13+
1614
steps:
1715
- name: Checkout code
1816
uses: actions/checkout@v2
File renamed without changes.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ This project is licensed under the MIT License. See the [license](LICENSE.txt) f
4040
- Check climate scale data in SamoaTonga
4141
- Add logs to datamining classes.
4242
- Descomentar crontab, que ya funcionan los sh
43-
- Add ERA5 spectra download.
43+
- Add ERA5 spectra download.
44+
- Add docker, sbatch, et options in wrappers!

bluemath_tk/_get_package_status.py

Lines changed: 0 additions & 65 deletions
This file was deleted.

pyproject.toml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[build-system]
2+
3+
requires = ["setuptools>=60", "setuptools-scm>=8"]
4+
build-backend = "setuptools.build_meta"
5+
6+
[project]
7+
8+
name = "bluemath-tk"
9+
description = "Module collection for custom climate data analysis. The main objective of this Python package is to provide a set of statistical tools tailored for climate data analysis, with a focus on statistical classification and prediction."
10+
readme = "README.md"
11+
keywords = ["climate", "statistical", "tools"]
12+
license = { file = "LICENSE" }
13+
authors = [
14+
{ name = "Geomatics and Ocean Engineering Group", email = "bluemath@unican.es" },
15+
]
16+
17+
dynamic = ["version"]
18+
19+
requires-python = ">=3.9"
20+
classifiers = [
21+
"Programming Language :: Python :: 3 :: Only",
22+
"License :: OSI Approved :: MIT License",
23+
"Operating System :: OS Independent",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
28+
"Programming Language :: Python :: 3.13",
29+
]
30+
dependencies = [
31+
"numpy",
32+
"pandas",
33+
"xarray",
34+
"netcdf4",
35+
"dask",
36+
"zarr",
37+
"scipy",
38+
"scikit-learn",
39+
"matplotlib",
40+
"plotly",
41+
"cartopy",
42+
"cdsapi",
43+
"jinja2",
44+
"requests",
45+
"aiohttp",
46+
"minisom",
47+
]
48+
49+
[project.optional-dependencies]
50+
51+
docs = ["mkdocs", "mkdocs-material", "mkdocstrings", "mkdocstrings[python]"]
52+
tests = ["pytest", "pytest-mock"]
53+
deep = ["tensorflow", "keras"]
54+
55+
[project.urls]
56+
57+
Homepage = "https://github.com/GeoOcean/BlueMath_tk"
58+
Documentation = "https://geoocean.github.io/BlueMath_tk/"
59+
Issues = "https://github.com/GeoOcean/BlueMath_tk/issues"
60+
61+
[tool.setuptools_scm]
62+
version_file = "bluemath_tk/_version.py"

setup.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)