-
Notifications
You must be signed in to change notification settings - Fork 6
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 #7 from esa-cci/main
Merging ESA-CCI Main into Fork
- Loading branch information
Showing
33 changed files
with
60,702 additions
and
145 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,35 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: publish to PyPI | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
name: Publish to PyPI | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish to PyPI | ||
run: | | ||
pip install twine | ||
python -m twine upload --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} dist/* |
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 |
---|---|---|
@@ -1,54 +1,68 @@ | ||
version: '{build}' | ||
|
||
image: | ||
- Ubuntu2204 | ||
- macOS | ||
- Ubuntu2004 | ||
|
||
configuration: Release | ||
|
||
platform: | ||
- x64 | ||
|
||
environment: | ||
# For the unit-tests, disable Numba JIT, otherwise Coverage wont reach the actual Python code | ||
NUMBA_DISABLE_JIT: 1 | ||
# Do not build feature branch with open Pull Requests. | ||
# Note that a feature branch build may still occur on the first push to | ||
# the branch -- see | ||
# https://help.appveyor.com/discussions/questions/18437-skip_branch_with_pr-setting-doesnt-work | ||
skip_branch_with_pr: true | ||
|
||
for: | ||
- | ||
matrix: | ||
only: | ||
- image: macos | ||
- image: macOS | ||
install: | ||
- curl -L https://repo.anaconda.com/miniconda/Miniconda3-py310_23.3.1-0-MacOSX-x86_64.sh > miniconda.sh | ||
- bash miniconda.sh -b -p $HOME/miniconda | ||
- curl -Ls https://micro.mamba.pm/api/micromamba/osx-64/latest | tar -xvj bin/micromamba | ||
- mv bin/micromamba ./micromamba | ||
- | ||
matrix: | ||
only: | ||
- image: Ubuntu2004 | ||
- image: Ubuntu2204 | ||
install: | ||
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh | ||
- bash miniconda.sh -b -p $HOME/miniconda | ||
- curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba | ||
- mv bin/micromamba ./micromamba | ||
|
||
build_script: | ||
- export PATH="$HOME/miniconda/bin:$PATH" | ||
# Diagnostics | ||
- echo $PLATFORM | ||
- echo $APPVEYOR_BUILD_WORKER_IMAGE | ||
- echo $APPVEYOR_BUILD_FOLDER | ||
- uname -a | ||
- pwd | ||
- ls | ||
|
||
# Set up micromamba | ||
- ./micromamba shell init -s bash --root-prefix ~/micromamba | ||
- source ~/.bashrc | ||
- source ~/.profile | ||
- hash -r | ||
- conda config --set always_yes yes --set changeps1 no | ||
# - conda update -q conda # makes travis build fail | ||
# Useful for debugging any issues with conda | ||
- conda info -a | ||
- conda init bash | ||
- export CONDA_BASE=$(conda info --base) | ||
- source $CONDA_BASE/etc/profile.d/conda.sh | ||
|
||
# Install mamba as a dramatically faster conda replacement. Specifying a | ||
# fixed version makes the installation of mamba itself much faster, and | ||
# avoids potential breakage due to changes in mamba behaviour. | ||
- conda install -c conda-forge mamba | ||
|
||
- mamba env create | ||
- conda activate ect | ||
- mkdir -p ~/micromamba/pkgs/ | ||
- export MAMBA_ROOT_PREFIX=~/micromamba | ||
- export MAMBA_EXE=$(pwd)/micromamba | ||
- . $MAMBA_ROOT_PREFIX/etc/profile.d/mamba.sh | ||
|
||
# Create environment from build folder environment.yml and install xcube | ||
- micromamba create --name ect --file $APPVEYOR_BUILD_FOLDER/environment.yml | ||
- micromamba activate ect | ||
- cd $APPVEYOR_BUILD_FOLDER | ||
- pip install --no-deps . | ||
- conda list | ||
|
||
# Run the test suite. | ||
- pytest -v --cov=esa-climate-toolbox test | ||
# Make sure pytest is installed | ||
- micromamba install --yes --name ect --channel conda-forge pytest attrs | ||
|
||
# Print some diagnostics (useful for debugging) | ||
- git status | ||
- micromamba list | ||
- python -c "from esa_climate_toolbox import __version__; print(f'ESA CCI Toolbox version {__version__}')" | ||
|
||
# Run the test suite | ||
- pytest -v --cov=esa_climate_toolbox |
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
Oops, something went wrong.