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

Sync workflows and versions with mathics-core #209

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
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/osx.yaml
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