Skip to content

Commit

Permalink
Merge pull request #141 from neutrinoceros/req_files
Browse files Browse the repository at this point in the history
TST: use requirement files instead of optional dependencies for tests and type checking
  • Loading branch information
neutrinoceros authored Jan 30, 2023
2 parents b53755d + 26ffb7d commit 4e858f8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 27 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Build
run: python -m pip install ".[test]"
run: |
python -m pip install --upgrade pip
python -m pip install -r tests/requirements.txt
python -m pip install .
- run: python -m coverage run -m pytest --color=yes

Expand All @@ -61,7 +64,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
# Use latest Python, so it understands all syntax.
# Use latest Python, so it understands all syntax.
python-version: '3.11'

- run: python -m pip install --upgrade coverage[toml]
Expand Down Expand Up @@ -105,8 +108,9 @@ jobs:

- name: Build
run: |
python3 -m pip install --upgrade pip
python3 -m pip install .[typecheck]
python -m pip install --upgrade pip
python -m pip install -r typecheck_requirements.txt
python -m pip install .
- name: Run mypy
run: mypy inifix
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.0.0] - 2023-01-30

TST: use requirement files instead of optional dependencies for tests and type checking

Installing with extra targets (`[test]` and `[typecheck]`) isn't supported anymore.


## [3.1.0] - 2023-01-08

- ENH: optimize startup time
Expand Down
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ conf = inifix.load("pluto.ini")
Files are assumed to be encoded as UTF-8.

`inifix.load` and `inifix.loads` accept a optional boolean flag
`parse_scalars_as_list` (new in `inifix` v3.1.0), that is useful to simplify
`parse_scalars_as_list` (new in `inifix` v4.0.0), that is useful to simplify
handling unknown data: all values can be safely treated as arrays, and iterated
over, even in the presence of scalar strings. For illustration

Expand Down Expand Up @@ -217,17 +217,6 @@ This program also doubles as `pre-commit` hook
hooks:
- id: inifix-format
```
## Contribution guidelines
We use the [pre-commit](https://pre-commit.com) framework to automatically lint
for code style and common pitfalls.
Before you commit to your local copy of the repo, please run this from the top
level
```shell
$ python3 -m pip install -u -e .[dev]
$ pre-commit install
```
## Testing
Expand Down
2 changes: 1 addition & 1 deletion inifix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
from .io import loads
from .validation import validate_inifile_schema

__version__ = "3.1.0"
__version__ = "4.0.0"
11 changes: 1 addition & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "inifix"
version = "3.1.0"
version = "4.0.0"
description = "I/O facility for Idefix/Pluto configuration files"
authors = [
{ name = "C.M.T. Robert" },
Expand All @@ -25,15 +25,6 @@ dependencies = [
[project.license]
text = "GPL-3.0"

[project.optional-dependencies]
test = [
"coverage[toml]>=6.5",
"pytest>=6.1",
]
typecheck = [
"mypy==0.950",
]

[project.readme]
file = "README.md"
content-type = "text/markdown"
Expand Down
2 changes: 2 additions & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage[toml]>=6.5
pytest>=6.1
1 change: 1 addition & 0 deletions typecheck_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mypy==0.991

0 comments on commit 4e858f8

Please sign in to comment.