-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CIVIS-2313] MAINT update dependencies, prep for v2.1.0 release (#55)
* MAINT switch from TravisCI to CircleCI; update dependency versions * MAINT use Python 3.10.4 * MAINT Python 3.10 images need to install git * MAINT pin tornado for Python 3.10 * MAINT update changelog * MAINT update changelog * MAINT update changelog
- Loading branch information
1 parent
16e3fb8
commit c83aeac
Showing
15 changed files
with
181 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
version: 2.1 | ||
|
||
jobs: | ||
pre-build: | ||
description: A check that doesn't need every supported Python version (e.g., code style checks) | ||
parameters: | ||
command-run: | ||
type: string | ||
docker: | ||
# Pick the highest Python 3.x version that this project is known to support | ||
- image: cimg/python:3.10 | ||
steps: | ||
- checkout | ||
- run: | ||
working_directory: ~/project/ | ||
command: << parameters.command-run >> | ||
|
||
build-python: | ||
parameters: | ||
python-version: | ||
type: string | ||
docker: | ||
- image: cimg/python:<< parameters.python-version >> | ||
steps: | ||
- checkout | ||
- run: | ||
# Test that we can build a source distribution that can correctly | ||
# install from clean slate. | ||
name: Build source distribution and install package from it | ||
working_directory: ~/project/ | ||
command: | | ||
pip install --progress-bar off --upgrade pip setuptools build && \ | ||
python -m build && \ | ||
pip install dist/`ls dist/ | grep .whl` | ||
- run: | ||
name: Install the full development requirements | ||
working_directory: ~/project/ | ||
command: pip install --progress-bar off -r dev-requirements.txt | ||
- run: | ||
name: Show installed Python packages | ||
command: pip list -v | ||
- run: | ||
name: Run python tests | ||
working_directory: ~/ | ||
# Avoid being able to import the package by relative import. | ||
# Test code by importing the *installed* package in site-packages. | ||
command: | | ||
pytest -vv --durations=0 --junitxml=/tmp/testxml/report.xml project/civis_jupyter_notebooks | ||
- store_test_results: | ||
path: /tmp/testxml/ | ||
- setup_remote_docker | ||
- run: | ||
name: Test Docker image build | ||
working_directory: ~/project/ | ||
command: | | ||
if [ << parameters.python-version >> = 3.10 ] | ||
then | ||
./tests/run_docker_tests.sh tests/Dockerfile | ||
fi | ||
workflows: | ||
version: 2 | ||
build-and-test: | ||
jobs: | ||
- pre-build: | ||
name: flake8 | ||
command-run: | | ||
pip install -r dev-requirements.txt && \ | ||
flake8 civis_jupyter_notebooks | ||
- pre-build: | ||
name: twine | ||
command-run: | | ||
pip install --upgrade twine build && \ | ||
python -m build && \ | ||
twine check dist/`ls dist/ | grep .tar.gz` && \ | ||
twine check dist/`ls dist/ | grep .whl` | ||
- pre-build: | ||
name: safety | ||
command-run: | | ||
pip install -e . && \ | ||
pip install --upgrade safety && \ | ||
safety --version && \ | ||
safety check | ||
- pre-build: | ||
name: bandit | ||
command-run: | | ||
pip install --upgrade bandit && \ | ||
bandit --version && \ | ||
bandit -r civis_jupyter_notebooks -x civis_jupyter_notebooks/tests | ||
- build-python: | ||
requires: | ||
- flake8 | ||
- twine | ||
- safety | ||
- bandit | ||
matrix: | ||
parameters: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
try: | ||
from importlib.metadata import version | ||
except ModuleNotFoundError: | ||
# For Python 3.7 | ||
from importlib_metadata import version | ||
|
||
|
||
__version__ = version("civis-jupyter-notebook") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
import re | ||
|
||
import civis_jupyter_notebooks | ||
|
||
|
||
_REPO_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) | ||
|
||
|
||
def test_version_number_match_with_changelog(): | ||
"""__version__ and CHANGELOG.md match for the latest version number.""" | ||
changelog = open(os.path.join(_REPO_DIR, 'CHANGELOG.md')).read() | ||
version_in_changelog = ( | ||
re.search(r'##\s+\[(\d+\.\d+\.\d+)\]', changelog).groups()[0]) | ||
assert civis_jupyter_notebooks.__version__ == version_in_changelog, ( | ||
'Make sure both __version__ and CHANGELOG are updated to match the ' | ||
'latest version number') |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
pytest~=3.2 | ||
flake8~=3.0 | ||
pytest==7.0.1 | ||
flake8==4.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
civis~=1.9 | ||
requests~=2.18 | ||
click~=6.7 | ||
jupyter-core~=4.6.0 | ||
notebook==6.0.0 | ||
tornado<6 | ||
civis-jupyter-extensions~=1.0 | ||
GitPython~=2.1 | ||
civis>=1.9 | ||
requests>=2.18 | ||
click>=6.7 | ||
jupyter-core>=4.6.0 | ||
notebook>=6.4.1 | ||
tornado>=6.1.0 | ||
civis-jupyter-extensions>=1.1.0 | ||
GitPython>=2.1 | ||
importlib-metadata >= 1.0 ; python_version < '3.8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,19 +7,17 @@ def read(fname): | |
return _in.read() | ||
|
||
|
||
__version__ = None | ||
exec(read('civis_jupyter_notebooks/version.py')) | ||
|
||
setup( | ||
name="civis-jupyter-notebook", | ||
version=__version__, | ||
version="2.1.0", | ||
author="Civis Analytics Inc", | ||
author_email="[email protected]", | ||
url="https://www.civisanalytics.com", | ||
description=("A tool for building Docker images for Civis " | ||
"Platform Jupyter notebooks."), | ||
packages=find_packages(), | ||
long_description=read('README.rst'), | ||
long_description_content_type="text/x-rst", | ||
include_package_data=True, | ||
license="BSD-3", | ||
install_requires=read('requirements.txt').strip().split('\n'), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters