Skip to content

Commit

Permalink
Change requirements.txt to requirements-dev.txt and clean up dependen…
Browse files Browse the repository at this point in the history
…cy versioning. (#978)
  • Loading branch information
jadchaar authored May 16, 2021
1 parent 05c1a1a commit 119bb67
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 33 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
Expand All @@ -42,7 +42,7 @@ jobs:
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
Expand All @@ -51,7 +51,7 @@ jobs:
if: startsWith(runner.os, 'Windows')
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
Expand Down Expand Up @@ -85,17 +85,17 @@ jobs:
- uses: actions/checkout@v2

# Set up Python
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: "3.9"

# Configure pip cache
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -20,7 +20,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v2.15.0
rev: v2.16.0
hooks:
- id: pyupgrade
args: [--py36-plus]
Expand All @@ -34,7 +34,7 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/psf/black
rev: 21.5b0
rev: 21.5b1
hooks:
- id: black
args: [--safe, --quiet, --target-version=py36]
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include LICENSE CHANGELOG.rst README.rst Makefile requirements.txt tox.ini
include LICENSE CHANGELOG.rst README.rst Makefile requirements-dev.txt tox.ini
recursive-include tests *.py
recursive-include docs *.py *.rst *.bat Makefile
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: auto test docs clean

auto: build38
auto: build39

build36: PYTHON_VER = python3.6
build37: PYTHON_VER = python3.7
Expand All @@ -11,7 +11,7 @@ build36 build37 build38 build39: clean
$(PYTHON_VER) -m venv venv
. venv/bin/activate; \
pip install -U pip setuptools wheel; \
pip install -r requirements.txt; \
pip install -r requirements-dev.txt; \
pre-commit install

test:
Expand Down
10 changes: 10 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
dateparser==1.*
pre-commit==2.*
pytest==6.*
pytest-cov==2.*
pytest-mock==3.*
python-dateutil==2.*
pytz==2019.*
simplejson==3.*
sphinx==4.*
sphinx-autodoc-typehints==1.*
10 changes: 0 additions & 10 deletions requirements.txt

This file was deleted.

6 changes: 1 addition & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@ warn_unreachable = True
strict_equality = True
no_implicit_reexport = True

##

allow_redefinition = True


# Type annotation for test codes and migration files are not mandatory

# Type annotations for testing code and migration files are not mandatory
[mypy-*.tests.*,tests.*]
ignore_errors = True
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# mypy: ignore-errors
from setuptools import setup
from pathlib import Path

with open("README.rst", encoding="utf-8") as f:
readme = f.read()
from setuptools import setup

readme = Path("README.rst").read_text(encoding="utf-8")
version = Path("arrow/_version.py").read_text(encoding="utf-8")
about = {}
with open("arrow/_version.py", encoding="utf-8") as f:
exec(f.read(), about)
exec(version, about)

setup(
name="arrow",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ python =
3.9: py39

[testenv]
deps = -rrequirements.txt
deps = -rrequirements-dev.txt
allowlist_externals = pytest
commands = pytest

Expand Down

0 comments on commit 119bb67

Please sign in to comment.