Skip to content

Commit

Permalink
Merge branch 'main' into allow_negative_freq
Browse files Browse the repository at this point in the history
  • Loading branch information
mathause authored Jan 25, 2024
2 parents cbd2fb0 + db9e448 commit f27e3ba
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fi
- name: Upload wheel
uses: scientific-python/upload-nightly-action@main
uses: scientific-python/upload-nightly-action@6e9304f7a3a5501c6f98351537493ec898728299 # 0.3.0
with:
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_NIGHTLY }}
artifacts_path: dist
2 changes: 1 addition & 1 deletion HOW_TO_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ upstream https://github.com/pydata/xarray (push)
```sh
pytest
```
8. Check that the ReadTheDocs build is passing on the `main` branch.
8. Check that the [ReadTheDocs build](https://readthedocs.org/projects/xray/) is passing on the `latest` build version (which is built from the `main` branch).
9. Issue the release on GitHub. Click on "Draft a new release" at
<https://github.com/pydata/xarray/releases>. Type in the version number (with a "v")
and paste the release summary in the notes.
Expand Down
1 change: 0 additions & 1 deletion doc/api-hidden.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
core.accessor_dt.DatetimeAccessor.time
core.accessor_dt.DatetimeAccessor.week
core.accessor_dt.DatetimeAccessor.weekday
core.accessor_dt.DatetimeAccessor.weekday_name
core.accessor_dt.DatetimeAccessor.weekofyear
core.accessor_dt.DatetimeAccessor.year

Expand Down
1 change: 0 additions & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ Datetimelike properties
DataArray.dt.nanosecond
DataArray.dt.dayofweek
DataArray.dt.weekday
DataArray.dt.weekday_name
DataArray.dt.dayofyear
DataArray.dt.quarter
DataArray.dt.days_in_month
Expand Down
5 changes: 5 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Breaking changes

Deprecations
~~~~~~~~~~~~
- The `dt.weekday_name` parameter wasn't functional on modern pandas versions and has been removed. (:issue:`8610`, :pull:`8664`)
By `Sam Coleman <https://github.com/nameloCmaS>`_.


Bug fixes
Expand Down Expand Up @@ -77,6 +79,9 @@ Documentation

- Pin ``sphinx-book-theme`` to ``1.0.1`` to fix a rendering issue with the sidebar in the docs. (:issue:`8619`, :pull:`8632`)
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Fixed documentation where the use of the depreciated pandas frequency string
prevented the documentation from being built. (:pull:`8638`)
By `Sam Coleman <https://github.com/nameloCmaS>`_.

.. _whats-new.2024.01.0:

Expand Down
30 changes: 20 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ dependencies = [
"pandas>=1.5",
]

[project.optional-dependencies]
accel = ["scipy", "bottleneck", "numbagg", "flox", "opt_einsum"]
complete = ["xarray[accel,io,parallel,viz,dev]"]
dev = [
"hypothesis",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-env",
"pytest-xdist",
"pytest-timeout",
"ruff",
"xarray[complete]",
]
io = ["netCDF4", "h5netcdf", "scipy", 'pydap; python_version<"3.10"', "zarr", "fsspec", "cftime", "pooch"]
parallel = ["dask[complete]"]
viz = ["matplotlib", "seaborn", "nc-time-axis"]

[project.urls]
Documentation = "https://docs.xarray.dev"
SciPy2015-talk = "https://www.youtube.com/watch?v=X0pAhJgySxk"
Expand All @@ -38,13 +56,6 @@ source-code = "https://github.com/pydata/xarray"
[project.entry-points."xarray.chunkmanagers"]
dask = "xarray.core.daskmanager:DaskManager"

[project.optional-dependencies]
accel = ["scipy", "bottleneck", "numbagg", "flox", "opt_einsum"]
complete = ["xarray[accel,io,parallel,viz]"]
io = ["netCDF4", "h5netcdf", "scipy", 'pydap; python_version<"3.10"', "zarr", "fsspec", "cftime", "pooch"]
parallel = ["dask[complete]"]
viz = ["matplotlib", "seaborn", "nc-time-axis"]

[build-system]
build-backend = "setuptools.build_meta"
requires = [
Expand Down Expand Up @@ -227,8 +238,7 @@ reportMissingTypeStubs = false

[tool.ruff]
builtins = ["ellipsis"]
exclude = [
".eggs",
extend-exclude = [
"doc",
"_typed_ops.pyi",
]
Expand Down Expand Up @@ -274,5 +284,5 @@ test = "pytest"

[tool.repo-review]
ignore = [
"PP308" # This option creates a large amount of log lines.
"PP308", # This option creates a large amount of log lines.
]
8 changes: 2 additions & 6 deletions xarray/core/accessor_dt.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def _access_through_cftimeindex(values, name):
field_values = _season_from_months(months)
elif name == "date":
raise AttributeError(
"'CFTimeIndex' object has no attribute `date`. Consider using the floor method instead, for instance: `.time.dt.floor('D')`."
"'CFTimeIndex' object has no attribute `date`. Consider using the floor method "
"instead, for instance: `.time.dt.floor('D')`."
)
else:
field_values = getattr(values_as_cftimeindex, name)
Expand Down Expand Up @@ -456,11 +457,6 @@ def dayofweek(self) -> T_DataArray:

weekday = dayofweek

@property
def weekday_name(self) -> T_DataArray:
"""The name of day in a week"""
return self._date_field("weekday_name", object)

@property
def dayofyear(self) -> T_DataArray:
"""The ordinal day of the year"""
Expand Down

0 comments on commit f27e3ba

Please sign in to comment.