Skip to content

Commit

Permalink
Merge pull request #78 from sbidoul/release1
Browse files Browse the repository at this point in the history
Prepare 1.0
  • Loading branch information
sbidoul authored Sep 27, 2022
2 parents 407f822 + fc2072b commit 151d1a3
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 90 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["2.7", "3.6", "3.9"]
python-version: ["2.7", "3.6", "3.10"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
include:
- os: ubuntu-latest
python-version: "3.7"
- os: ubuntu-latest
python-version: "3.8"
- os: ubuntu-latest
python-version: "3.9"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
Expand Down
7 changes: 6 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
1.0 (2022-09-27)
================

Release 1.0, no feature change.

0.10.1 (2022-09-07)
=================
===================

Deprecations and Removals
-------------------------
Expand Down
39 changes: 15 additions & 24 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ This includes:
- updating the environment with new dependencies as the project evolves,
- uninstalling unused dependencies,
- refreshing dependencies,
- maintaining pinned versions in ``requirements.txt``,
- pinning versions for extras in ``requirements-{extra}.txt``
- maintaining pinned in ``requirements.txt`` lock files,
- pinning versions for extras in ``requirements-{extra}.txt`` lock files,
- displaying installed dependencies as a tree.

A few characteristics of this project:
Expand All @@ -43,7 +43,7 @@ A few characteristics of this project:
- It relies on the documented ``pip`` command line interface and its
ubiquitous `requirements file
format <https://pip.pypa.io/en/stable/user_guide/?highlight=requirements#requirements-files>`__.
- It assumes your project is configured using a PEP 517 compliant build
- It assumes your project is configured using a PEP 517/660 compliant build
backend but otherwise makes no assumption on the specific backend
used.
- It has first class support for dependencies specified as VCS references.
Expand All @@ -52,12 +52,6 @@ A few characteristics of this project:
- It is reasonably small and simple, with good test coverage and is hopefully
easy to maintain.

.. warning::

While ``pip-deepfreeze`` is functional already, this is to be considered as
alpha software for a little while, until we have gathered some feedback on
the CLI options.

Installation
------------

Expand Down Expand Up @@ -87,11 +81,9 @@ Quick start
.. image:: https://raw.githubusercontent.com/sbidoul/pip-deepfreeze/a148bcce2920025a30bcc16cfb6dbc2b9a1ca68d/docs/synopsis.png
:alt: pip-deepfreeze synopsis

Make sure your application declares its direct dependencies using `setuptools
<https://pypi.org/project/setuptools/>`__ (via the ``install_requires`` key in
``setup.py`` or ``setup.cfg``), or any other compliant `PEP 517
<https://www.python.org/dev/peps/pep-0517/>`__ build backend such as `flit
<https://pypi.org/project/flit/>`__.
Make sure your application declares its direct dependencies in `pyproject.toml
<https://packaging.python.org/en/latest/specifications/declaring-project-metadata/>`_,
or any other mechanism supported by your PEP 517/660 compliant build backend.

Create and activate a virtual environment using your favorite tool. Run
``pip list`` to make sure ``pip``, ``setuptools`` and ``wheel`` are installed
Expand Down Expand Up @@ -143,8 +135,8 @@ How to

Creating a new project.

Follow the instructions of your favorite PEP 517 compliant build tool, such
as ``setuptools``, ``flit`` or others. After declaring the first
Follow the instructions of your favorite PEP 517/660 compliant build tool, such
as ``hatch``, ``setuptools``, ``flit`` or others. After declaring the first
dependencies, create and activate a virtualenv, then run ``pip-df sync`` in
the project directory to generate pinned dependencies in
``requirements.txt``.
Expand Down Expand Up @@ -221,13 +213,11 @@ FAQ
What should I put in ``requirements.txt.in``? Should I add all my dependencies
there?

``requirements.txt.in`` is optional. The dependencies of your project must
be declared primarily in ``setup.py`` or ``setup.cfg`` (if you use
``setuptools``), or in ``pyproject.toml`` if you use another PEP 517 build
backend such as ``flit``. ``requirements.txt.in`` may contain additional
constraints if needed, such as version constraints on indirect dependencies
that you don't control, or VCS links for dependencies that you need to
install from VCS source.
``requirements.txt.in`` is optional. The dependencies of your project must be
declared primarily in ``pyproject.toml`` (or the legacy ``setup.py/setup.cfg``).
``requirements.txt.in`` may contain additional constraints if needed, such as version
constraints on indirect dependencies that you don't control, or VCS links for
dependencies that you need to install from VCS source.

I have added a constraint in ``requirements.txt.in`` but ``pip-df sync`` does
not honor it. What is going on?
Expand Down Expand Up @@ -325,7 +315,8 @@ pip-df sync
Usage: pip-df sync [OPTIONS]
Install/update the environment to match the project requirements.
Install/update the environment to match the project requirements, and lock new
dependencies.
Install/reinstall the project. Install/update dependencies to the latest
allowed version according to pinned dependencies in requirements.txt or
Expand Down
51 changes: 49 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,53 @@
[build-system]
requires = ["setuptools>=40.8.0", "wheel", "setuptools_scm[toml]>=3.4"]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "pip-deepfreeze"
description = "A simple pip freeze workflow for Python application developers."
readme = "README.rst"
authors = [{name = "Stéphane Bidoul", email = "stephane.bidoul@gmail.com"}]
license = "MIT"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"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",
]
requires-python = ">=3.6"
dependencies=[
"httpx",
"importlib_resources ; python_version<'3.7'",
"packaging>=20.4",
"toml",
"typer[all]>=0.3.2",
"typing-extensions ; python_version<'3.8'", # for Protocol, TypedDict
]
dynamic = ["version"]

[project.optional-dependencies]
"test" = ["pytest", "pytest-cov", "pytest-xdist", "virtualenv"]
"mypy" = ["mypy==0.800"]

[project.entry-points.console_scripts]
pip-df = "pip_deepfreeze.__main__:main"
pip-deepfreeze = "pip_deepfreeze.__main__:main"

[project.urls]
"Source" = "https://github.com/sbidoul/pip-deepfreeze/"
"Bug Reports" = "https://github.com/sbidoul/pip-deepfreeze/issues"
"Changelog" = "https://github.com/sbidoul/pip-deepfreeze/blob/master/HISTORY.rst"

[tool.hatch.version]
source = "vcs"

[tool.isort]
# see https://github.com/psf/black
Expand Down
4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

58 changes: 0 additions & 58 deletions setup.py

This file was deleted.

0 comments on commit 151d1a3

Please sign in to comment.