Skip to content

Commit c034542

Browse files
committed
[JTH] solve conflicts and merge last WMS changes
2 parents 0aa41ba + d0d7cc9 commit c034542

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+16562
-6930
lines changed

.github/workflows/build-docs.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- name: Checkout Repository
17-
uses: actions/checkout@v4
18-
19-
- name: Set Up Python
20-
uses: actions/setup-python@v5
21-
with:
22-
python-version: "3.12"
23-
24-
- name: Install dependencies
25-
run: |
26-
pip install bluemath-tk[docs]
27-
28-
- name: Sphinx build
29-
run: |
30-
sphinx-apidoc -o docs/source/ bluemath_tk/
31-
sphinx-build docs/source/ docs/build/
32-
33-
- name: Deploy to GitHub Pages
34-
uses: peaceiris/actions-gh-pages@v3
35-
with:
36-
publish_branch: gh-pages
37-
github_token: ${{ secrets.GITHUB_TOKEN }}
38-
publish_dir: docs/build/
39-
force_orphan: true
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set Up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.11"
23+
24+
- name: Install dependencies
25+
run: |
26+
pip install .[all,docs]
27+
28+
- name: Sphinx build
29+
run: |
30+
sphinx-apidoc -o docs/source/ bluemath_tk/
31+
sphinx-build docs/source/ docs/build/
32+
33+
- name: Deploy to GitHub Pages
34+
uses: peaceiris/actions-gh-pages@v3
35+
with:
36+
publish_branch: gh-pages
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: docs/build/
39+
force_orphan: true

.github/workflows/build-package.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- name: Checkout Repository
14-
uses: actions/checkout@v4
15-
16-
- name: Set Up Python
17-
uses: actions/setup-python@v5
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: python -m twine upload dist/* --verbose
38-
env:
39-
TWINE_USERNAME: __token__
40-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set Up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
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: python -m twine upload dist/* --verbose
38+
env:
39+
TWINE_USERNAME: __token__
40+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

.github/workflows/python-tests.yml

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,31 @@ on:
1111
jobs:
1212
python-tests:
1313
runs-on: ${{ matrix.os }}
14-
14+
1515
strategy:
1616
matrix:
17-
os: [ubuntu-latest]
18-
python-version: ["3.11", "3.12", "3.13"]
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
python-version: ["3.11", "3.12"]
1919
fail-fast: false
2020

2121
steps:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
2424

25-
- name: Set up Miniconda
26-
uses: conda-incubator/setup-miniconda@v2
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v5
2727
with:
28-
auto-update-conda: true
29-
30-
- name: Create conda environment
31-
run: conda create -n bluemath-tk python=${{ matrix.python-version }}
28+
python-version: ${{ matrix.python-version }}
3229

3330
- name: Install dependencies
3431
run: |
35-
source /usr/share/miniconda/etc/profile.d/conda.sh
36-
conda activate bluemath-tk
37-
pip install bluemath-tk
38-
pip install ruff
32+
python -m pip install --upgrade pip
33+
pip install .[all,tests]
3934
40-
- name: Run Ruff
35+
- name: Lint
4136
run: |
42-
source /usr/share/miniconda/etc/profile.d/conda.sh
43-
conda activate bluemath-tk
44-
ruff check bluemath_tk/datamining/
37+
ruff check bluemath_tk/datamining/ || true # optional: don't fail lint for now
4538
4639
- name: Run tests
4740
run: |
48-
source /usr/share/miniconda/etc/profile.d/conda.sh
49-
conda activate bluemath-tk
50-
python -m unittest discover tests/config/
51-
python -m unittest discover tests/core/
52-
python -m unittest discover tests/datamining/
53-
python -m unittest discover tests/distributions/
54-
python -m unittest discover tests/interpolation/
55-
python -m unittest discover tests/wrappers/
41+
pytest -s -v tests

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ docs/logs/
7878
docs/jupyter_execute/
7979
docs/*.pkl
8080
.ruff_cache/
81+
*.rst
8182

8283
# MkDocs documentation (production)
8384
site/
@@ -104,5 +105,11 @@ venv.bak/
104105
notebooks/
105106
test_cases/
106107
test_data/
108+
109+
# Automation
107110
TODO.md
108-
newsletter.py
111+
newsletter.py
112+
notion/
113+
114+
# Tests
115+
tests/downloaders/

bluemath_tk/__init__.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
"""
2+
Project: BlueMath_tk
3+
Module: bluemath_tk
4+
Author: GeoOcean Research Group, Universidad de Cantabria
5+
Repository: https://github.com/GeoOcean/BlueMath_tk.git
6+
Status: Under development (Working)
7+
"""
8+
9+
# Import specific modules instead of using wildcard imports
10+
from . import (
11+
additive,
12+
config,
13+
core,
14+
datamining,
15+
deeplearning,
16+
distributions,
17+
downloaders,
18+
interpolation,
19+
predictor,
20+
risk,
21+
tcs,
22+
teslakit,
23+
tide,
24+
topo_bathy,
25+
waves,
26+
wrappers,
27+
)
28+
29+
# Add __all__ variable to control what gets imported when using `from module import *`.
30+
__all__ = [
31+
"additive",
32+
"config",
33+
"core",
34+
"datamining",
35+
"deeplearning",
36+
"distributions",
37+
"downloaders",
38+
"interpolation",
39+
"predictor",
40+
"risk",
41+
"tcs",
42+
"teslakit",
43+
"tide",
44+
"topo_bathy",
45+
"waves",
46+
"wrappers",
47+
]

0 commit comments

Comments
 (0)