Skip to content

Commit

Permalink
feat(#16): Use taskfile to automate scripts. Aditionally:
Browse files Browse the repository at this point in the history
- Upgrade to Python 3.11
- Updated libraries
- Removed old recsys gym
- Replaced old pre-commit hooks with ruff
- Replaced gym with gymnasium
- Replaced MIT license with GNU GPLv3
- Updated poetry
  • Loading branch information
Lucas Farris committed May 15, 2024
1 parent 1315a66 commit 7ec382c
Show file tree
Hide file tree
Showing 74 changed files with 5,418 additions and 4,675 deletions.
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

65 changes: 33 additions & 32 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,43 @@ name: Master Deploy

on:
push:
branches:
- 'master'
branches:
- "master"

permissions:
contents: write

jobs:
deploy:

runs-on: ubuntu-latest

runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.7'
- name: Install dependencies and test
run: |
python -m pip install pip==22.2.2 setuptools==65.3.0 wheel==0.37.1
pip install poetry==1.1.15
poetry install
poetry run coverage run -m pytest
- name: Generate Documentation
run: |
poetry run coverage html -d docs/coverage
poetry run pdoc --html --force deeprecsys -o docs/api
- name: Version Bump
run: |
poetry version patch
git config --global user.name 'Github Actions'
git config --global user.email '[email protected]'
git commit -am "Bump to version $(poetry version -s)"
git push
- name: Build package and publish
run: |
poetry build
poetry config pypi-token.pypi ${{ secrets.PYPI_KEY }}
poetry publish
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.37.1
- name: Install dependencies and test
run: |
task setup
task test
- name: Generate Documentation
run: |
task docs
- name: Version Bump
run: |
task bump
- name: Build package and publish
env:
PYPI_KEY: ${{ secrets.PYPI_KEY }}
run: |
task publish
- name: Publish Release
env:
GH_TOKEN: ${{ github.token }}
REPO_NAME: ${{ github.repository }}
TAG: $(task version)
run: gh release create "$TAG" --repo="$REPO_NAME" --title="$TAG" --generate-notes
Empty file removed .gitmodules
Empty file.
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

17 changes: 0 additions & 17 deletions .idea/deeprecsys.iml

This file was deleted.

32 changes: 0 additions & 32 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/vcs.xml

This file was deleted.

33 changes: 7 additions & 26 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
repos:
- repo: https://github.com/ambv/black
rev: 21.9b0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: black
language_version: python3.6
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: ["flake8-bugbear", mccabe, "pep8-naming"]
args: ["--max-complexity=5"]
- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
- id: isort
name: isort (python)
args: ["--profile=black"]
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
args:
[
"--ignore=D100,D104,D203,D205,D209,D213,D400,D415",
"--match=deeprecsys/rl/.*",
]
additional_dependencies: [toml]
- id: ruff
args: [--fix]
types_or: [python, jupyter]
- id: ruff-format
types_or: [python, jupyter]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.930
hooks:
Expand Down
Loading

0 comments on commit 7ec382c

Please sign in to comment.