Skip to content

Commit

Permalink
Merge branch 'main' into local_changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre authored Oct 3, 2023
2 parents 083a5fe + e6df64d commit ca88cb7
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"project_slug": "xhydro",
"project_short_description": "Hydrological analysis library built with xarray",
"pypi_username": "TC-FF",
"version": "0.1.8",
"version": "0.1.9",
"use_pytest": "y",
"use_black": "y",
"add_pyup_badge": "n",
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,3 @@ jobs:
python setup.py sdist bdist_wheel
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 0 additions & 2 deletions .github/workflows/tag-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@ jobs:
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.11.0
rev: v3.14.0
hooks:
- id: pyupgrade
args: [ '--py39-plus' ]
Expand Down Expand Up @@ -62,7 +62,7 @@ repos:
hooks:
- id: check-manifest
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.26.3
rev: 0.27.0
hooks:
- id: check-github-workflows
- id: check-readthedocs
Expand Down
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Internal changes
* Removed all references to travis.ci.
* Deployments to TestPyPI and PyPI are now run using GitHub Workflow Environments as a safeguarding mechanism. (:pull:`28`).
* Various cleanups of the environment files. (:issue:`23`, :pull:`30`).
* `xhydro` now uses the trusted publishing mechanism for PyPI and TestPyPI deployment. (:pull:`32`).

0.1.2 (2023-05-10)
------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

# For external documentation links
intersphinx_mapping = {
# "xclim": ("https://xclim.readthedocs.io/en/latest/", None),
"xclim": ("https://xclim.readthedocs.io/en/latest/", None),
"xscen": ("https://xscen.readthedocs.io/en/latest/", None),
}

Expand Down
11 changes: 3 additions & 8 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
Installation
============


Stable release
--------------

Because of some dependencies being absent from PyPI, we strongly recommend installing `xhydro` in an Anaconda environment.
Due to the complexity of the install process of some dependencies, we strongly recommend installing `xhydro` in an Anaconda Python environment.
To create a working environment and install xHydro, copy the `environment.yml` file from the root of the repository and run the following commands:

.. code-block:: console
Expand All @@ -15,20 +13,17 @@ To create a working environment and install xHydro, copy the `environment.yml` f
$ conda activate xhydro
$ pip install xhydro --no-deps
This is the preferred method to install xHydro, as it will always install the most recent stable release.
This is the preferred method to install `xHydro`, as it will always install the most recent stable release.

If for some reason you wish to install the `PyPI` version of `xscen` into an existing Anaconda environment (*not recommended*), only run the last command above.

If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.
If you don't have `pip`_ installed, this `Python installation guide`_ can guide you through the process.

.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/


From sources
------------

`xHydro` is still under active development and the latest features might not yet be available on `PyPI`.
To install the latest development version, you can install `xHydro` directly from the `Github repo`_.

Expand Down
6 changes: 3 additions & 3 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
- statsmodels
- xarray
- xclim >=0.45.0
- xscen
- xscen >=0.7.1
# Dev
- bump2version
- coveralls
Expand All @@ -27,12 +27,12 @@ dependencies:
- pytest-cov
- sphinx
- sphinx-autoapi
- sphinxcontrib-napoleon
- sphinx-codeautolink
- sphinx-copybutton
- sphinxcontrib-napoleon
- pip
# Testing
- tox <4.0 # 2022-12-12: tox v4.0 is incompatible with tox-conda plugin
- tox <4.0 # 2022-12-12: tox v4.0 is incompatible with tox-conda plugin
- tox-conda >=0.10.2
# Packaging
- build
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ dependencies:
- statsmodels
- xarray
- xclim >=0.45.0
- xscen
- xscen >=0.7.1
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.8
current_version = 0.1.9
commit = True
tag = True

Expand All @@ -25,6 +25,7 @@ test = pytest
[tool:pytest]
collect_ignore = ['setup.py']
addopts =
--color=yes
--verbose
filterwarnings =
ignore::UserWarning
Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Hydrology",
"Topic :: Scientific/Engineering :: GIS",
],
description="Hydrological analysis library built with xarray",
entry_points={
Expand All @@ -43,7 +46,7 @@
extras_require={
"dev": dev_requirements,
},
url="https://github.com/TC-FF/xhydro",
version="0.1.8",
url="https://github.com/hydrologie/xhydro",
version="0.1.9",
zip_safe=False,
)
2 changes: 1 addition & 1 deletion tests/test_xhydro.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ def test_package_metadata():
contents = f.read()
assert """Thomas-Charles Fortier Filion""" in contents
assert '__email__ = "tcff_hydro@outlook.com"' in contents
assert '__version__ = "0.1.8"' in contents
assert '__version__ = "0.1.9"' in contents
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
min_version = 4.0
# min_version = 4.0 # removed until tox-conda is updated for use with tox>=4.0
envlist =
black
py{39,310,311}
Expand Down Expand Up @@ -30,10 +30,12 @@ allowlist_externals =
make

[testenv]
description = Run tests with pytest under {basepython}
setenv =
PYTEST_ADDOPTS = "--color=yes"
PYTEST_ADDOPTS = "--color=yes --verbose"
PYTHONPATH = {toxinidir}
passenv =
COVERALLS_*
GITHUB_*
extras =
dev
Expand Down
2 changes: 1 addition & 1 deletion xhydro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

__author__ = """Thomas-Charles Fortier Filion"""
__email__ = "tcff_hydro@outlook.com"
__version__ = "0.1.8"
__version__ = "0.1.9"

0 comments on commit ca88cb7

Please sign in to comment.