Skip to content

Commit

Permalink
Update CI (#235)
Browse files Browse the repository at this point in the history
* Update docs

* Update docs

* Update ci.yml

* Update ci and c files

* Update CI dist and whl

* Fetch tags

* Update dist

* Update ci

* Update CI

* Update CI

* Build wheel first

* Don't Cythonize on dist

* build whl for win, sdist for lin

* Update ci.ym
  • Loading branch information
wpreimes committed May 12, 2021
1 parent 4b6371f commit a60af52
Show file tree
Hide file tree
Showing 6 changed files with 361 additions and 328 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true # does not work with self-hosted testdata
fetch-depth: 0
- uses: conda-incubator/[email protected]
with:
miniconda-version: "latest"
Expand Down Expand Up @@ -54,7 +55,9 @@ jobs:
shell: bash -l {0}
run: |
pip install .
pytest --cache-clear
# This separation avoids segfaults:
pytest --cache-clear -m 'not full_framework'
pytest --cache-clear -m 'full_framework'
- name: Upload Coverage
shell: bash -l {0}
run: |
Expand All @@ -63,11 +66,19 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
- name: Create wheel package
- name: Create wheel and dist package
shell: bash -l {0}
run: |
python -m build --sdist --outdir .artifacts/dist
python -m build --wheel --outdir .artifacts/dist
pip install setuptools_scm
if [ ${{ matrix.os }} == "windows-latest" ]
then
# build whls on windows
pip install wheel
python setup.py bdist_wheel --dist-dir .artifacts/dist
else
# build dist on linux
python setup.py sdist --dist-dir .artifacts/dist
fi
ls .artifacts/dist
- name: Upload Artifacts
uses: actions/upload-artifact@v2
Expand Down
19 changes: 17 additions & 2 deletions DEVELOPERS_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,24 @@ future-proof commands:
- `pip install .` instead of `python setup.py install`
- `pip install -e .` instead of `python setup.py develop`
- `pytest` instead of `python setup.py test`
- `python -m build --sdist` instead of `python setup.py sdist`
- `python -m build --wheel` instead of `python setup.py bdist_wheel`
- `python -m build --sdist` instead of `python setup.py sdist` (needs `build` installed)
- `python -m build --wheel` instead of `python setup.py bdist_wheel` (needs `build` installed)

Due to our more complex build setup (using Cython) we still need a `setup.py`,
and the old commands will still work (except `python setup.py test`), but we
recommend to use the new commands.


Creating a release
------------------

To release a new version of this package, make sure all tests are passing
on the master branch and the `CHANGELOG.rst` is up-to-date, with changes for
the new version at the top.
Then draft a new release on [GitHub](https://github.com/TUW-GEO/pytesmo/releases).
Create a version tag following the `v{MAJOR}.{MINOR}.{PATCH}` pattern. This will trigger a new build.
After the build has finished successfully, you can
download the `.dist` and `.whl` files for the release from the build Artifacts
and upload them to [PyPI](https://pypi.org/project/pytesmo/) (only maintainers of pytesmo),
e.g. by using `twine check ./dist/*` and `twine upload ./dist/pytesmo-0.7.1*whl`.
Note that PyPI might reject the non-windows `.whl` files.
23 changes: 15 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ reproducibility.
You can find additional information regarding DOI versioning at
https://help.zenodo.org/#versioning

If you want to contribute, take a look at the `developers guide
<https://github.com/TUW-GEO/pytesmo/blob/master/DEVELOPERS_GUIDE.md>`_ .

Installation
============

Expand Down Expand Up @@ -100,6 +103,17 @@ through independent and optional (reader) packages:
found in the "Examples" chapter.
* Variables stored in separate files (CEOP formatted)

Related Packages
================

Some former pytesmo modules are now provided as separate packages.

- `pygeogrids <https://github.com/TUW-GEO/pygeogrids/>`_ : Creation and handling of Discrete Global Grids or Point collections
- `cadati <https://github.com/TUW-GEO/cadati/>`_ : Calender, Date and Time functions
- `repurpose <https://github.com/TUW-GEO/repurpose/>`_ : Time series - image conversion and resampling routines
- `colorella <https://github.com/TUW-GEO/colorella/>`_ : Color maps and color map handling


Contribute
==========

Expand All @@ -108,12 +122,5 @@ is missing or if you find a bug. We will also gladly accept pull requests
against our master branch for new features or bug fixes.

Please follow the `developers guide
<https://github.com/TUW-GEO/pytesmo/blob/master/DEVELOPERS_GUIDE.md>`_ if you
want to contribute.


Note
====
<https://github.com/TUW-GEO/pytesmo/blob/master/DEVELOPERS_GUIDE.md>`_.

This project has been set up using PyScaffold 3.2.3. For details and usage
information on PyScaffold see https://pyscaffold.org/.
Loading

0 comments on commit a60af52

Please sign in to comment.