Skip to content

Commit

Permalink
Version 0.10.1 Update (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
H0R5E authored Apr 12, 2022
1 parent da5b762 commit 0755e5e
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 77 deletions.
8 changes: 2 additions & 6 deletions .bandit
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@

# (optional) list included test IDs here, eg '[B101, B406]':
# tests:

# (optional) list skipped test IDs here, eg '[B101, B406]':
skips: ['B101']
[bandit]
skips: B101,B307,B311
3 changes: 2 additions & 1 deletion .condarc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pinned_packages:
- python=2
- pyqt=4
- pyqt=4.11.4=py27_5

channels:
- defaults
- free
- dataonlygreater
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ disable=print-statement,
trailing-newlines,
bad-continuation,
multiple-statements,
import-error
import-error,
missing-docstring

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
52 changes: 33 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,54 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.10.1] - 2022-04-12

### Changed

- Use the appveyor configuration file as the single source for the version
number.

### Removed

- Removed `__build__` and `__version__` dunders.

### Fixed

- Fixed minimum pandas dependency version.
- Fixed codacy configuration.

## [0.10.0] - 2019-03-12

### Added

- Added change log.
- Added CI files
- Added python-magic as a dependency.
- Added pagination to DataFrameModel to accelerate loading times.
- Added change log.
- Added CI files
- Added python-magic as a dependency.
- Added pagination to DataFrameModel to accelerate loading times.

### Removed

- Removed unused ui module (which contained a copy of easygui) and german
translations.
- Removed packaged libmagic library due to version conflicts.
- Removed unused ui module (which contained a copy of easygui) and german
translations.
- Removed packaged libmagic library due to version conflicts.

### Fixed

- Fixed incorrect use of Pandas ix method which read wrong table rows.
- Fixed reference to pandasqt in MANIFEST.in which caused crash.
- Fixed various bugs with use of QVariant v2 API, which is not default for
Python 2.
- Fixed bugs with comparison of QStrings to Python strings.
- Fixed incorrect format (python 3) for validator return value in remove column
dialog of a DataTable widget.
- Fixed various depreciated pandas API issues.

- Fixed incorrect use of Pandas ix method which read wrong table rows.
- Fixed reference to pandasqt in MANIFEST.in which caused crash.
- Fixed various bugs with use of QVariant v2 API, which is not default for
Python 2.
- Fixed bugs with comparison of QStrings to Python strings.
- Fixed incorrect format (python 3) for validator return value in remove
column dialog of a DataTable widget.
- Fixed various depreciated pandas API issues.

## [0.9.0] - 2017-02-23

### Added

- Initial import of pandas-qt from SETIS.
- Initial import of pandas-qt from SETIS.

### Changed

- Changed package name to dtocean-qt.

- Changed package name to dtocean-qt.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![appveyor](https://ci.appveyor.com/api/projects/status/github/DTOcean/dtocean-qt?branch=master&svg=true)](https://ci.appveyor.com/project/DTOcean/dtocean-qt)
[![codecov](https://codecov.io/gh/DTOcean/dtocean-qt/branch/master/graph/badge.svg)](https://codecov.io/gh/DTOcean/dtocean-qt)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d1e19e7a286a4e76a90d19b021bc9aca)](https://www.codacy.com/project/H0R5E/dtocean-qt/dashboard?utm_source=github.com&utm_medium=referral&utm_content=DTOcean/dtocean-qt&utm_campaign=Badge_Grade_Dashboard&branchId=11757312)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/7349c8189d9d4466a46cb8dffd94d418)](https://www.codacy.com/gh/DTOcean/dtocean-qt/dashboard?utm_source=github.com&utm_medium=referral&utm_content=DTOcean/dtocean-qt&utm_campaign=Badge_Grade)
[![release](https://img.shields.io/github/release/DTOcean/dtocean-qt.svg)](https://github.com/DTOcean/dtocean-qt/releases/latest)

# dtocean-qt
Expand All @@ -9,7 +9,7 @@ Utilities to use pandas (the data analysis / manipulation library for Python)
with Qt within the DTOcean software suite. This package is a dependency of
[dtocean-app](https://github.com/DTOcean/dtocean-app).

* For python 2.7 only.
\* For python 2.7 only.

## Installation

Expand All @@ -30,7 +30,7 @@ Conda can be used to install dependencies into a dedicated environment from
the source code root directory:

```
$ conda create -n _dtocean_qt python=2.7 pip
$ conda create -n _dtocean_qt python=2.7 pip pyyaml
```

Activate the environment, then copy the `.condrc` file to store installation
Expand Down Expand Up @@ -69,8 +69,7 @@ $ conda activate _dtocean_qt
Install packages required for testing to the environment (one time only):

```
$ conda install -y pytest
$ conda install -y -c conda-forge pytest-qt
$ conda install -y -c conda-forge "pytest<4" pytest-qt
```

Run the tests:
Expand Down
17 changes: 4 additions & 13 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@
# general configuration #
#---------------------------------#

# Build only for commits to certain locations
only_commits:
files:
- dtocean_qt/
- tests/
- setup.py

# version format
version: 0.10.0.build{build}
version: 0.10.1.build{build}

environment:
matrix:
Expand All @@ -27,7 +20,6 @@ environment:
MINICONDA: C:\Miniconda-x64
ARCH: "64"


init:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) # RDP
- "ECHO %PYTHON_VERSION% %MINICONDA%"
Expand All @@ -37,13 +29,12 @@ install:
- conda config --set always_yes yes --set changeps1 no
- conda update --quiet conda
- conda info --all
- conda create -n _dtocean_qt python=%PYTHON_VERSION% pip
- conda create -n _dtocean_qt python=%PYTHON_VERSION% pip pyyaml
- activate _dtocean_qt
- copy .condarc %CONDA_PREFIX%
- conda install --file requirements-conda-dev.txt
- pip install -e .
- conda install pytest pytest-cov
- conda install -c conda-forge pytest-qt
- conda install -c conda-forge "pytest<4" pytest-qt pytest-cov

build: off

Expand All @@ -52,4 +43,4 @@ test_script:

after_test:
- pip install codecov
- codecov
- codecov
3 changes: 0 additions & 3 deletions dtocean_qt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# -*- coding: utf-8 -*-

__build__ = '0.10.0-0'
__version__ = '0.10.0'
2 changes: 1 addition & 1 deletion requirements-conda-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# REQUIREMENTS FOR CONDA INSTALLATION (EXCLUDING DTOCEAN PACKAGES)
easygui
pandas
pandas >=0.23
python-magic
pyqt <5
setuptools
53 changes: 25 additions & 28 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@

from __future__ import print_function

import io
import os
import re
import sys

import yaml
from setuptools import setup
from setuptools.command.test import test as TestCommand

here = os.path.abspath(os.path.dirname(__file__))

version_file = open(os.path.join(here, 'dtocean_qt', '__init__.py'), 'rU')
__version__ = re.sub(
r".*\b__version__\s+=\s+'([^']+)'.*",
r'\1',
[line.strip() for line in version_file if '__version__' in line].pop(0)
)
version_file.close()


def read(*filenames, **kwargs):
encoding = kwargs.get('encoding', 'utf-8')
sep = kwargs.get('sep', '\n')
buf = []
for filename in filenames:
with io.open(filename, encoding=encoding) as f:
buf.append(f.read())
return sep.join(buf)


class PyTest(TestCommand):
def finalize_options(self):
Expand All @@ -40,17 +17,37 @@ def run_tests(self):
errcode = pytest.main(self.test_args)
sys.exit(errcode)


def read_yaml(rel_path):
with open(rel_path, 'r') as stream:
data_loaded = yaml.safe_load(stream)
return data_loaded


def get_appveyor_version():

data = read_yaml("appveyor.yml")

if "version" not in data:
raise RuntimeError("Unable to find version string.")

appveyor_version = data["version"]
last_dot_idx = appveyor_version.rindex(".")

return appveyor_version[:last_dot_idx]


setup(
name='dtocean-qt',
version=__version__,
version=get_appveyor_version(),
license='MIT License',
maintainer='Mathew Topper',
maintainer_email='mathew.topper@dataonlygreater.com',
description=('Utilities to use pandas (the data analysis / manipulation '
'library for Python) with Qt.'),
packages=['dtocean_qt'],
install_requires=['easygui',
'pandas',
'pandas>=0.23',
# 'PyQt4',
'python-magic',
# 'sip'
Expand All @@ -71,4 +68,4 @@ def run_tests(self):
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: User Interfaces'
]
)
)

0 comments on commit 0755e5e

Please sign in to comment.