Skip to content

Commit

Permalink
Merge pull request #6 from Kinds-of-Intelligence-CFI/clean-up
Browse files Browse the repository at this point in the history
[MAJOR] Clean-up / Implementing subset of ml-agents package
  • Loading branch information
alhasacademy96 committed Feb 5, 2024
2 parents 086e469 + a62b501 commit b005c05
Show file tree
Hide file tree
Showing 35 changed files with 1,069 additions and 1,117 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/auto-update-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Auto Update and Publish to PyPI
# This workflow is triggered on push to main branch and on a schedule every day at midnight. It also updates any dependencies and runs tests before publishing to PyPI.
# NOTE: the current workflow requires manual intervention in updating dependencies.
# ...If the dependencies are not changed, then the workflow will continue and publish to PyPI with same denendencies as defined.

on:
push:
branches:
- main # Currently triggers on any push to main branch
schedule:
- cron: "0 0 * * *" # Added a scheduled trigger to run every day at midnight

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine pytest
- name: Run tests in the 'core' subfolder within the 'test' folder
run: |
pytest test/core # running only core tests for now
- name: Build binary wheel and a source tarball
run: |
python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
repository-url: https://upload.pypi.org/legacy/
39 changes: 0 additions & 39 deletions .github/workflows/python-publish.yml

This file was deleted.

171 changes: 168 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,168 @@
animalai.egg-info/
**/__pycache__/
*.history
test/executable/
!test/executable/.gitkeep

# Rye (we don't commit locks)
.python-version
requirements.lock
requirements-dev.lock

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
20 changes: 4 additions & 16 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
MIT License

Copyright (c) 2023 Kinds of Intelligence Team | Leverhulme Centre for the Future of Intelligence
Copyright (c) 2024 Kinds of Intelligence Team | Leverhulme Centre for the Future of Intelligence

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
55 changes: 30 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
# Animal-AI
![steampunkFOURcrop](https://github.com/Kinds-of-Intelligence-CFI/animal-ai/assets/65875290/df798f4a-cb2c-416f-a150-093b9382a621)
Animal-AI Python Project

This repository is responsible for managing and updating primarily the PyPI package (https://pypi.org/project/animalai/) for Animal-AI package dependencies.
[![Python Versions](https://img.shields.io/pypi/pyversions/animalai)](https://pypi.org/project/animalai/) [![PyPI](https://img.shields.io/pypi/v/animalai)](https://pypi.org/project/animalai/) [![PyPI Downloads](https://img.shields.io/pypi/dm/animalai)](https://pypi.org/project/animalai/)

The main project repository is located [here](https://github.com/Kinds-of-Intelligence-CFI/animal-ai)
# Animal-AI

The Animal-AI Unity project repository is located [here](https://github.com/Kinds-of-Intelligence-CFI/animal-ai-unity-project)
This repository manages the Python interface for the Animal-AI environment.

![PyPI Downloads](https://img.shields.io/pypi/dm/animalai) ![PyPI Downloads](https://img.shields.io/pypi/dw/animalai) ![PyPI Downloads](https://img.shields.io/pypi/dd/animalai)
The main project repository is located [here](https://github.com/Kinds-of-Intelligence-CFI/animal-ai).

- **Website:** [https://www.animalai.org](https://animalai.org/)
- **Documentation:** [https://animalai.org/doc](https://github.com/Kinds-of-Intelligence-CFI/animal-ai/tree/main/docs)
- **Unity Source code:** [https://github.com/Kinds-of-Intelligence-CFI/animal-ai-unity-project](https://github.com/Kinds-of-Intelligence-CFI/animal-ai-unity-project)
- **Python Source code:** [https://github.com/Kinds-of-Intelligence-CFI/animal-ai-package/tree/main/animalai](https://github.com/Kinds-of-Intelligence-CFI/animal-ai-package/tree/main/animalai)
- **Bug reports:** [https://github.com/Kinds-of-Intelligence-CFI/animal-ai/issues](https://github.com/Kinds-of-Intelligence-CFI/animal-ai/issues)
* **Website:** [https://www.animalai.org](https://animalai.org/)
* **Documentation:** [https://animalai.org/doc](https://github.com/Kinds-of-Intelligence-CFI/animal-ai/tree/main/docs)
* **Unity Source code:** [https://github.com/Kinds-of-Intelligence-CFI/animal-ai-unity-project](https://github.com/Kinds-of-Intelligence-CFI/animal-ai-unity-project)
* **Python Source code:** [https://github.com/Kinds-of-Intelligence-CFI/animal-ai-python](https://github.com/Kinds-of-Intelligence-CFI/animal-ai-python)
* **Bug reports:** [https://github.com/Kinds-of-Intelligence-CFI/animal-ai/issues](https://github.com/Kinds-of-Intelligence-CFI/animal-ai/issues)

For more information about the ways you can contribute to Animal-AI, visit our website. If you’re unsure where to start or how your skills fit in, reach out! You can ask on GitHub, by opening a new issue or leaving a comment on a relevant issue that is already open.

If you are new to contributing to open source, [this](https://opensource.guide/how-to-contribute/) guide helps explain why, what, and how to successfully get involved.
If you are new to contributing to open source, [this](https://github.com/Kinds-of-Intelligence-CFI/animal-ai/blob/main/CONTRIBUTING.md) guide helps explain why, what, and how to successfully get involved.

## Version History
- v3.0.5
- Removed redundant packages in setup.py.
- Added download stats.
- v3.0.4
- Added current and past contributers.
- Added project description and metadata.
- v3.0.3
- Asserted python version to be 3.6.1 or higher, but less than 3.10.0 (exclusive).
- Added package description to setup.py and package metadata.
- v3.0.2
- Fixed major pacakge dependency issues, related to mlagents 0.30.0, protopuf, and shimy.
- Updated project setup.py to accomodate the latest version of Animal-AI package dependencies.
- Users can now use # pip install animalai # to install latest version of Animal-AI from PyPI effortlessly.

* v4.0.0
+ Only implements _mlagents 0.30.0_ package to avoid dependency issues; also reduces package size considerably.
+ Cleaned up package and removed redundant files.
+ Implemented tests for the package.
+ Added documentation for the package.
**Note: Version 4.0.0 is not backward compatible with previous versions of Animal-AI due to the significance of the changes made.**
* v3.0.5
+ Removed redundant packages in setup.py.
+ Added download stats.
* v3.0.4
+ Added current and past contributors.
+ Added project description and metadata.
* v3.0.3
+ Asserted python version to be 3.6.1 or higher, but less than 3.10.0 (exclusive).
+ Added package description to setup.py and package metadata.
* v3.0.2
+ Fixed major package dependency issues, related to mlagents 0.30.0, protobuf, and shimmy.
+ Updated project setup.py to accommodate the latest version of Animal-AI package dependencies.
- Users can now use `pip install animalai` to install latest version of Animal-AI from PyPI effortlessly.
2 changes: 2 additions & 0 deletions animalai/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from animalai.environment import AnimalAIEnvironment as AnimalAIEnvironment
from animalai import arenas as arenas
Loading

0 comments on commit b005c05

Please sign in to comment.