Skip to content

Commit

Permalink
Merge b09f043 into af00724
Browse files Browse the repository at this point in the history
  • Loading branch information
evankirkiles committed Dec 16, 2022
2 parents af00724 + b09f043 commit 23a58ae
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down
9 changes: 6 additions & 3 deletions psiturk/experiment_server_controller.py
Expand Up @@ -159,9 +159,12 @@ def shutdown(self, ppid=None):
def check_server_process_running(self, process_hash):
server_process_running = False
for proc in psutil.process_iter():
if process_hash in str(proc.as_dict(['cmdline'])):
server_process_running = True
break
try:
if process_hash in str(proc.as_dict(['cmdline'])):
server_process_running = True
break
except:
pass
return server_process_running

def get_project_hash(self):
Expand Down
4 changes: 4 additions & 0 deletions psiturk/psiturk_config.py
Expand Up @@ -142,6 +142,10 @@ def load_config(self):
'database_url')
if ('localhost' in database_url) or ('sqlite' in database_url):
raise EphemeralContainerDBError(database_url)

# if found, replace postgres:// with postgresql:// in database
database_url = self.get('Database Parameters', 'database_url')
self.set('Database Parameters', 'database_url', database_url.replace('postgres://', 'postgresql://'))


def get_ad_url(self):
Expand Down
2 changes: 1 addition & 1 deletion psiturk/psiturk_shell.py
Expand Up @@ -98,7 +98,7 @@ def amt_services_wrapper(self):
if not self.quiet:
message = '{}{}'.format(message, still_can_do)
self.perror(message)
sys.exit()
# sys.exit() <- This was failing a test earlier, preventing using commands w/o AMT connection
except PsiturkException as e:
self.poutput(e)

Expand Down
54 changes: 27 additions & 27 deletions setup.cfg
Expand Up @@ -4,8 +4,10 @@ version = attr: psiturk.version.version_number
classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
author = NYU Computation and Cognition Lab
author_email = authors@psiturk.org
description = An open platform for science on Amazon Mechanical Turk
Expand All @@ -15,33 +17,31 @@ url = https://github.com/NYUCCL/psiturk

[options]
install_requires =
Flask_RESTful~=0.3.7
boto3~=1.9.179
fuzzywuzzy~=0.17.0
cmd2~=0.9.14
psutil~=5.6.3
Flask_Login~=0.4.1
gunicorn[gevent]~=20.0.4
Flask~=1.1.4
itsdangerous~=1.1.0
markupsafe~=2.0.1
certifi~=2019.11.28
pytz~=2019.1
user_agents~=2.0
Flask_RESTful~=0.3.8
boto3~=1.26.31
botocore~=1.29.31
fuzzywuzzy~=0.18.0
cmd2~=2.4.2
psutil~=5.9.4
Flask_Login~=0.6.2
gunicorn[gevent]~=20.1.0
Flask~=2.2.2
certifi~=2022.12.7
pytz~=2022.6
user_agents~=2.2.0
docopt~=0.6.2
urllib3~=1.25.3
Faker~=1.0.7
requests~=2.22.0
APScheduler~=3.6.1
botocore~=1.12.179
SQLAlchemy~=1.3.5
pytest~=6.1.1
future~=0.17.1
GitPython~=3.1.0
python-dotenv~=0.12.0
python_dateutil~=2.8.1
pyOpenSSL~=22.0.0
setproctitle~=1.1.10
urllib3~=1.26.13
Faker~=15.3.4
requests~=2.28.1
APScheduler~=3.9.1
SQLAlchemy~=1.4.45
pytest~=7.2.0
future~=0.18.2
python-dotenv~=0.21.0
python_dateutil~=2.8.2
pyOpenSSL~=22.1.0
setproctitle~=1.3.2
python-Levenshtein~=0.20.8
packages=
psiturk
psiturk.api
Expand Down
2 changes: 1 addition & 1 deletion tests/test_noaws.py
Expand Up @@ -45,7 +45,7 @@ def test_awskeys_invalid_shell(capfd, experiment_server_controller,
out, err = capfd.readouterr()
assert NoMturkConnectionError().message in err


@pytest.mark.enable_socket
def test_nonaws_still_can_do(capfd, edit_config_file,
experiment_server_controller, psiturk_shell):
"""test_nonaws_still_can_do."""
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py36, py37, py38
envlist = py37, py38, py39, py310

[testenv]
deps =
Expand Down

0 comments on commit 23a58ae

Please sign in to comment.