Skip to content

Commit

Permalink
Sync workflows and versions with mathics-core (#209)
Browse files Browse the repository at this point in the history
* Sync workflows and versions with mathics-core

* isort and black

---------

Co-authored-by: mmatera <[email protected]>
  • Loading branch information
rocky and mmatera authored Feb 8, 2025
1 parent 01bd899 commit b4a9107
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
# Othewrwise, Black is run and its changes are committed back to the incoming pull request.
# https://github.com/cclauss/autoblack

name: autoblack
name: isort and black check
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install click
run: pip install 'click==8.0.4'
- name: Install Black
run: pip install 'black==22.3.0'
python-version: 3.11
- name: Install click, black and isort
run: pip install 'click==8.0.4' 'black==23.12.1' 'isort==5.13.2'
- name: Run isort --check .
run: isort --check .
- name: Run black --check .
run: black --check .
- name: If needed, commit black changes to the pull request
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install OS dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install OS dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
os: [windows]
python-version: ['3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install OS dependencies
Expand Down
19 changes: 11 additions & 8 deletions mathics_django/server.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-


import sys
import argparse
import errno
import os
import os.path as osp
import argparse
import socket
import errno
import subprocess
import sys

import mathics
from mathics_django import server_version_string, license_string
from mathics_django import settings as mathics_settings # Prevents UnboundLocalError
from mathics_django.version import __version__ as django_frontend_version
from mathics.settings import DATA_DIR

from mathics_django import ( # Prevents UnboundLocalError
license_string,
server_version_string,
settings as mathics_settings,
)
from mathics_django.version import __version__ as django_frontend_version


def check_database():
# Check for the database
Expand Down Expand Up @@ -107,7 +110,7 @@ def launch_app(args):
addr = "127.0.0.1"

try:
from django.core.servers.basehttp import run, get_internal_wsgi_application
from django.core.servers.basehttp import get_internal_wsgi_application, run

handler = get_internal_wsgi_application()
run(addr, port, handler)
Expand Down
4 changes: 2 additions & 2 deletions mathics_django/urls.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-


from django.urls import re_path, include
from django.conf.urls.static import static
from django.conf import settings
from django.conf.urls.static import static
from django.urls import include, re_path

handler404 = "mathics_django.web.views.error_404_view"
handler500 = "mathics_django.web.views.error_500_view"
Expand Down
1 change: 0 additions & 1 deletion mathics_django/web/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
doc_subsection,
)


# These are the callback functions.
from mathics_django.web.views import (
delete,
Expand Down

0 comments on commit b4a9107

Please sign in to comment.