Skip to content

Commit

Permalink
Merge pull request #57 from Amulet-Team/impl-cpp2
Browse files Browse the repository at this point in the history
C++ data
  • Loading branch information
gentlegiantJGC authored Feb 20, 2024
2 parents 68eb5ef + ec2085b commit 7ffed3c
Show file tree
Hide file tree
Showing 215 changed files with 14,166 additions and 6,875 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.11', '3.12']
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-stylecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.11', '3.12']
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
Expand Down
15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,17 @@ venv*
.mypy_cache/

# Cython Files
src/amulet_nbt/*.c
src/amulet_nbt/*.cpp
*.html

temp
temp

# visual studio files
*.vs/
*.vcxproj*
*.sln

# C++ files
*.c
!**/_cpp/**/*.c
*.cpp
!**/_cpp/**/*.cpp
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: 3.9
python: 3.12

python:
install:
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
recursive-include src *.py *.pyi *.pyx *.pxd
recursive-include src *.pyi py.typed *.py *.pyx *.pxd *.cpp *.hpp
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
![Unittests](../../workflows/Unittests/badge.svg?event=push)
![Stylecheck](../../workflows/Stylecheck/badge.svg?event=push)

Amulet-NBT is a Python 3 library, written in Cython, for reading and writing both binary NBT and SNBT.
Amulet-NBT is a Python 3 library, written in Cython and C++, for reading and writing both binary NBT and SNBT.

SNBT (or Stringified-NBT) is the JSON like format used in Java commands.

## Installing

Run this command to install from PyPi.

`pip install amulet-nbt~=2.0`
`pip install amulet-nbt~=3.0`

## Documentation

Expand All @@ -25,7 +25,7 @@ To develop the library you will need to download the source and run this command
`pip install -e .[dev]`

This will build the library in-place and expose it to python.
Since this code is compiled you will need to run it again each time you change cython code.
Since this code is compiled you will need to run it again each time you change cython or C++ code.

## Links
- Documentation - https://amulet-nbt.readthedocs.io
Expand Down
9 changes: 0 additions & 9 deletions docs_source/api_reference/ByteArrayTag.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/ByteTag.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/CompoundTag.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/DoubleTag.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/FloatTag.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/IntArrayTag.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/IntTag.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/ListTag.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/LongArrayTag.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/LongTag.rst

This file was deleted.

8 changes: 0 additions & 8 deletions docs_source/api_reference/NamedTag.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/ShortTag.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/StringTag.rst

This file was deleted.

45 changes: 0 additions & 45 deletions docs_source/api_reference/abc.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs_source/api_reference/errors.rst

This file was deleted.

25 changes: 0 additions & 25 deletions docs_source/api_reference/index.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs_source/api_reference/load.rst

This file was deleted.

26 changes: 0 additions & 26 deletions docs_source/api_reference/string_encoding.rst

This file was deleted.

9 changes: 9 additions & 0 deletions docs_source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@
def skip(app, what, name, obj, would_skip, options):
if name == "__init__":
return False
if name in {
"__pyx_vtable__",
"__reduce_cython__",
"__setstate_cython__",
"__new__",
"__reduce__",
"__setstate__",
}:
return True
return would_skip


Expand Down
Loading

0 comments on commit 7ffed3c

Please sign in to comment.