Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/nix-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,35 @@ jobs:
uses: actions/checkout@v6
with:
submodules: recursive

- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Evaluate default.nix
run: nix-instantiate default.nix

- name: Test Nix shellHook runs automatically
run: |
nix-shell --run "
echo 'ShellHook completed successfully' &&
uv --version &&
test -d .venv && echo 'Virtual environment exists' || (echo 'Virtual environment not found' && exit 1)
"

- name: Start pokeapi in Nix environment
run: |
nix-shell --run "
make install-base &&
make setup &&
make build-db
"

- name: Test pokeapi serves correctly
run: |
nix-shell --run "
nohup make serve &
sleep 3 &&
curl -Ss http://localhost:8000/api/v2/pokemon/1/ | grep -q 'bulbasaur'
"
"
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ A RESTful API for Pokémon - [pokeapi.co](https://pokeapi.co)
# This will install all the required packages and libraries for using PokeAPI
```

- Install the pre-commit hooks using the Makefile commands:
- Install the pre-commit hooks using the Makefile commands (optional but recommended):

```sh
make pre-commit-install
```

> [!NOTE]
> Pre-commit hooks are optional but recommended for maintaining code quality and consistency. If you do not want it to automatically run on every commit, you can run it manually with `make pre-commit` before commiting and pushing your changes.

- Set up the local development environment using the following command:

```sh
Expand Down
2 changes: 1 addition & 1 deletion data/v2/csv/berries.csv
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ id,item_id,firmness_id,natural_gift_power,natural_gift_type_id,size,max_harvest,
65,724,,100,18,,8,72,,
66,725,,100,17,,8,72,,
67,2278,,17,,,,,,
68,2279,,,,,,,,
68,2279,,,,,,,,
2 changes: 1 addition & 1 deletion data/v2/csv/item_game_indices.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7294,4 +7294,4 @@ item_id,generation_id,game_index
2230,8,1691
2230,9,1691
2231,8,1692
2231,9,1692
2231,9,1692
2 changes: 1 addition & 1 deletion data/v2/csv/locations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1102,4 +1102,4 @@ id,region_id,identifier
1118,8,roaming-isle-of-armor
1119,8,roaming-crown-tundra
1120,8,galar-wild-area-max-dens
1121,6,kalos-berry-fields
1121,6,kalos-berry-fields
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ mkShell {
unset SOURCE_DATE_EPOCH
uv sync --locked --all-extras --dev
'';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("pokemon_v2", "0029_pokemonformtrigger_pokemonformcondition"),
]
Expand Down
Loading