Skip to content

Commit c7f3da8

Browse files
authored
Release v0.4.5. (#545)
1 parent 04b8f69 commit c7f3da8

File tree

8 files changed

+51
-61
lines changed

8 files changed

+51
-61
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ features include:
3535
to run the same task with different inputs.
3636
- **Select tasks via expressions.** Run only a subset of tasks with
3737
[expressions and marker expressions](https://pytask-dev.readthedocs.io/en/stable/tutorials/selecting_tasks.html).
38-
- **Easily extensible with plugins**. pytask is built on top of
39-
[pluggy](https://pluggy.readthedocs.io/en/latest/), a plugin management framework,
40-
which allows you to adjust pytask to your needs. Plugins are available for
38+
- **Easily extensible with plugins**. pytask is built on
39+
[pluggy](https://pluggy.readthedocs.io/en/latest/), a plugin management framework that
40+
allows you to adjust pytask to your needs. Plugins are available for
4141
[parallelization](https://github.com/pytask-dev/pytask-parallel),
4242
[LaTeX](https://github.com/pytask-dev/pytask-latex),
4343
[R](https://github.com/pytask-dev/pytask-r), and

docs/source/changes.md

+5-8
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,16 @@ chronological order. Releases follow [semantic versioning](https://semver.org/)
55
releases are available on [PyPI](https://pypi.org/project/pytask) and
66
[Anaconda.org](https://anaconda.org/conda-forge/pytask).
77

8-
## 0.5.0 - 2024-xx-xx
9-
10-
- {pull}`544` requires sqlalchemy `>=2` and upgrades the syntax.
11-
12-
## 0.4.5 - 2024-01-xx
8+
## 0.4.5 - 2024-01-09
139

1410
- {pull}`515` enables tests with graphviz in CI. Thanks to {user}`NickCrews`.
1511
- {pull}`517` raises an error when the configuration file contains a non-existing path
16-
(fixes #514). It also warns if the path is configured as a string and not a list of
12+
(fixes #514). It also warns if the path is configured as a string, not a list of
1713
strings.
1814
- {pull}`519` raises an error when builtin functions are wrapped with
19-
{func}`~pytask.task`. Closes {issue}`512`.pull
15+
{func}`~pytask.task`. Closes {issue}`512`.
2016
- {pull}`521` raises an error message when imported functions are wrapped with
2117
{func}`@task <pytask.task>` in a task module. Fixes {issue}`513`.
22-
{func}`~pytask.task`. Closes {issue}`512`.
2318
- {pull}`522` improves the issue templates.
2419
- {pull}`523` refactors `_pytask.console._get_file`.
2520
- {pull}`524` improves some linting and formatting rules.
@@ -35,6 +30,8 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and
3530
the signatures suggested.
3631
- {pull}`542` refactors the plugin manager.
3732
- {pull}`543` fixes imports in tests and related issues.
33+
- {pull}`544` requires sqlalchemy `>=2` and upgrades the syntax.
34+
- {pull}`545` finalizes the release.
3835

3936
## 0.4.4 - 2023-12-04
4037

docs/source/developers_guide.md

+11-23
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Run pytest to execute the test suite.
66

77
The test suite creates many temporary directories. There is usually a limit on the
8-
number of open file descriptors on Unix systems which causes some tests and the end of
8+
number of open file descriptors on Unix systems, which causes some tests and the end of
99
the test suite to fail. If that happens, increase the limit with the following command.
1010

1111
```console
@@ -19,35 +19,23 @@ The following list covers all steps of a release cycle.
1919
- Start a new release cycle by opening a milestone. Assign all relevant issues and merge
2020
requests to this milestone.
2121

22-
- Every change is pushed to the `main` branch of the repository and will make it into
23-
the next release.
22+
- Every change is pushed to the repository's main branch and will make it into the next
23+
release.
2424

25-
- Once all additions to a release are merged, prepare `changes.rst` in the source folder
26-
of the documentation listing all changes which made it into the release.
25+
- Once all additions to a release are merged, prepare `docs/source/changes.md` listing
26+
all changes that made it into the release.
2727

2828
- Update the version numbers in the animations if you create a new major or minor
2929
release.
3030

31-
- Go to the [release tab](https://github.com/pytask-dev/pytask/releases). Create a new
32-
release by clicking on "Draft a new release" and add a tag named `vx.x.x` on `main`
33-
and make it also the release title. Click on "Publish release".
34-
35-
Creating a tag will trigger a pipeline which builds the package and uploads it to PyPI
36-
which consequently triggers a new release on conda-forge.
37-
38-
## Creating showcases on the command line
39-
40-
- Replace prompt in powershell core with a simple arrow by typing
41-
42-
```console
43-
$ function prompt {"> "}
44-
```
31+
- Go to the main branch and set a new tag with `git tag vx.x.x -m "vx.x.x"`. Then, push
32+
the tag to the repository.
4533

46-
- Rename the tab with
34+
- Creating a tag will trigger a pipeline that builds the package and uploads it to PyPI,
35+
consequently triggering a new release on conda-forge.
4736

48-
```console
49-
$ $Host.UI.RawUI.WindowTitle = $title
50-
```
37+
The pipeline also creates a GitHub release under
38+
[releases](https://github.com/pytask-dev/pytask/releases). Fill out the release notes.
5139

5240
## Profiling the application
5341

docs/source/how_to_guides/remote_files.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ easy to interact with files from an HTTP(S)-, Dropbox-, S3-, GCP-, Azure-based
1313
filesystem, and many more.
1414

1515
```{warning}
16-
universal_pathlib does currently not support Python 3.12. To track progress, see [this
17-
PR](https://github.com/fsspec/universal_pathlib/pull/152) and check the [releases
18-
`>0.1.4`](https://github.com/fsspec/universal_pathlib/releases)
16+
universal_pathlib does currently not support Python 3.12. To track progress, check the
17+
[releases `>0.1.4`](https://github.com/fsspec/universal_pathlib/releases).
1918
```
2019

2120
## HTTP(S)-based filesystem
@@ -86,6 +85,5 @@ Many files on the web do not provide an ETag like this version of the iris datas
8685
{'Server': 'nginx/1.25.3', 'Date': 'Sun, 10 Dec 2023 23:59:21 GMT', 'Connection': 'keep-alive'}
8786
```
8887

89-
In these instances, pytask does not recognize if the file has changed and only reruns
90-
the task if other conditions are not met, like the product is missing, the task module
91-
has changed, etc..
88+
In these instances, pytask does not recognize if the file has changed. If you want to
89+
force rerunning the task, delete a product of the task.

docs/source/tutorials/configuration.md

+11-12
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pytask can be configured via the command-line interface or permanently with a
44
`pyproject.toml` file.
55

6-
The file also indicates the root of your project where pytask stores information in a
6+
The file also indicates the root of your project, where pytask stores information in a
77
`.pytask` folder.
88

99
## The configuration file
@@ -28,23 +28,22 @@ paths = "src"
2828

2929
There are two ways to point pytask to the configuration file.
3030

31-
First, it is possible to pass the location of the configuration file via
31+
The first option is to let pytask try to find the configuration itself.
32+
33+
1. Find the common directory of all paths passed to pytask (default to the current
34+
working directory).
35+
1. Look at all parent directories from this directory and return the file if it exists.
36+
1. Stop searching if a directory contains a `.git` directory/file or a valid
37+
configuration file with the correct section.
38+
39+
Secondly, it is possible to pass the location of the configuration file via
3240
{option}`pytask build -c` like
3341

3442
```console
3543
$ pytask -c config/pyproject.toml
3644
```
3745

38-
The second option is to let pytask try to find the configuration itself.
39-
40-
1. Find the common base directory of all paths passed to pytask (default to the current
41-
working directory).
42-
1. Starting from this directory, look at all parent directories, and return the file if
43-
it exists.
44-
1. Stop searching if a directory contains a `.git` directory/file or a valid
45-
configuration file with the right section.
46-
4746
## The options
4847

49-
You can find all possible configuration values in the
48+
All possible configuration values are found in the
5049
{doc}`reference guide on the configuration <../reference_guides/configuration>`.

docs/source/tutorials/defining_dependencies_products.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,24 @@
33
Tasks have dependencies and products that you must define to run your tasks.
44

55
Defining dependencies and products also serves another purpose. By analyzing them,
6-
pytask determines the order in which to run the tasks.
6+
pytask determines the order to run the tasks.
77

88
This tutorial offers you different interfaces. If you are comfortable with type
9-
annotations or not afraid to try them, look at the `Python 3.10+` or `Python 3.8+` tabs.
9+
annotations or are not afraid to try them, look at the `Python 3.10+` or `3.8+` tabs.
1010
You find a tutorial on type hints {doc}`here <../type_hints>`.
1111

1212
If you want to avoid type annotations for now, look at the tab named `produces`.
1313

14+
```{warning}
1415
The `Decorators` tab documents the deprecated approach that should not be used anymore
1516
and will be removed in version v0.5.
17+
```
1618

19+
```{seealso}
1720
In this tutorial, we only deal with local files. If you want to use pytask with files
1821
online, S3, GCP, Azure, etc., read the
1922
{doc}`guide on remote files <../how_to_guides/remote_files>`.
23+
```
2024

2125
First, we focus on defining products that should already be familiar to you. Then, we
2226
focus on how you can declare task dependencies.

docs/source/tutorials/plugins.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ maintainers to cater to all possible use cases.
66
Therefore, pytask uses [pluggy](https://github.com/pytest-dev/pluggy), a plugin
77
framework, to allow users to extend pytask.
88

9+
## How to extend pytask
10+
11+
A quick method to extend pytask is explained in the
12+
{doc}`guide on extending pytask <../how_to_guides/extending_pytask>`. You will learn how
13+
to add your own hook implementations or write your plugin.
14+
915
## Where can I find plugins?
1016

1117
You can find plugins in many places.
@@ -18,8 +24,3 @@ You can find plugins in many places.
1824
overview of repositories linked to pytask.
1925
- Search on [anaconda.org](https://anaconda.org/search?q=pytask) or
2026
[prefix.dev](https://prefix.dev) for related packages.
21-
22-
## How to extend pytask
23-
24-
Follow the {doc}`guide on extending pytask <../how_to_guides/extending_pytask>` to add
25-
your own hook implementations or write your plugin.
+5-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Content of task_module.py
21
from pathlib import Path
2+
from typing import Annotated
3+
4+
from pytask import Product
35

46

57
def task_write_file(
6-
input_path: Path = Path("in.txt"), output_path: Path = Path("out.txt")
8+
input_path: Path = Path("in.txt"),
9+
output_path: Annotated[Path, Product] = Path("out.txt"),
710
) -> None:
811
output_path.write_text(input_path.read_text())

0 commit comments

Comments
 (0)