-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from ecmwf/develop
Small changes in GitHub Actions and version
- Loading branch information
Showing
16 changed files
with
210 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: hpc-module | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
module-name: | ||
description: 'Module name' | ||
required: true | ||
type: string | ||
module-tag: | ||
description: 'Module tag' | ||
required: false | ||
default: 'NOT_DEFINED' | ||
type: string | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
jobs: | ||
install_module: | ||
runs-on: [hpc] | ||
steps: | ||
- uses: ecmwf-actions/reusable-workflows/ci-hpc-generic@v2 | ||
with: | ||
troika_user: ${{ secrets.HPC_CI_SSH_USER }} | ||
template: | | ||
MODULE_VERSION=${{ github.event_name == 'workflow_dispatch' && inputs.module-name || github.ref_name }} | ||
MODULE_TAG=${{ github.event_name == 'workflow_dispatch' && inputs.module-tag || 'default'}} | ||
HAT_BRANCH=${{ github.ref_name }} | ||
PREFIX=/usr/local/apps/hat/${MODULE_VERSION} | ||
rm -rf $PREFIX | ||
mkdir -p $PREFIX | ||
# Load the default python module | ||
module load python3 | ||
PYTHONUSERBASE=$PREFIX pip3 install --user git+https://github.com/ecmwf/hat.git@${HAT_BRANCH} | ||
module unload python3 | ||
software-sync -s local -p hat | ||
module load modulemgr | ||
modulemgr -f -m all sync hat | ||
if [ $MODULE_TAG != 'NOT_DEFINED' ] | ||
then | ||
modulemgr -f -m all tag -o hat $MODULE_VERSION $MODULE_TAG | ||
fi | ||
sbatch_options: | | ||
#SBATCH --job-name=cd_hat | ||
#SBATCH --time=00:10:00 | ||
#SBATCH --qos=deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
branches: | ||
- main | ||
tags: | ||
- "*" | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
pull_request: | ||
branches: | ||
- main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ dependencies: | |
- tqdm | ||
- typer | ||
- humanize | ||
- typer | ||
- ipyleaflet | ||
- ipywidgets | ||
- pip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,101 @@ | ||
# required for isort and black to play nicely | ||
|
||
[build-system] | ||
requires = ["setuptools>=65", "setuptools_scm[toml]>=6.2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "hydro_analysis_toolkit" | ||
requires-python = ">=3.8" | ||
authors = [ | ||
{name = "European Centre for Medium-Range Weather Forecasts (ECMWF)", email = "software.support@ecmwf.int"}, | ||
] | ||
maintainers = [ | ||
{name = "Corentin Carton de Wiart", email = "corentin.carton@ecmwf.int"}, | ||
] | ||
description = "ECMWF Hydrological Analysis Tools" | ||
license = {file = "LICENSE"} | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.10", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
dynamic = ["version", "readme"] | ||
|
||
dependencies = [ | ||
"numpy", | ||
"pandas", | ||
"xarray", | ||
"matplotlib", | ||
"geopandas", | ||
"typer", | ||
"humanize", | ||
"tqdm", | ||
"ipyleaflet", | ||
"ipywidgets", | ||
"earthkit-data", | ||
"cfgrib" | ||
] | ||
|
||
[project.urls] | ||
repository = "https://github.com/ecmwf/hat" | ||
documentation = "https://hydro-analysis-toolkit.readthedocs.io" | ||
issues = "https://github.com/ecmwf/hat/issues" | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
"pytest", | ||
] | ||
docs = [ | ||
"mkdocs", | ||
"mkdocs-material", | ||
"mkdocstrings-python", | ||
"mkdocs-autorefs", | ||
"mkdocs-gen-files", | ||
"pymdown-extensions", | ||
"markdown-exec[ansi]", | ||
] | ||
|
||
[project.scripts] | ||
hat-extract-timeseries = "hat.tools.extract_simulation_timeseries_cli:main" | ||
hat-hydrostats = "hat.tools.hydrostats_cli:main" | ||
hat-stations-mapping = "hat.mapping.station_mapping:main" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
profile="black" | ||
|
||
# Testing | ||
[tool.pytest] | ||
addopts = "--pdbcls=IPython.terminal.debugger:Pdb" | ||
testpaths = [ | ||
"tests", | ||
] | ||
|
||
# Packaging/setuptools options | ||
[tool.setuptools] | ||
include-package-data = true | ||
|
||
[tool.setuptools.dynamic] | ||
readme = {file = ["README.md"], content-type = "text/markdown"} | ||
|
||
# [tool.setuptools.package_data] | ||
# hat = ["config_json/*.json"] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["."] | ||
exclude = ["tests"] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "hat/_version.py" | ||
write_to_template = ''' | ||
# Do not change! Do not track in version control! | ||
__version__ = "{version}" | ||
''' | ||
parentdir_prefix_version='hat-' # get version from GitHub-like tarballs | ||
fallback_version='0.7.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters