Skip to content

Commit

Permalink
Merge pull request #528 from AnalogJ/poetry
Browse files Browse the repository at this point in the history
Configure Poetry, drop Python 2.7
  • Loading branch information
adferrand committed Aug 16, 2020
2 parents d28d68d + 08f1cd0 commit adf79f1
Show file tree
Hide file tree
Showing 14 changed files with 1,633 additions and 288 deletions.
7 changes: 1 addition & 6 deletions .azure-pipelines/templates/integration-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ jobs:
BRANCH_NAME: $(Build.SourceBranch)
strategy:
matrix:
linux-python-2.7:
PYTHON_VERSION: 2.7
linux-python-3.5:
PYTHON_VERSION: 3.5
linux-python-3.8-light:
Expand All @@ -20,9 +18,6 @@ jobs:
linux-lint:
PYTHON_VERSION: 3.8
TOXENV: lint
windows-python-2.7:
IMAGE: vs2017-win2016
PYTHON_VERSION: 2.7
windows-python-3.5:
IMAGE: vs2017-win2016
PYTHON_VERSION: 3.5
Expand All @@ -37,7 +32,7 @@ jobs:
versionSpec: $(PYTHON_VERSION)
addToPath: true
displayName: Enable the targeted python version
- script: python -m pip install --upgrade pip tox wheel virtualenv setuptools
- script: python -m pip install -U tox poetry
displayName: Install required runtime dependencies
- script: python -m tox
displayName: Execute tests through tox
Expand Down
7 changes: 2 additions & 5 deletions .azure-pipelines/templates/packaging-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
addToPath: true
displayName: Install Python
- script: |
python -m pip install --upgrade setuptools wheel
python -m pip install -U poetry
displayName: Prepare environment
- script: |
python setup.py sdist bdist_wheel
poetry build
displayName: Build Python dist
- task: CopyFiles@2
inputs:
Expand All @@ -34,9 +34,6 @@ jobs:
versionSpec: 3.8
addToPath: true
displayName: Install Python
- script: |
python -m pip install --upgrade pip
displayName: Prepare environment
- script: |
version="$(cat VERSION)"
echo "Version is: $version"
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/templates/release-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
addToPath: true
displayName: Install Python
- script: |
python -m pip install --upgrade pip twine
python -m pip install -U twine
displayName: Prepare environment
- script: |
twine upload dist/* -u "$(twine.username)" -p "$(twine.password)"
Expand Down
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@

## master - CURRENT
### Modified
* Remove support for Python 2.7.
* Remove the extra `security` from `requests` dependency which does not make sense anymore
on recent versions of Python.
* Use `poetry` to manage dependencies, build and package Lexicon.
* The `beautifulsoup4` dependency has been integrated to the core ones for generic purpose.
As a consequence `henet`, `easyname` and `gratisdns` do not have optional dependencies anymore.

## 3.3.28 - 26/07/2020
### Added
* Redesign of the release process using Azure Pipelines
* Create a dedicated documentation on ReadTheDoc, refactor README.md into README.rst
* Redesign of the release process using Azure Pipelines.
* Create a dedicated documentation on ReadTheDoc, refactor README.md into README.rst.

### Modified
* Fix localzone provider to make it work with dnspython 2.x
* Update easyname provider against the recent API changes
* Fix localzone provider to make it work with dnspython 2.x.
* Update easyname provider against the recent API changes.

## 3.3.27 - 08/07/2020
## 3.3.26 - 14/06/2020
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include README.md LICENSE requirements.txt VERSION
include README.rst LICENSE
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

19 changes: 10 additions & 9 deletions docs/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,31 @@ Fork, then clone the repo:
$ git clone git@github.com:your-username/lexicon.git
Create a python virtual environment:
Install Poetry if you not have it already:

.. code-block:: bash
$ virtualenv -p python2.7 venv
$ source venv/bin/activate
$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
Install ``lexicon`` in development mode with full providers support:
Configure the virtual environment with full providers support and activate it:

.. code-block:: bash
$ pip install -e .[full,dev]
$ cd lexicon
$ poetry install -E full
$ source .venv/bin/activate
Make sure the tests pass:

.. code-block:: bash
$ py.test lexicon/tests
$ tox -e standard
You can test a specific provider using:

.. code-block:: bash
$ py.test lexicon/tests/providers/test_foo.py
$ pytest lexicon/tests/providers/test_foo.py
.. note::

Expand Down Expand Up @@ -149,7 +150,7 @@ Testing your provider
Test against the live API
-------------------------

First let's validate that your provider shows up in the CLI
First let's validate that your provider shows up in the CLI.

.. code-block:: bash
Expand Down Expand Up @@ -239,7 +240,7 @@ variable ``LEXICON_LIVE_TESTS`` set to ``true`` like below:

.. code-block:: bash
LEXICON_LIVE_TESTS=true py.test lexicon/tests/providers/test_foo.py
LEXICON_LIVE_TESTS=true pytest lexicon/tests/providers/test_foo.py
If any of the integration tests fail on your provider, you'll need to delete the recordings that
were created, make your changes and then try again.
Expand Down
125 changes: 0 additions & 125 deletions lexicon.1

This file was deleted.

0 comments on commit adf79f1

Please sign in to comment.