Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update repo to be up to Farama Standards #535

Merged
merged 9 commits into from
Nov 26, 2023
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
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: Farama-Foundation
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# https://pre-commit.com
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file.
name: pre-commit
on:
pull_request:
push:
branches: [master]

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- run: python -m pip install pre-commit
- run: python -m pre_commit --version
- run: python -m pre_commit install
- run: python -m pre_commit run --all-files
146 changes: 129 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,139 @@
# Compiled sources
*.pyc
# 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/

# Setup
**.egg*
# Translations
*.mo
*.pot

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

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
_build
docs/_build/

# Editor files
.idea
# PyBuilder
.pybuilder/
target/

# Test files
.pytest_cache
.cache
# 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

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__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/

# Outputs
**/out/*
# Cython debug symbols
cython_debug/

# Docs
docs/_build
**jupyter_execute
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
args:
- '--per-file-ignores=**/__init__.py:F401,F403,E402'
- --ignore=E203,W503,E741,E731
- --max-complexity=30
- --max-line-length=456
- --show-source
- --statistics
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
exclude: "__init__.py"
- repo: https://github.com/python/black
rev: 23.3.0
hooks:
- id: black
32 changes: 18 additions & 14 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@
import os
from typing import Any, Dict

import highway_env

import highway_env # noqa: F401

project = "highway-env"
copyright = "2023 Farama Foundation"
author = "Farama Foundation"

# The full version, including alpha/beta/rc tags
# release = highway_env.__version__
release = ''
release = ""

# -- General configuration ---------------------------------------------------

Expand All @@ -36,27 +35,32 @@
# ones.
extensions = [
"sphinx.ext.napoleon",
'sphinx.ext.coverage',
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.autodoc",
"sphinx.ext.githubpages",
'sphinx.ext.viewcode',
'sphinx.ext.autosectionlabel',
'sphinxcontrib.bibtex',
"sphinx.ext.viewcode",
"sphinx.ext.autosectionlabel",
"sphinxcontrib.bibtex",
"jupyter_sphinx",
"myst_parser",
]

autodoc_default_flags = ['members', 'private-members', 'undoc-members', 'special-members']
autodoc_member_order = 'bysource'
autodoc_default_flags = [
"members",
"private-members",
"undoc-members",
"special-members",
]
autodoc_member_order = "bysource"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# Napoleon settings
# napoleon_use_ivar = True
Expand Down Expand Up @@ -102,9 +106,9 @@

# -- BibTeX -------------------------------------------------------------

bibtex_bibfiles = ['bibliography/biblio.bib']
bibtex_encoding = 'latin'
bibtex_default_style = 'alpha'
bibtex_bibfiles = ["bibliography/biblio.bib"]
bibtex_encoding = "latin"
bibtex_default_style = "alpha"

# -- Generate Changelog -------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/scripts/move_404.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
fp.seek(0)
fp.truncate()

fp.write(content)
fp.write(content)
Loading
Loading