Skip to content

Commit

Permalink
Merge pull request #6 from pakallis/ci-changes
Browse files Browse the repository at this point in the history
CI changes
  • Loading branch information
pakallis committed Nov 17, 2022
2 parents c64ba1b + 99b4d3e commit 6130eab
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 13 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

name: Checks

on:
pull_request:
push:
branches: [master]
tags: ["*"]
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install requirements
run: pip install -e . tox tox-gh-actions
- name: Run checks
run: tox -e checks
5 changes: 1 addition & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v3
Expand All @@ -26,8 +26,5 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: pip install -e . tox tox-gh-actions flake8
# You can test your matrix by printing the current Python version
- name: Run lint
run: flake8 src
- name: Run tests
run: tox
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
Changelog
=========

0.3.3 (2022-11-17)
------------------
* Restrict pandas to >=0.20,<1.6
* Restrict pymongo to >=13,<4.4
* Remove hypothesis
* Run tests with tox in CI
* Add flake8 checks in CI

0.2.3 (2022-11-12)
------------------
* Add prepare release script
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ Overview
:alt: Supported implementations
:target: https://pypi.org/project/pdmongo

.. |commits-since| image:: https://img.shields.io/github/commits-since/pakallis/python-pandas-mongo/v0.2.3.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/pakallis/python-pandas-mongo/v0.3.3.svg
:alt: Commits since latest release
:target: https://github.com/pakallis/python-pandas-mongo/compare/v0.2.3...master
:target: https://github.com/pakallis/python-pandas-mongo/compare/v0.3.3...master



Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
year = '2020'
author = 'Pavlos Kallis'
copyright = '{0}, {1}'.format(year, author)
version = release = '0.2.3'
version = release = '0.3.3'

pygments_style = 'trac'
templates_path = ['.']
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def read(*names, **kwargs):

setup(
name='pdmongo',
version='0.2.3',
version='0.3.3',
license='MIT',
description='Transfer data between pandas dataframes and MongoDB',
long_description='%s\n%s' % (
Expand All @@ -50,9 +50,10 @@ def read(*names, **kwargs):
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: Implementation :: CPython',
# uncomment if you test on these interpreters:
# 'Programming Language :: Python :: Implementation :: IronPython',
Expand All @@ -68,7 +69,7 @@ def read(*names, **kwargs):
keywords=[
# eg: 'keyword1', 'keyword2', 'keyword3',
],
python_requires='>=3.6',
python_requires='>=3.7',
install_requires=[
'pymongo>=3.13,<4.4',
'pandas>=0.20,<1.6'
Expand Down
2 changes: 1 addition & 1 deletion src/pdmongo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
pandas.DataFrame.to_mongo = to_mongo

__all__ = ['read_mongo', 'to_mongo']
__version__ = '0.2.3'
__version__ = '0.3.3'
32 changes: 30 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[tox]
minversion = 3.18
envlist =
py{37,38,39,310}-pandas{10,12,13,14,15}-pymongo{313,40,41,42,43}
py{37,38,39}-pandas{10,12}-pymongo{313,40,41,42,43}
py{38,39,310}-pandas{14,15}-pymongo{313,40,41,42,43}

[gh-actions]
python =
Expand All @@ -13,11 +14,12 @@ python =

[testenv]
commands =
py.test
py.test --cov --cov-report=term-missing -vv tests
passenv = *
deps =
pytest
pytest-mock
pytest-cov
pymongo313: pymongo==3.13.*
pymongo40: pymongo==4.0.*
pymongo41: pymongo==4.1.*
Expand All @@ -28,3 +30,29 @@ deps =
pandas13: pandas==1.3.*
pandas14: pandas==1.4.*
pandas15: pandas==1.5.*

[testenv:checks]
deps =
docutils
check-manifest
flake8
pymongo
readme-renderer
pygments
isort

skip_install = true
commands =
python setup.py check --strict --metadata --restructuredtext
flake8 src tests setup.py
isort --verbose --check-only --diff src tests setup.py

[testenv:docs]

usedevelop = true
deps =
-r{toxinidir}/docs/requirements.txt
commands =
sphinx-build {posargs:-E} -b doctest docs dist/docs
sphinx-build {posargs:-E} -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs

0 comments on commit 6130eab

Please sign in to comment.