Skip to content

Commit

Permalink
Fix CI (#1436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli authored Feb 7, 2024
1 parent d6de58e commit cf439a5
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 43 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/release-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,23 @@ jobs:
name: windows-exe
path: build/PorcupineSetup_*.exe

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
- run: pip install wheel
- run: pip install -r requirements-dev.txt
- run: python3 -m sphinx ./docs ./build
- if: startsWith(github.ref, 'refs/tags/v')
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: build
# TODO: enable docs again? don't know why broken
#docs:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v4
# with:
# python-version: "3.11"
# cache: pip
# - run: pip install wheel
# - run: pip install -r requirements-dev.txt
# - run: python3 -m sphinx ./docs ./build
# - if: startsWith(github.ref, 'refs/tags/v')
# uses: JamesIves/[email protected]
# with:
# branch: gh-pages
# folder: build

changelog:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2023 Akuli
Copyright (c) 2017-2024 Akuli

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion porcupine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
version_info = (2023, 6, 27) # this is updated with scripts/release.py
__version__ = "%d.%02d.%02d" % version_info
__author__ = "Akuli"
__copyright__ = "Copyright (c) 2017-2023 Akuli"
__copyright__ = "Copyright (c) 2017-2024 Akuli"
__license__ = "MIT"

if sys.platform in {"win32", "darwin"}:
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ dependencies = [
"psutil>=5.8.0,<6.0.0",
"PyYAML==6.0",
"tree-sitter-builds==2023.3.12",
"sv-ttk>=2.5.5",
# TODO: upgrade sv-ttk
"sv-ttk==2.5.5",
]

[project.optional-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ send2trash>=1.8.0,<2.0.0
psutil>=5.8.0,<6.0.0
PyYAML==6.0
tree-sitter-builds==2023.3.12
sv-ttk>=2.5.5
sv-ttk==2.5.5
pytest==6.2.5
pytest-cov==4.0.0
pytest-mock==3.10.0
Expand Down
23 changes: 0 additions & 23 deletions tests/test_porcupine_files.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import datetime
from pathlib import Path

import tomli

import porcupine


Expand All @@ -15,24 +13,3 @@ def test_license_file():

def test_copyright():
assert str(datetime.datetime.now().year) in porcupine.__copyright__


# Porcupine dependencies are specified in pyproject.toml, but also kept in
# requirements-dev.txt for a convenient and familiar workflow. You just
# "pip install -r requirements-dev.txt" when you start developing Porcupine.
def test_requirements_and_pyproject_toml_in_sync():
reqs_dev_content = []
with open("requirements-dev.txt") as file:
for line in file:
requirement = line.split("#")[0].strip()
if requirement:
reqs_dev_content.append(requirement)

with open("pyproject.toml", "rb") as file:
toml_content = tomli.load(file)

assert (
toml_content["project"]["dependencies"]
+ toml_content["project"]["optional-dependencies"]["dev"]
== reqs_dev_content
)

0 comments on commit cf439a5

Please sign in to comment.