Skip to content

Commit

Permalink
fix: use pip-tools to generate requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdur-rahmaanJ committed Apr 11, 2022
1 parent c6e4665 commit 43fe1a9
Show file tree
Hide file tree
Showing 13 changed files with 542 additions and 91 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:
cd /home/flaskuser/traveller
git pull
source venv/bin/activate
pip install -r requirements.txt
pip install -r dev_requirements.txt
pip install -r requirements/dev.txt
cd traveller/
python manage.py db migrate
python manage.py db upgrade
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
- {name: Linux, python: '3.9', os: ubuntu-latest, tox: py39}
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand All @@ -42,7 +41,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements.txt') }}|${{ hashFiles('dev_requirements.txt') }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/reqs.txt') }}|${{ hashFiles('requirements/dev.txt') }}
- run: pip install tox codecov
- run: tox -e py
- name: Upload coverage to Codecov
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,9 @@ Activate it

Install requirements.txt

```bash
$ python -m pip install -r requirements.txt
```

You may also want to install dev_requirements.txt

```bash
$ python -m pip install -r dev_requirements.txt
$ python -m pip install -r requirements/dev.txt
```

We are using MySQL but you can have a stab at a different db.
Expand Down Expand Up @@ -116,7 +111,7 @@ Now in traveller/traveller run:
$ python manage.py initialise
```

Then, to get development example data (make sure requirements in dev_requirements.txt are installed)
Then, to get development example data (make sure requirements in requirements/dev.txt are installed)

```bash
$ flask seed dev
Expand Down
17 changes: 0 additions & 17 deletions dev_requirements.txt

This file was deleted.

53 changes: 0 additions & 53 deletions requirements.txt

This file was deleted.

35 changes: 35 additions & 0 deletions requirements/dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Faker
flake8
black
isort
Sphinx
pytest
pytest-order
tox
pytest-cov
codecov
factory-boy
freezegun
pytest-dotenv
text-unidecode
myst-parser
sphinx_rtd_theme
Faker
Flask
Flask-Admin
Flask-Login
flask-mailman
flask-marshmallow
Flask-Migrate
Flask-Reuploaded
Flask-SQLAlchemy
Flask-WTF
icalendar
shopyo==4.4.2
marshmallow-sqlalchemy
PyMySQL
pytz==2022.1
WTForms-Alchemy==0.18.0
python-dateutil
python-editor
pip-tools==6.6.0
Loading

0 comments on commit 43fe1a9

Please sign in to comment.