Skip to content

Commit fc67bf8

Browse files
lwjohnst86signekbpre-commit-ci[bot]
authored
docs: 📝 simplify install guide, only project-level install (#197)
# Description Removes section about installing globally. Also simplifies to describe using uv. Needs a quick review. ## Checklist - [x] Formatted Markdown - [x] Ran `just run-all` --------- Co-authored-by: Signe Kirk Brødbæk <signebroedbaek@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent ecb0994 commit fc67bf8

File tree

1 file changed

+12
-58
lines changed

1 file changed

+12
-58
lines changed

docs/guide/installation.qmd

Lines changed: 12 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,38 @@
11
---
2-
title: "Installing `check-datapackage`"
2+
title: "Installing"
3+
description: "A succinct instruction on installing `check-datapackage` in a Python project."
34
order: 0
45
---
56

67
Before installing `check-datapackage`, you need to have
78
[Python](https://www.python.org/downloads/) and
8-
[pipx](https://pipx.pypa.io/latest/installation/) installed.
9+
[uv](https://docs.astral.sh/uv/) installed.
910

1011
To check that these programs are installed, run the following commands
1112
in your Terminal:
1213

1314
``` {.bash filename="Terminal"}
1415
python3 --version
15-
pipx --version
16+
uv --version
1617
```
1718

18-
If Python and pipx are installed, these commands will show you the
19+
If Python and uv are installed, these commands will show you the
1920
versions installed on your system. If you get an error, you need to
2021
install them before continuing.
2122

22-
## Install in a project (recommended)
23+
## Install `check-datapackage` in a Python project
2324

2425
It's generally recommended to install Python packages in a project's
2526
virtual environment to keep the project's dependencies isolated from the
26-
system-wide Python setup and avoid conflicts. There are several tools to
27-
manage package dependencies and create virtual environments, such as
28-
venv, virtualenv, and uv. For this guide, we will use
27+
system-wide Python setup and avoid conflicts. We use (and recommend)
2928
[uv](https://docs.astral.sh/uv/).
3029

31-
If you don't have uv installed, you can install it in your Terminal with
32-
pipx:
30+
We assume you've already created a Python project that has a
31+
`pyproject.toml` file. If not, review uv's guide on making
32+
[projects](https://docs.astral.sh/uv/guides/projects/).
3333

34-
``` {.bash filename="Terminal"}
35-
pipx install uv
36-
```
37-
38-
To check that uv is installed, run this command:
39-
40-
``` {.bash filename="Terminal"}
41-
uv
42-
```
43-
44-
If you get a list of uv commands, you've installed it successfully.
45-
46-
Then, create a Python project using uv by running the following command
47-
in your Terminal (replace `<project-name>` with your desired project
48-
name, e.g., `diabetes-study`):
49-
50-
``` {.bash filename="Terminal"}
51-
uv init <project-name>
52-
```
53-
54-
This will create a new directory with the project name you provided with
55-
the basic structure of a Python project, including a `pyproject.toml`
56-
file.
57-
58-
With uv installed, you can now install `check-datapackage` directly from
59-
the [GitHub
60-
repository](https://github.com/seedcase-project/check-datapackage) with
61-
this command:
34+
While in the Terminal and in the project's directory, add
35+
`check-datapackage` to your project's virtual environment by running:
6236

6337
``` {.bash filename="Terminal"}
6438
uv add "check-datapackage @ git+https://github.com/seedcase-project/check-datapackage"
@@ -75,23 +49,3 @@ uv pip show check-datapackage
7549

7650
If `check-datapackage` has been installed successfully, the output will
7751
show details about `check-datapackage`.
78-
79-
## Install system-wide
80-
81-
We strongly recommend using `check-datapackage` in a virtual environment
82-
(as described in the section above), but you can also install it
83-
system-wide. The easiest way to do that is to use pipx:
84-
85-
``` {.bash filename="Terminal"}
86-
pipx install check-datapackage
87-
```
88-
89-
To check that `check-datapackage` has been installed correctly, run the
90-
following and make sure `check-datapackage` is listed:
91-
92-
``` {.bash filename="Terminal"}
93-
pipx list
94-
```
95-
96-
Now you can use `check-datapackage` in any Python script on your
97-
computer.

0 commit comments

Comments
 (0)