Skip to content

Commit d7ea640

Browse files
committed
chore(docs): update README and dependencies for improved setup
The README.md has been significantly expanded to include a more detailed setup guide, installation instructions, and common commands. Key tools such as 'uv', 'graphviz', 'juvix', and 'just' are emphasized for local development. Furthermore, the VERSION file is updated from v0.1.4 to v0.2.0, reflecting substantial changes. The setup configuration in justfile has been adjusted by removing unnecessary assertions for 'just' installation. Additionally, redundant dependencies related to 'just' have been removed from pyproject.toml, requirements.txt, and related lock files, simplifying the dependency management and cleanup of unnecessary packages. This change leads to a cleaner setup process and reduces potential conflicts.
1 parent b3a1f2b commit d7ea640

File tree

7 files changed

+123
-136
lines changed

7 files changed

+123
-136
lines changed

README.md

Lines changed: 117 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,136 @@
44

55
## Getting Started
66

7-
- **Contribute**: [Tutorial](https://specs.anoma.net/latest/tutorial/index.html)
8-
- **Markdown**: Uses [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/)
7+
Welcome to the Anoma Specs repository! This project uses [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/) for documentation and is designed for easy contribution and local development.
98

10-
### Setup
9+
- **Latest Specs**: [https://specs.anoma.net/latest/](https://specs.anoma.net/latest/)
1110

12-
1. **Prerequisites**:
11+
---
1312

14-
- `uv`: Install via:
13+
## Quick Start
1514

16-
```bash
17-
# macOS/Linux
18-
curl -LsSf https://astral.sh/uv/install.sh | sh
19-
# Windows
20-
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
21-
```
22-
- `graphviz` for local deployment,
15+
### 1. Prerequisites
2316

24-
- `juvix` for local deployment,
25-
26-
```bash
27-
curl --proto '=https' --tlsv1.2 -sSfL https://get.juvix.org | sh
28-
```
29-
- `just` for local development (although you can use `uv run` for most commands)
30-
31-
2. **Setup Commands**:
17+
Make sure you have the following tools installed:
3218

19+
- **uv** (Python package/dependency manager)
20+
- macOS/Linux:
3321
```bash
34-
just setup-repo
22+
curl -LsSf https://astral.sh/uv/install.sh | sh
3523
```
24+
- Windows:
25+
```powershell
26+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
27+
```
28+
- Or via Homebrew:
29+
```bash
30+
brew install uv
31+
```
32+
33+
- **graphviz** (for local documentation deployment)
34+
35+
- **juvix** (for typechecking and specs development)
36+
```bash
37+
curl --proto '=https' --tlsv1.2 -sSfL https://get.juvix.org | sh
38+
```
39+
40+
- **just** (a simple command runner, replacement for Make)
41+
- Install via your [package manager](https://github.com/casey/just?tab=readme-ov-file#cross-platform).
42+
43+
---
44+
45+
### 2. Installation
46+
47+
Choose one of the following:
48+
49+
- With **uv**:
50+
```bash
51+
uv sync
52+
```
53+
- With **just**:
54+
```bash
55+
just sync
56+
```
57+
- With **pip**:
58+
```bash
59+
pip install -r requirements.txt
60+
```
61+
62+
---
63+
64+
### 3. Common Commands
65+
66+
You can use either `just` or `uv run` for most tasks. Below are the most common commands:
67+
68+
#### Dependency Management
69+
70+
| Task | Command | Command (just) |
71+
|-----------------------------|------------------------------------------------|---------------------|
72+
| Synchronize dependencies | `uv sync` | `just sync` |
73+
| Run all pre-commit checks | `uv run pre-commit -- run --all-files` | `just check` |
74+
| Typecheck the code | `juvix typecheck docs/everything.juvix.md` | `just juvix-check` |
75+
76+
#### Development Tools
77+
78+
- **Install pre-commit hooks** (for specs writers only):
79+
```bash
80+
uv run pre-commit -- install --install-hooks
81+
```
82+
or
83+
```bash
84+
just install-hooks
85+
```
86+
87+
- **Install development tools**:
88+
```bash
89+
uv tool install pre-commit
90+
uv tool install commitizen
91+
```
92+
or
93+
```bash
94+
just install-tools
95+
```
96+
97+
#### Documentation
98+
99+
| Task | Command | Command (just) |
100+
|-----------------------------|------------------------------------------------|---------------------|
101+
| Build documentation | `uv run mkdocs build --config-file mkdocs.yml` | `just build` |
102+
| Serve documentation locally | `uv run mkdocs serve --config-file mkdocs.yml` | `just serve` |
103+
104+
#### Git Operations
105+
106+
| Task | Command | Command (just) |
107+
|-----------------------------|------------------------------------------------|---------------------|
108+
| Commit using commitizen | `uv run cz commit` | `just commit` |
109+
| Commit skipping hooks | `git commit --no-verify -m "<msg>"` | `just commit-skip` |
110+
| Amend commit (skip hooks) | `git commit --amend --no-verify` | `just commit-amend` |
111+
| Amend using commitizen | `uv run cz commit --amend` | `just cz-amend` |
112+
113+
If you have installed the pre-commit hooks (which is recommended), but need to
114+
make a commit or push changes without running the hooks (for example, when
115+
working on a branch or PR), you can use the `--no-verify` flag as shown in the
116+
table above. The Commitizen is a tool to help you write better commit messages.
117+
118+
---
119+
120+
### 4. Short Reference
121+
122+
- **Install**: `uv sync` or `pip install -r requirements.txt`
123+
- **Build**: `just build` or `uv run mkdocs build`
124+
- **Serve Locally**: `just serve` or `uv run mkdocs serve`
36125

37-
### Documentation
126+
---
38127

39-
- **Build**: `just build`
40-
- **Serve Locally**: `just serve`
128+
## Development with Nix
41129

42-
### Development with Nix
130+
If you use [Nix](https://nixos.org/download/):
43131

44132
1. **Install Nix**: [Download](https://nixos.org/download/)
45133
2. **Enable Flakes**: [Guide](https://nixos.wiki/wiki/flakes)
46-
3. **Enter Shell**: `nix develop`
134+
3. **Enter Development Shell**:
135+
```bash
136+
nix develop
137+
```
47138

48139
<!-- --8<-- [end:all]-- -->

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.1.4
1+
v0.2.0

justfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Set up the repository with all dependencies and hooks
44
setup-repo:
55
uv sync
6-
uv tool install just || true
76
just install-hooks
87
just install-tools
98

@@ -29,7 +28,7 @@ lock:
2928

3029
# Export dependencies
3130
export:
32-
uv export
31+
uv export --frozen --output-file=requirements.txt
3332

3433
# Run all pre-commit checks
3534
check:
@@ -64,9 +63,9 @@ commit-skip m:
6463
git commit --no-verify -m "{{m}}"
6564

6665
# Amend skipping pre-commit hooks
67-
amend:
66+
commit-amend:
6867
git commit --amend --no-verify
6968

7069
# Amend using commitizen
71-
amend-cz:
70+
cz-amend:
7271
uv run cz commit --amend

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ site_author: !ENV [SITE_AUTHOR, "Anoma Foundation"]
33
site_description: !ENV [SITE_DESCRIPTION, "The Anoma specs is a collection of documents that describe the architecture, design, and implementation of the Anoma Network."]
44
site_dir: !ENV [SITE_DIR, site]
55
site_url: !ENV [SITE_URL, 'https://specs.anoma.net/latest/']
6-
site_version: !ENV [SITE_VERSION, "v0.1.4"]
6+
site_version: !ENV [SITE_VERSION, "v0.2.0"]
77
copyright: !ENV [COPYRIGHT, "&copy; 2025 <a href=\"https://anoma.net\">Anoma Foundation</a>"]
88
repo_url: https://github.com/anoma/nspec
99
repo_name: anoma/nspec

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ description = "NSpec is a specification project for the Anoma network."
55
readme = "README.md"
66
requires-python = ">=3.13"
77
dependencies = [
8-
"just>=0.8.162",
98
"mdx-truly-sane-lists>=1.3",
109
"mkdocs>=1.6.1",
1110
"mkdocs-bibtex>=4.2.5",

requirements.txt

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ charset-normalizer==3.4.1 \
8383
# via
8484
# commitizen
8585
# requests
86-
ciso8601==2.3.2 \
87-
--hash=sha256:ec1616969aa46c51310b196022e5d3926f8d3fa52b80ec17f6b4133623bd5434
88-
# via just
8986
click==8.1.8 \
9087
--hash=sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2 \
9188
--hash=sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a
@@ -134,9 +131,6 @@ ghp-import==2.1.0 \
134131
--hash=sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619 \
135132
--hash=sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343
136133
# via mkdocs
137-
glob2==0.7 \
138-
--hash=sha256:85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c
139-
# via just
140134
graphviz==0.20.3 \
141135
--hash=sha256:09d6bc81e6a9fa392e7ba52135a9d49f1ed62526f96499325930e87ca1b5925d \
142136
--hash=sha256:81f848f2904515d8cd359cc611faba817598d2feaac4027b266aa3eda7b3dde5
@@ -168,10 +162,6 @@ jinja2==3.1.6 \
168162
# mkdocs
169163
# mkdocs-macros-plugin
170164
# mkdocs-material
171-
just==0.8.162 \
172-
--hash=sha256:9804e695b3a7d5284314fb19cc9c1216a52da01dd0aa802c264d95984ca84485 \
173-
--hash=sha256:e96951a90601f15e105a45348ecf472e2618ee38e16e1fa6f149017b2a32f773
174-
# via nspec
175165
latexcodec==3.0.0 \
176166
--hash=sha256:6f3477ad5e61a0a99bd31a6a370c34e88733a6bad9c921a3ffcfacada12f41a7 \
177167
--hash=sha256:917dc5fe242762cc19d963e6548b42d63a118028cdd3361d62397e3b638b6bc5
@@ -213,9 +203,7 @@ lxml==5.4.0 \
213203
--hash=sha256:d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd \
214204
--hash=sha256:d5663bc1b471c79f5c833cffbc9b87d7bf13f87e055a5c86c363ccd2348d7e82 \
215205
--hash=sha256:e794f698ae4c5084414efea0f5cc9f4ac562ec02d66e1484ff822ef97c2cadff
216-
# via
217-
# just
218-
# mkdocs-drawio
206+
# via mkdocs-drawio
219207
markdown==3.8 \
220208
--hash=sha256:794a929b79c5af141ef5ab0f2f642d0f7b1872981250230e72682346f7cc90dc \
221209
--hash=sha256:7df81e63f0df5c4b24b7d156eb81e4690595239b7d70937d0409f1b0de319c6f
@@ -346,23 +334,6 @@ numpy==2.2.5 \
346334
--hash=sha256:d8882a829fd779f0f43998e931c466802a77ca1ee0fe25a3abe50278616b1471 \
347335
--hash=sha256:e8b025c351b9f0e8b5436cf28a07fa4ac0204d67b38f01433ac7f9b870fa38c6
348336
# via ncls
349-
orjson==3.10.16 \
350-
--hash=sha256:148a97f7de811ba14bc6dbc4a433e0341ffd2cc285065199fb5f6a98013744bd \
351-
--hash=sha256:15a1431a245d856bd56e4d29ea0023eb4d2c8f71efe914beb3dee8ab3f0cd7fb \
352-
--hash=sha256:1d960c1bf0e734ea36d0adc880076de3846aaec45ffad29b78c7f1b7962516b8 \
353-
--hash=sha256:28f79944dd006ac540a6465ebd5f8f45dfdf0948ff998eac7a908275b4c1add6 \
354-
--hash=sha256:6fd5da4edf98a400946cd3a195680de56f1e7575109b9acb9493331047157430 \
355-
--hash=sha256:980ecc7a53e567169282a5e0ff078393bac78320d44238da4e246d71a4e0e8f5 \
356-
--hash=sha256:a318cd184d1269f68634464b12871386808dc8b7c27de8565234d25975a7a137 \
357-
--hash=sha256:b94dda8dd6d1378f1037d7f3f6b21db769ef911c4567cbaa962bb6dc5021cf90 \
358-
--hash=sha256:c83655cfc247f399a222567d146524674a7b217af7ef8289c0ff53cfe8db09f0 \
359-
--hash=sha256:ca5426e5aacc2e9507d341bc169d8af9c3cbe88f4cd4c1cf2f87e8564730eb56 \
360-
--hash=sha256:d2aaa5c495e11d17b9b93205f5fa196737ee3202f000aaebf028dc9a73750f10 \
361-
--hash=sha256:df23f8df3ef9223d1d6748bea63fca55aae7da30a875700809c500a05975522b \
362-
--hash=sha256:f12970a26666a8775346003fd94347d03ccb98ab8aa063036818381acf5f523e \
363-
--hash=sha256:fa59ae64cb6ddde8f09bdbf7baf933c4cd05734ad84dcf4e43b887eb24e37652 \
364-
--hash=sha256:fe0a145e96d51971407cb8ba947e63ead2aa915db59d6631a355f5f2150b56b7
365-
# via just
366337
outcome==1.3.0.post0 \
367338
--hash=sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8 \
368339
--hash=sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b
@@ -464,7 +435,6 @@ pyyaml==6.0.2 \
464435
--hash=sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba
465436
# via
466437
# commitizen
467-
# just
468438
# mkdocs
469439
# mkdocs-get-deps
470440
# mkdocs-macros-plugin
@@ -505,16 +475,10 @@ requests==2.32.3 \
505475
--hash=sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760 \
506476
--hash=sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6
507477
# via
508-
# just
509478
# mkdocs-bibtex
510479
# mkdocs-kroki-plugin
511480
# mkdocs-material
512-
# requests-viewer
513481
# responses
514-
requests-viewer==0.0.12 \
515-
--hash=sha256:1cee8d41963d43add1f44315cd173fe41a6de1b4e13ba5176379e887d713bc30 \
516-
--hash=sha256:d7ef4c13f03fcabbb118512b94007af7b8723089c19ab90542c8bfc0c3fb771f
517-
# via just
518482
responses==0.25.7 \
519483
--hash=sha256:8ebae11405d7a5df79ab6fd54277f6f2bc29b2d002d0dd2d5c632594d1ddcedb \
520484
--hash=sha256:92ca17416c90fe6b35921f52179bff29332076bb32694c0df02dcac2c6bc043c

0 commit comments

Comments
 (0)