Skip to content

Commit

Permalink
Upgrading python and node to 3.9 and 18.x (#164)
Browse files Browse the repository at this point in the history
* Upgrading python and node to 3.9 and 18.x

* Allow greater than 3.9

* Updating lock

* Actually update node

* Adding ansible python install
  • Loading branch information
devinmatte authored Dec 17, 2023
1 parent 59ddcf1 commit 5fdc0fe
Show file tree
Hide file tree
Showing 10 changed files with 600 additions and 497 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Node 16.x
- name: Set up Node 18.x
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- name: Check if package-lock.json is up to date
run: |
npx --yes [email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['16']
python-version: ['3.8', '3.9', '3.10']
node-version: ['18']
python-version: ['3.9', '3.10', '3.11']
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Shows new MBTA Orange, Red, and Green Line trains as they come into service.

## Install & Run
Dependencies:
- `node` `16.x`
- `python` `3.8`
- `node` `18.x`
- `python` `3.9`
- [`poetry`](https://python-poetry.org/)

Run:
Expand Down
6 changes: 5 additions & 1 deletion devops/cloudformation.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@
"Value": {
"Fn::Sub": "ntt-${NTTHostname}"
}
},
{
"Key": "service",
"Value": "new-train-tracker"
}
],
]
}
},
"NTTSecurityGroup": {
Expand Down
19 changes: 17 additions & 2 deletions devops/deploy-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,33 @@
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
state: present

- name: add nodejs 16.x ppa for apt repo
- name: add nodejs 18.x ppa for apt repo
become: yes
become_user: root
apt_repository:
repo: deb https://deb.nodesource.com/node_16.x focal main
repo: deb https://deb.nodesource.com/node_18.x focal main
update_cache: yes

- name: install nodejs
become: yes
become_user: root
apt:
name: nodejs
state: latest

- name: add python ppa for apt repo
become: yes
become_user: root
apt_repository:
repo: ppa:deadsnakes/ppa
update_cache: yes

- name: install python3.9
become: yes
become_user: root
apt:
name: python3
state: 3.9

- name: install poetry
shell: curl -sSL https://install.python-poetry.org | python3 -
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new-train-tracker",
"version": "2.3.0",
"version": "2.3.1",
"description": "New Train Tracker by TransitMattters",
"main": "index.tsx",
"scripts": {
Expand All @@ -24,7 +24,7 @@
"url": "https://github.com/transitmatters/new-train-tracker/issues"
},
"engines": {
"node": "16.x"
"node": "18.x"
},
"homepage": "https://github.com/transitmatters/new-train-tracker#readme",
"dependencies": {
Expand Down
1,035 changes: 559 additions & 476 deletions poetry.lock

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
[tool.poetry]
name = "new-train-tracker"
version = "2.3.0"
version = "2.3.1"
description = "New Train Tracker by TransitMattters"
authors = ["TransitMatters Labs Team"]
license = "MIT"

[tool.poetry.dependencies]
python = "^3.8.1, <3.11"
flask = "1.1.4"
python = "^3.9, <3.12"
flask = "2.3.3"
aiohttp = "3.8.5"
boto3 = "1.26.153"
gunicorn = "20.1.0"
json-api-doc = "0.15.0"
pytz = "2023.3"
MarkupSafe = "2.0.1"
schedule = "1.1.0"
MarkupSafe = "2.1.3"
schedule = "1.2.1"


[tool.poetry.dev-dependencies]
pip = ">=23.0"
black = "21.12b0"
pylint = "2.13.5"
flake8 = "6.1.0"


[build-system]
requires = ["poetry-core>=1.5.0"]
requires = ["poetry-core>=1.6.0"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 5fdc0fe

Please sign in to comment.