You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To keep your fork up to date with changes in this repo,
29
29
you can [use the fetch upstream button on GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork).
30
30
31
-
Now you can install the latest version of Altair locally using `pip`.
32
-
The `-e` flag indicates that your local changes will be reflected
33
-
every time you open a new Python interpreter
34
-
(instead of having to reinstall the package each time).
31
+
32
+
[Install `uv`](https://docs.astral.sh/uv/getting-started/installation/), or update to the latest version:
33
+
34
+
```cmd
35
+
uv self update
36
+
```
37
+
Install Python:
38
+
39
+
```cmd
40
+
uv python install 3.12
41
+
```
42
+
43
+
Initialize a new virtual environment:
35
44
36
45
```cmd
37
-
cd altair/
38
-
python -m pip install -e ".[all, dev]"
46
+
cd altair/
47
+
uv venv -p 3.12
39
48
```
40
49
41
-
'[all, dev]' indicates that pip should also install the optional and development requirements
42
-
which you can find in `pyproject.toml` (`[project.optional-dependencies]/all` and `[project.optional-dependencies]/dev`)
50
+
Activate your environment:
51
+
52
+
<details><summary>macOS/Linux</summary>
53
+
<p>
54
+
55
+
```bash
56
+
source .venv/bin/activate
57
+
```
58
+
59
+
</p>
60
+
</details>
61
+
62
+
<details><summary>Windows</summary>
63
+
<p>
64
+
65
+
```cmd
66
+
.venv\Scripts\activate
67
+
```
68
+
69
+
</p>
70
+
</details>
71
+
72
+
Install the project with all development dependencies:
73
+
```cmd
74
+
uv sync --all-extras
75
+
```
76
+
77
+
> [!TIP]
78
+
> If you're new to `uv`, check out their [Getting started](https://docs.astral.sh/uv/getting-started/) guide for help
43
79
44
80
### Creating a Branch
45
81
@@ -59,7 +95,7 @@ make sure to run the following to see if there are any changes
59
95
to the automatically generated files:
60
96
61
97
```bash
62
-
hatch run generate-schema-wrapper
98
+
uv run task generate-schema-wrapper
63
99
```
64
100
65
101
For information on how to update the Vega-Lite version that Altair uses,
@@ -72,7 +108,7 @@ it is recommended that you run the Altair test suite,
72
108
which includes a number of tests to validate the correctness of your code:
73
109
74
110
```bash
75
-
hatchtest
111
+
uv run tasktest
76
112
```
77
113
78
114
@@ -83,14 +119,15 @@ Study the output of any failed tests and try to fix the issues
83
119
before proceeding to the next section.
84
120
85
121
#### Failures on specific python version(s)
86
-
By default, `hatch test` will run the test suite against the currently active python version.
122
+
123
+
By default, `uv run task test` will run the test suite against the currently active python version.
87
124
Two useful variants for debugging failures that only appear *after* you've submitted your PR:
88
125
89
126
```bash
90
127
# Test against all python version(s) in the matrix
91
-
hatch test --all
92
-
# Test against a specific python version
93
-
hatch test --python 3.8
128
+
uv run task test-all
129
+
# Test against our minimum required version
130
+
uv run task test-min
94
131
```
95
132
96
133
See [hatch test](https://hatch.pypa.io/latest/cli/reference/#hatch-test) docs for other options.
@@ -99,7 +136,7 @@ See [hatch test](https://hatch.pypa.io/latest/cli/reference/#hatch-test) docs fo
99
136
If `test_completeness_of__all__` fails, you may need to run:
100
137
101
138
```bash
102
-
hatch run update-init-file
139
+
uv run task update-init-file
103
140
```
104
141
However, this test usually indicates *unintentional* addition(s) to the top-level `alt.` namespace that will need resolving first.
105
142
@@ -204,27 +241,20 @@ Some additional notes:
204
241
205
242
The process to build the documentation locally consists of three steps:
206
243
207
-
1. Clean any previously generated files to ensure a clean build.
208
-
2. Generate the documentation in HTML format.
209
-
3. View the generated documentation using a local Python testing server.
210
-
211
-
The specific commands for each step depend on your operating system.
212
-
Make sure you execute the following commands from the root dir of altair and have [`hatch`](https://hatch.pypa.io/) installed in your local environment.
244
+
1.**Clean** (remove) any previously generated documentation files.
245
+
2.**Build** the documentation in HTML format.
246
+
3. View the documentation using a *local* Python testing **server**.
213
247
214
-
- For MacOS and Linux, run the following commands in your terminal:
215
-
```bash
216
-
hatch run doc:clean-all
217
-
hatch run doc:build-html
218
-
hatch run doc:serve
219
-
```
220
-
221
-
- For Windows, use these commands instead:
248
+
Steps 1 & 2 can be run as a single command, followed by step 3:
222
249
```cmd
223
-
hatch run doc:clean-all-win
224
-
hatch run doc:build-html-win
225
-
hatch run doc:serve
250
+
uv run task doc-clean-build
251
+
uv run task doc-serve
226
252
```
227
253
254
+
> [!TIP]
255
+
> If these commands were not available for you, make sure you've [set up your environment](#setting-up-your-environment)
256
+
257
+
228
258
To view the documentation, open your browser and go to `http://localhost:8000`. To stop the server, use `^C` (control+c) in the terminal.
You can find the instructions on how to install the package for development in [the documentation](https://altair-viz.github.io/getting_started/installation.html).
117
-
118
-
To run the tests and linters, use
119
-
120
-
```bash
121
-
hatch test
122
-
```
123
-
124
115
For information on how to contribute your developments back to the Vega-Altair repository, see
Copy file name to clipboardExpand all lines: RELEASING.md
+12-17Lines changed: 12 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,18 @@
1
1
1. Check all [Vega project](https://github.com/orgs/vega/repositories?type=source) versions are up-to-date. See [NOTES_FOR_MAINTAINERS.md](NOTES_FOR_MAINTAINERS.md)
2
2
3
-
2. Make sure to have an environment set up with `hatch` installed. See [CONTRIBUTING.md](CONTRIBUTING.md).
4
-
Remove any existing environments managed by `hatch` so that it will create new ones
5
-
with the latest dependencies when executing the commands further below:
3
+
4
+
2. Make sure to have [set up your environment](CONTRIBUTING.md#setting-up-your-environment).
5
+
Update your environment with the latest dependencies:
6
6
7
-
hatch env prune
7
+
uv sync --all-extras
8
8
9
9
3. Make certain your branch is in sync with head, and that you have no uncommitted modifications. If you work on a fork, replace `origin` with `upstream`:
10
10
11
11
git checkout main
12
12
git pull origin main
13
13
git status # Should show "nothing to commit, working tree clean"
14
14
15
-
4. Do a clean doc build:
16
-
17
-
hatch run doc:clean-all
18
-
hatch run doc:build-html
19
-
hatch run doc:serve
15
+
4. Do a [clean doc build](CONTRIBUTING.md#building-the-documentation-locally):
20
16
21
17
Navigate to http://localhost:8000 and ensure it looks OK (particularly
22
18
do a visual scan of the gallery thumbnails).
@@ -38,20 +34,19 @@
38
34
39
35
8. Merge release branch into main, make sure that all required checks pass
40
36
41
-
9.On main, build source & wheel distributions. If you work on a fork, replace `origin` with `upstream`:
37
+
9.Switch to main, If you work on a fork, replace `origin` with `upstream`:
42
38
43
39
git switch main
44
40
git pull origin main
45
-
hatch clean # clean old builds & distributions
46
-
hatch build # create a source distribution and universal wheel
47
-
48
-
10. publish to PyPI (Requires correct PyPI owner permissions):
41
+
42
+
10. Build a source distribution and universal wheel,
43
+
publish to PyPI (Requires correct PyPI owner permissions and [UV_PUBLISH_TOKEN](https://docs.astral.sh/uv/configuration/environment/#uv_publish_token)):
49
44
50
-
hatch publish
45
+
uv run task publish
51
46
52
-
11.build and publish docs (Requires write-access to altair-viz/altair-viz.github.io):
47
+
11.Build and publish docs (Requires write-access to [altair-viz/altair-viz.github.io](https://github.com/altair-viz/altair-viz.github.io)):
53
48
54
-
hatch run doc:publish-clean-build
49
+
uv run task doc-publish-clean-build
55
50
56
51
12. On main, tag the release. If you work on a fork, replace `origin` with `upstream`:
0 commit comments