Skip to content

Commit

Permalink
Merge pull request #20 from tobywf/pin-dependencies
Browse files Browse the repository at this point in the history
Pin dependencies
  • Loading branch information
tobywf authored Jan 14, 2024
2 parents af4517d + d52d5a1 commit 95f015e
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 45 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/build.yaml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Check

on:
push:
branches:
- master
- workflow_check
pull_request:
branches:
- master

jobs:
check:
name: Check
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
shell: bash

- name: Run checks
run: |
pre-commit run --all-files --show-diff-on-failure
pytest tests.py --hypothesis-show-statistics --verbose
shell: bash
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ dmypy.json
# Pyre type checker
.pyre/

poetry.lock
.DS_Store
README.html

Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
repos:
- repo: https://github.com/ambv/black
rev: stable
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
hooks:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args:
- --fix=lf
- id: check-byte-order-marker
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: check-added-large-files
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,18 @@ You may also run the hooks at any time:
pre-commit run --all-files
```

Dependencies are managed via [poetry](https://python-poetry.org/). To install all dependencies, use:
To install development dependencies, use:

```
poetry install
python3 -m venv env
source env/bin/activate
pip install .[dev]
```

This will also install development dependencies (`pytest`). To run the tests:

```
poetry run pytest tests.py --verbose
pytest tests.py --verbose
```

## License
Expand Down
16 changes: 9 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ classifiers = [
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Programming Language :: Objective C",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Desktop Environment",
"Topic :: Software Development :: Libraries",
Expand All @@ -30,13 +34,11 @@ requires-python = ">= 3.8"

[project.optional-dependencies]
dev = [
"pytest",
"hypothesis",
"black",
"mypy",
"ipython",
"jedi",
"pre-commit",
"pytest==7.4.4",
"hypothesis==6.93.0",
"black==23.12.1",
"mypy==1.8.0",
"pre-commit==3.5.0",
]

[tool.setuptools_scm]

0 comments on commit 95f015e

Please sign in to comment.