diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f01184c68ec7b038372033a3e8ed5c18398096e5..476570cb20c90936369687c5bad3ebb52c9aed6a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ compile: paths: - docs - build - - generate_pydocs.py + - scripts/generate_pydocs.py expire_in: 10 minutes only: - master @@ -51,7 +51,7 @@ pack-linux: - cd build/python-api-src - stubgen -m commandcenter -o . - cd ../.. - - python3 generate_pydocs.py + - python3 scripts/generate_pydocs.py artifacts: paths: - build/python-api-src/commandcenter.cpython-312-x86_64-linux-gnu.so diff --git a/ExtendAPI.md b/CONTRIBUTING.md similarity index 97% rename from ExtendAPI.md rename to CONTRIBUTING.md index 005e30f838b029c9b077a691b68c17f562cb55a9..06dc73d970ea197569e632ade3d44e05ea39c8ad 100644 --- a/ExtendAPI.md +++ b/CONTRIBUTING.md @@ -23,6 +23,6 @@ We can access m_unit in the unit file and with sc2::Function() we can access any Common problems: 1. The return in python is a memory address: - Make sure that it returns a correct type. + Make sure that it returns a correct type. 2. The compiler complains about files I have not even touched: Make sure that the startUp is library and you have release x64. If you just added a new function in pybind, check it. diff --git a/LICENSE b/LICENSE index f56c64d4898209f29cb92e2fad90cdf6865e278b..8af56610cae852cb4c4e94b6e8709c7243e3478d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License - -Copyright (c) 2018 David Bergström +Copyright (c) 2024 Daniel de Leng +Copyright (c) 2018 Jonas Kvarnström, David Bergström Copyright (c) 2017 David Churchill Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/README.md b/README.md index ac93db47711cdd965aabe7605329f8ac5e73a155..deb3128042f24822f6f9e46700480db89a805a2a 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,18 @@ After creating the .pyi file run the generate_pydocs.py file according to the in # How to use the library with PyCharm -See [separate page](pycharm.md). +Start by downloading the library. Click the latest tag in the [PyCommandCenter repository](https://gitlab.liu.se/starcraft-ai-course/pycommandcenter/-/tags) and find a `.pyd` link at the bottom of the tag page. + +Place the library in your repository. + +Add the library to the Python path in Python by: + +1. File->Settings->Project: (project name)->Project Interpreter. +2. Select the cog in the upper right corner and select "Show All". +3. In the new window that opens, select the icon which shows a few folders connected with lines. +4. In the new window, first press the plus icon, and then select the path of your repository (the path to where you placed the library). +5. Restart PyCharm with "File->Invalidate Caches/Restart->Invalidate and Restart". + # Building the documentation diff --git a/pycharm.md b/pycharm.md deleted file mode 100644 index 84cef663757f72fd18db6fb7e8b38eb74cd143b0..0000000000000000000000000000000000000000 --- a/pycharm.md +++ /dev/null @@ -1,13 +0,0 @@ -# Installing PyCommandCenter in PyCharm - -Start by downloading the library. Click the latest tag in the [PyCommandCenter repository](https://gitlab.liu.se/starcraft-ai-course/pycommandcenter/-/tags) and find a `.pyd` link at the bottom of the tag page. - -Place the library in your repository. - -Add the library to the Python path in Python by: - -1. File->Settings->Project: (project name)->Project Interpreter. -2. Select the cog in the upper right corner and select "Show All". -3. In the new window that opens, select the icon which shows a few folders connected with lines. -4. In the new window, first press the plus icon, and then select the path of your repository (the path to where you placed the library). -5. Restart PyCharm with "File->Invalidate Caches/Restart->Invalidate and Restart". diff --git a/create-visual-studio-solution.bat b/scripts/create-visual-studio-solution-python312.bat similarity index 100% rename from create-visual-studio-solution.bat rename to scripts/create-visual-studio-solution-python312.bat diff --git a/create-visual-studio-solution-python312.sh b/scripts/create-visual-studio-solution-python312.sh old mode 100644 new mode 100755 similarity index 100% rename from create-visual-studio-solution-python312.sh rename to scripts/create-visual-studio-solution-python312.sh diff --git a/create-visual-studio-solution-python37.sh b/scripts/create-visual-studio-solution-python37.sh similarity index 100% rename from create-visual-studio-solution-python37.sh rename to scripts/create-visual-studio-solution-python37.sh diff --git a/create-visual-studio-solution-python38.sh b/scripts/create-visual-studio-solution-python38.sh similarity index 100% rename from create-visual-studio-solution-python38.sh rename to scripts/create-visual-studio-solution-python38.sh diff --git a/create-visual-studio-solution-python39.sh b/scripts/create-visual-studio-solution-python39.sh similarity index 100% rename from create-visual-studio-solution-python39.sh rename to scripts/create-visual-studio-solution-python39.sh diff --git a/generate_pydocs.py b/scripts/generate_pydocs.py similarity index 100% rename from generate_pydocs.py rename to scripts/generate_pydocs.py diff --git a/tests/unittypeid.py b/tests/unittypeid.py index f3815d9002078987949f31beac2dec8cb93123b3..bc339814215c40dc9f6969aaa8b468e0c28c9c7d 100644 --- a/tests/unittypeid.py +++ b/tests/unittypeid.py @@ -3,7 +3,7 @@ import sys sys.path.append('build/python-api-src') -from library import UnitTypeID, UNIT_TYPEID +from commandcenter import UnitTypeID, UNIT_TYPEID class TestUnitType(unittest.TestCase):