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

Release v0.5 #435

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f2e7452
applying pep8 rules
willianrocha Sep 21, 2023
cebc3f7
Merge pull request #393 from willianrocha/flake8_next
alan-barzilay Sep 27, 2023
d56d5fe
delete unused function "filter_line"
mateuslatrova Sep 18, 2023
6ac4357
fix return type on docs
mateuslatrova Sep 18, 2023
ccf097b
create test for output_requirements
firilisinof Sep 21, 2023
acc41cc
Merge pull request #395 from fredgrub/output_requirements_next
alan-barzilay Oct 4, 2023
3c786e3
add "copy to clipboard icon" in installation section
Sep 29, 2023
ed46d27
add test for "compare_modules" function
Sep 28, 2023
12cc1e5
add test for parse_requirements function
Fernando-crz Sep 21, 2023
2ebfc46
Merge branch 'next' into compare_modules_test
alan-barzilay Oct 10, 2023
6f232bd
Merge pull request #389 from mateuslatrova/compare_modules_test
alan-barzilay Oct 10, 2023
eb65254
Bump wheel from 0.23.0 to 0.38.1
dependabot[bot] Oct 8, 2023
8af7d85
CI: Add Python 3.10 and 3.11, update actions, run on pushes and manually
willianrocha Oct 2, 2023
55eee29
Specify pypy version
Oct 12, 2023
368e9ae
handle FileNotFoundError in parse_requirements function
mateuslatrova Oct 19, 2023
fb4560c
Migrating the packaging system to `poetry` with `pyproject.toml`
firilisinof Oct 21, 2023
f041de9
Bump python 3.12 support
firilisinof Nov 6, 2023
aa283ad
define pipreqs default encoding to utf-8
Fernando-crz Dec 2, 2023
03c9248
suppress errors and warnings in unit tests
Fernando-crz Dec 4, 2023
b50b4a7
Add support for jupyter notebooks
Fernando-crz Dec 4, 2023
de68691
fix flake8 environment in tox.ini file
mateuslatrova Dec 4, 2023
4a9176b
add support for .pyw files
mateuslatrova Dec 6, 2023
769f3e5
Revert "Bump wheel from 0.23.0 to 0.38.1"
alan-barzilay Feb 18, 2024
3a9bc86
Merge branch 'next'
alan-barzilay Feb 18, 2024
64fc5a2
ci: fix 3.12 python tests
alan-barzilay Feb 18, 2024
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
23 changes: 14 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: Tests and Codecov
on: pull_request
on:
push:
pull_request:
workflow_dispatch:

jobs:
run_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, pypy-3.7]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.9-7.3.12']

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -30,21 +34,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage docopt yarg requests
pip install poetry
poetry install --with dev

- name: Calculate coverage
run: coverage run --source=pipreqs -m unittest discover
run: poetry run coverage run --source=pipreqs -m unittest discover

- name: Create XML report
run: coverage xml
run: poetry run coverage xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: coverage.xml
fail_ci_if_error: true
6 changes: 6 additions & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
3.12
3.11
3.10
3.9
3.8
pypy3.9-7.3.12
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python 3.12 3.11 3.10 3.9 3.8 pypy3.9-7.3.12
21 changes: 10 additions & 11 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ Ready to contribute? Here's how to set up `pipreqs` for local development.
2. Clone your fork locally::

$ git clone [email protected]:your_name_here/pipreqs.git
$ cd pipreqs/

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
3. Pipreqs is developed using Poetry. Refer to the `documentation <https://python-poetry.org/docs/>`_ to install Poetry in your local environment. Next, you should install pipreqs's dependencies::

$ mkvirtualenv pipreqs
$ cd pipreqs/
$ python setup.py develop
$ poetry install --with dev

4. Create a branch for local development::

Expand All @@ -76,11 +75,11 @@ Ready to contribute? Here's how to set up `pipreqs` for local development.

5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::

$ flake8 pipreqs tests
$ python setup.py test
$ tox

To get flake8 and tox, just pip install them into your virtualenv.
$ poetry run flake8 pipreqs tests
$ poetry run python -m unittest discover
$ poetry run tox
To test all versions of python using tox you need to have them installed and for this two options are recommended: `pyenv` or `asdf`.

6. Commit your changes and push your branch to GitHub::

Expand All @@ -99,7 +98,7 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 3.7 to 3.11, and PyPy. Check
3. The pull request should work for currently supported Python and PyPy versions. Check
https://travis-ci.org/bndr/pipreqs/pull_requests and make sure that the
tests pass for all supported Python versions.

Expand All @@ -108,4 +107,4 @@ Tips

To run a subset of tests::

$ python -m unittest tests.test_pipreqs
$ poetry run python -m unittest tests.test_pipreqs
13 changes: 0 additions & 13 deletions MANIFEST.in

This file was deleted.

31 changes: 16 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ help:
@echo "clean-pyc - remove Python file artifacts"
@echo "clean-test - remove test and coverage artifacts"
@echo "lint - check style with flake8"
@echo "test - run tests quickly with the default Python"
@echo "test - run tests quickly using the default Python"
@echo "test-all - run tests on every Python version with tox"
@echo "coverage - check code coverage quickly with the default Python"
@echo "docs - generate Sphinx HTML documentation, including API docs"
@echo "release - package and upload a release"
@echo "dist - package"
@echo "install - install the package to the active Python's site-packages"
@echo "publish - package and upload a release"
@echo "publish-to-test - package and upload a release to test-pypi"
@echo "build - build the package"
@echo "install - install the dependencies into the Poetry virtual environment"

clean: clean-build clean-pyc clean-test

Expand All @@ -35,14 +36,13 @@ clean-test:
rm -fr htmlcov/

lint:
flake8 pipreqs tests
poetry run flake8 pipreqs tests

test:
pip install -r requirements.txt
python setup.py test
poetry run python -m unittest discover

test-all:
tox
poetry run tox

coverage:
coverage run --source pipreqs setup.py test
Expand All @@ -58,13 +58,14 @@ docs:
$(MAKE) -C docs html
open docs/_build/html/index.html

release: clean
python setup.py sdist bdist_wheel upload -r pypi
publish: build
poetry publish

dist: clean
python setup.py sdist
python setup.py bdist_wheel
ls -l dist
publish-to-test: build
poetry publish --repository test-pypi

build: clean
poetry build

install: clean
python setup.py install
poetry install --with dev
11 changes: 10 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@
Installation
------------

::
.. code-block:: sh

pip install pipreqs

Obs.: if you don't want support for jupyter notebooks, you can install pipreqs without the dependencies that give support to it.
To do so, run:

.. code-block:: sh

pip install --no-deps pipreqs
pip install yarg==0.1.9 docopt==0.6.2

Usage
-----

Expand Down Expand Up @@ -57,6 +65,7 @@ Usage
<compat> | e.g. Flask~=1.1.2
<gt> | e.g. Flask>=1.1.2
<no-pin> | e.g. Flask
--scan-notebooks Look for imports in jupyter notebook files.

Example
-------
Expand Down
Loading
Loading