Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Puehringer <[email protected]>
  • Loading branch information
lukpueh committed Feb 27, 2024
1 parent 94bdda4 commit a2eadaf
Show file tree
Hide file tree
Showing 12 changed files with 338 additions and 809 deletions.
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ updates:
prefix: "build"
include: "scope"
open-pull-requests-limit: 10


# TODO: update runtime and dev dependencies
37 changes: 0 additions & 37 deletions .github/workflows/update-python-deps.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ repos:
exclude: tests
- repo: local
hooks:
- id: tox-requirements
name: run requirements check from tox
description: Checks if `make requirements` is up-to-date
entry: tox -e requirements
language: system
pass_filenames: false
verbose: true
- id: tox-mypy
name: run typing check from tox
description: Checks typing with `mypy`
Expand Down
1 change: 0 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ sphinx:
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
25 changes: 3 additions & 22 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,37 +128,18 @@ pre-commit tool.
Now ``pre-commit`` will run automatically on ``git commit``.


Running RSTUF CLI
~~~~~~~~~~~~~~~~~

.. code:: shell
$ pip install -e .
.. code:: shell
$ pip install -e .
$ rstuf
Usage: rstuf [OPTIONS] COMMAND [ARGS]...
Repository Service for TUF Command Line Interface (CLI).

How to add new requirements
---------------------------

Install the requirements package.

The flag -d will install the development requirements.
- Add runtime requirements to pyproject.toml.
- Add development requirements to Pipfile. You can use this command

.. code:: shell
$ pipenv install -d <package>
$ pipenv install <package>
Update all project requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Update Pipfile.lock afterwards

.. code:: shell
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ tests:

requirements:
pipenv lock
pipenv requirements > requirements.txt
pipenv requirements --dev > requirements-dev.txt

precommit:
pre-commit install
Expand Down
15 changes: 1 addition & 14 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
rich-click = "*"
securesystemslib = "*"
click = "*"
rich = "*"
auto-click-auto = "*"
PyNaCl = "==1.5.0"
requests = "*"
tuf = "==3.1.0"
dynaconf = {extras = ["yaml"], version = "*"}
isort = "*"
sqlalchemy = "*"
psycopg2 = "*"

[dev-packages]
black = "*"
isort = "*"
Expand All @@ -43,6 +29,7 @@ build = "*"
pre-commit = "*"
bandit = "*"
types-requests = "*"
repository-service-tuf-cli = {editable = true, path = ".", extras=["psycopg2", "sqlalchemy"]}

[requires]
python_version = "3.9"
921 changes: 327 additions & 594 deletions Pipfile.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/requirements.txt

This file was deleted.

88 changes: 0 additions & 88 deletions requirements-dev.txt

This file was deleted.

26 changes: 0 additions & 26 deletions requirements.txt

This file was deleted.

21 changes: 4 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[tox]
isolated_build = true
envlist = py39,py310,py311,lint,typing,requirements,precommit,test
envlist = py39,py310,py311,lint,typing,precommit,test
skipsdist = true

[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt

[testenv:lint]
deps = pre-commit
Expand Down Expand Up @@ -33,16 +31,6 @@ allowlist_externals = coverage
commands =
python -m pytest --cov-report=xml --cov-report=term --cov-config=tox.ini --cov -n auto -vv tests/

[testenv:requirements]
description="Check if `make requirements` is up-to-date."
deps = pipenv
skipsdist=false
allowlist_externals =
bash
commands =
pipenv --version
bash -c 'diff -w requirements.txt <(pipenv requirements)'
bash -c 'diff -w requirements-dev.txt <(pipenv requirements --dev)'

[testenv:precommit]
description="Check if `pre-commit autoupdate` is up-to-date."
Expand All @@ -59,7 +47,6 @@ commands =
bash -c 'rm tmp-tox-precommit.yaml'

[testenv:docs]
deps = -r{toxinidir}/docs/requirements.txt
allowlist_externals =
plantuml
commands =
Expand All @@ -69,6 +56,6 @@ commands =

[gh-actions]
python =
3.9: py39,pep8,lint,typing,requirements,precommit,test,docs
3.10: py310,pep8,lint,typing,requirements,precommit,test,docs
3.11: py311,pep8,lint,typing,requirements,precommit,test,docs
3.9: py39,pep8,lint,typing,precommit,test,docs
3.10: py310,pep8,lint,typing,precommit,test,docs
3.11: py311,pep8,lint,typing,precommit,test,docs

0 comments on commit a2eadaf

Please sign in to comment.