Skip to content

Commit 2a9b3d8

Browse files
authored
Merge pull request #16 from bskinn/release-1.0.0.1
Merge Release 1.0.0.1 to stable
2 parents b1c0633 + 98c6378 commit 2a9b3d8

19 files changed

+238
-152
lines changed

.coveragerc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
[run]
2-
source =
3-
src/*
42

53
include =
4+
src/*
65
tests/*
76

87
omit =

.github/workflows/ci_tests.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: ci-tests
2+
3+
on: push
4+
5+
jobs:
6+
all_checks:
7+
name: Run all tests, lints, etc. (Python 3.10)
8+
runs-on: ubuntu-latest
9+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
10+
11+
steps:
12+
- name: Check out repo
13+
uses: actions/checkout@v2
14+
15+
- name: Install Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.10'
19+
20+
- name: Update pip & setuptools
21+
run: python -m pip install -U pip setuptools
22+
23+
- name: Install & report CI dependencies
24+
run: |
25+
python -m pip install -U --force-reinstall -r requirements-ci.txt -r requirements-flake8.txt
26+
python --version
27+
pip list
28+
29+
- name: Run tests
30+
run: |
31+
pytest --cov
32+
tox -e sdist_install
33+
34+
- name: Lint code
35+
run: tox -e flake8
36+
37+
- name: Transmit to Codecov
38+
run: codecov
39+
40+
41+
just_tests:
42+
name: Run only the test suite
43+
runs-on: ubuntu-latest
44+
strategy:
45+
matrix:
46+
python: ['3.6', '3.7', '3.8', '3.9']
47+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
48+
49+
steps:
50+
- name: Check out repo
51+
uses: actions/checkout@v2
52+
53+
- name: Install Python
54+
uses: actions/setup-python@v2
55+
with:
56+
python-version: ${{ matrix.python }}
57+
58+
- name: Update pip & setuptools
59+
run: python -m pip install -U pip setuptools
60+
61+
- name: Install & report CI dependencies
62+
run: |
63+
python -m pip install -U --force-reinstall -r requirements-ci.txt
64+
python --version
65+
pip list
66+
67+
- name: Run tests
68+
run: |
69+
pytest --cov
70+
tox -e sdist_install
71+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,6 @@ doc/scratch/*
7575
# Mutmut
7676
.mutmut-cache
7777

78+
# VS Code
79+
.vscode
80+

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

AUTHORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Credits
22
=======
33

4-
`flake8-absolute-import` is authored and maintained by Brian Skinn ([Blog](https://bskinn.github.io)) ([Twitter](https://twitter.com/btskinn)).
4+
`flake8-absolute-import` is authored and maintained by Brian Skinn ([Blog](https://bskinn.github.io)) ([Twitter](https://twitter.com/btskinn)). The skeleton of the AST-based implementation used for this plugin was shamelessly swiped from [`flake8-2020`](https://github.com/asottile/flake8-2020) by [Anthony Sottile](https://github.com/asottile).
55

66
While there is disagreement about the upsides and downsides of relative imports in Python, as best this author can tell there are numerous projects and developers out there who desire to hold strictly to absolute imports in their code. The goal of this flake8 plugin is to simplify enforcement of this policy.
77

CHANGELOG.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,48 @@
33
All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6-
and this project strives to adhere to
6+
and this project strives to adhere (mostly) to
77
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

99

10-
### Unreleased Changes
10+
### [1.0.0.1] - ####-##-##
11+
12+
This is an administrative/metadata release, primarily to update officially
13+
supported Python versions. There should be no behavior changes between
14+
this version and v1.0.0.
15+
16+
#### Dependencies
17+
18+
- Support for Python 3.10 and 3.11-dev was officially added
19+
20+
- Support for Python 3.5 was officially removed, though the plugin should
21+
remain compatible
22+
23+
#### Testing
24+
25+
- Support for running the `tox` matrix on Windows was removed (it doesn't
26+
seem to work right with the batch-files-in-bin-folder approach I use for
27+
multiple Pythons in development)
28+
29+
- Routine CI switched from Travis CI to GitHub Actions
30+
31+
- CI and `tox` versions updated to focus on Python 3.10
32+
33+
- `pytest` and `coverage` configs revised to avoid `source`/`include` collision
34+
in `coverage`
35+
36+
#### Administrative
37+
38+
- `setuptools` configuration has been mostly ported to `setup.cfg`, except for the
39+
pieces that still need to be defined dynamically
40+
41+
- Built artifacts for distribution should now be created using `build`, which
42+
has been added to `requirements-dev.txt`
1143

12-
...
1344

1445
### [1.0.0] - 2019-09-09
1546

1647
#### Features
1748

18-
* Detect any relative imports and report with error code ABS101
49+
- Detect any relative imports and report with error code ABS101
1950

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019 Brian Skinn
3+
Copyright (c) 2019-2021 Brian Skinn
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ flake8-absolute-import
55

66
**Current Development Version:**
77

8-
.. image:: https://img.shields.io/azure-devops/build/brianskinn/69156953-0c09-4122-8268-0cc35b259749/3?label=azure-pipelines&logo=azure-devops
9-
:target: https://dev.azure.com/brianskinn/flake8-absolute-import/_build?definitionId=3
8+
.. image:: https://img.shields.io/github/workflow/status/bskinn/flake8-absolute-import/ci-tests?logo=github
9+
:alt: GitHub Workflow Status
10+
:target: https://github.com/bskinn/flake8-absolute-import/actions
1011

11-
.. image:: https://img.shields.io/travis/com/bskinn/flake8-absolute-import?label=travis-ci&logo=travis
12-
:target: https://travis-ci.com/bskinn/flake8-absolute-import
13-
14-
.. image:: https://codecov.io/gh/bskinn/flake8-absolute-import/branch/master/graph/badge.svg
12+
.. image:: https://codecov.io/gh/bskinn/flake8-absolute-import/branch/main/graph/badge.svg
1513
:target: https://codecov.io/gh/bskinn/flake8-absolute-import
1614

1715
**Most Recent Stable Release:**
@@ -51,15 +49,15 @@ Relative imports raise the ``ABS101`` error code:
5149

5250
Available on `PyPI <https://pypi.python.org/pypi/flake8-absolute-import>`__
5351
(``pip install flake8-absolute-import``). ``flake8`` should automatically
54-
detect and load the plugin. ``flake8``>=3.0 is required.
52+
detect and load the plugin. ``flake8``>=3.7 is required.
5553

5654
Source on `GitHub <https://github.com/bskinn/flake8-absolute-import>`__. Bug reports
5755
and feature requests are welcomed at the
5856
`Issues <https://github.com/bskinn/flake8-absolute-import/issues>`__ page there.
5957

60-
Copyright (c) Brian Skinn 2019
58+
Copyright (c) Brian Skinn 2019-2021
6159

62-
License: The MIT License. See `LICENSE.txt <https://github.com/bskinn/flake8-absolute-import/blob/master/LICENSE.txt>`__
60+
License: The MIT License. See `LICENSE.txt <https://github.com/bskinn/flake8-absolute-import/blob/main/LICENSE.txt>`__
6361
for full license terms.
6462

6563
.. _ImportFrom: https://greentreesnakes.readthedocs.io/en/latest/nodes.html#ImportFrom

azure-coretest.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
parameters:
2+
pythons: []
3+
platforms: []
4+
5+
jobs:
6+
- ${{ each python in parameters.pythons }}:
7+
- ${{ each platform in parameters.platforms }}:
8+
- job: ${{ coalesce(python.value.name, python.key) }}_${{ coalesce(platform, 'linux') }}
9+
variables:
10+
${{ if eq(platform, 'linux') }}:
11+
image: 'Ubuntu-latest'
12+
${{ if eq(platform, 'windows') }}:
13+
image: 'windows-latest'
14+
${{ if eq(platform, 'macOs') }}:
15+
image: 'macOS-latest'
16+
${{ if notIn(platform, 'macOs', 'linux', 'windows') }}:
17+
image: 'Ubuntu-latest'
18+
19+
pool:
20+
vmImage: $[ variables.image ]
21+
22+
steps:
23+
- task: UsePythonVersion@0
24+
inputs:
25+
versionSpec: '${{ python.value.spec }}'
26+
architecture: 'x64'
27+
displayName: Use cached Python ${{ python.value.spec }} for tests.
28+
29+
- script: pip install -r requirements-ci.txt
30+
displayName: Install CI requirements
31+
32+
- script: pytest
33+
displayName: Run pytest (Python ${{ python.value.spec }})

azure-job.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)