Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: remove requirement file #87

Merged
merged 10 commits into from
Jan 4, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install python dev dependencies.
run: |
python -m pip install -U pip --no-cache-dir
python -m pip install -e . -r requirements.txt
. script/bootstrap
- name: Lint
run: invoke lint
- name: Test
Expand Down
18 changes: 0 additions & 18 deletions requirements.in

This file was deleted.

63 changes: 0 additions & 63 deletions requirements.txt

This file was deleted.

13 changes: 6 additions & 7 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
if [[ -z $CI ]]; then
# pyenv update
pyenv install --skip-existing || return
VENV="${PWD##*/}.venv"
test -d $VENV || python3 -m venv $VENV || return
. $VENV/bin/activate
else
if [[ ! -f `pwd`/.python-version ]]; then
echo "You are missing a .python-version file."
Expand All @@ -17,10 +20,6 @@ else
fi
fi

VENV="${PWD##*/}.venv"
test -d $VENV || python3 -m venv $VENV || return
$VENV/bin/pip install -U pip --no-cache-dir
$VENV/bin/pip install -e . -r requirements.txt
$VENV/bin/python -m python_githooks

. $VENV/bin/activate
pip install -U pip --no-cache-dir
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python -m pip install ...

pip install -e . .[dev]
python -m python_githooks
26 changes: 24 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@


python_requires = "~=3.6"
setup_requires = ["setuptools_scm"]
install_requires = ["typing_extensions>=3.6"]
dev_requires = [
"black==19.10b0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with this pinning is that we don't have an easy way to update it. Our pip-tools command had an update flag.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was doing some reading https://snarky.ca/clarifying-pep-518/

"codecov==2.0.15",
"coverage[toml]==5.0.1",
"flake8==3.7.9",
"flake8-bugbear==19.8.0",
"flake8-builtins==1.4.2",
"flake8-comprehensions==3.1.4",
"flake8-i18n==0.1.0",
"invoke==1.3.0",
"isort==4.3.21",
"mypy==0.761",
"pip-tools==4.3.0",
"py-githooks==1.1.0",
"pytest==5.3.2",
"semver==2.9.0",
"twine==3.1.1",
"wheel==0.33.6",
]

if sys.version_info[0] == 2:
raise Exception("Only python 3 supported.")
Expand Down Expand Up @@ -38,9 +59,10 @@ def readme() -> str:
package_dir={"": "src"},
packages=find_packages("./src"),
zip_safe=False,
install_requires=["typing_extensions"],
setup_requires=["setuptools_scm"],
entry_points={"pytest11": ["syrupy = syrupy"]},
extras_require={"dev": dev_requires},
install_requires=install_requires,
setup_requires=setup_requires,
python_requires=python_requires,
classifiers=[
"Development Status :: 1 - Planning",
Expand Down
12 changes: 0 additions & 12 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ def clean(ctx):
ctx.run(f"rm -rf *.egg-info dist build __pycache__ .pytest_cache artifacts/*")


@task
def requirements(ctx, upgrade=False):
"""
Build dev requirements lock file
"""
source = "requirements.in"
args = ["--no-emit-find-links", "--no-index", "--allow-unsafe", "--rebuild"]
if upgrade:
args.append("--upgrade")
ctx.run(f"python -m piptools compile {source} {' '.join(args)}", pty=True)


@task
def lint(ctx, fix=False):
"""
Expand Down