Skip to content

Commit c470334

Browse files
authored
Maintenance (#1611)
Signed-off-by: tdruez <[email protected]>
1 parent 9cf22e0 commit c470334

18 files changed

+86
-26
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ Changelog
44
v34.9.6 (unreleased)
55
--------------------
66

7+
- Rename the ``docker``, ``docker_windows``, and ``root_filesystem`` modules to
8+
``analyze_docker``, ``analyze_docker_windows``, and ``analyze_root_filesystem``
9+
for consistency.
10+
711
- Refine and document the Webhook system
812
https://github.com/aboutcode-org/scancode.io/issues/1587
913
* Add UI to add/delete Webhooks from the project settings
10-
* Add a new `add-webhook` management command
11-
* Add a `add_webhook` REST API action
12-
* Add a new `SCANCODEIO_GLOBAL_WEBHOOK` setting
14+
* Add a new ``add-webhook`` management command
15+
* Add a ``add_webhook`` REST API action
16+
* Add a new ``SCANCODEIO_GLOBAL_WEBHOOK`` setting
1317
* Add a new chapter dedicated to Webhooks management in the documentation
1418
* Add support for custom payload dedicated to Slack webhooks
1519

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
command: wait-for-it --strict --timeout=60 db:5432 -- sh -c "
2323
./manage.py migrate &&
2424
./manage.py collectstatic --no-input --verbosity 0 --clear &&
25-
gunicorn scancodeio.wsgi:application --bind :8000 --timeout 600 --workers 8 ${GUNICORN_RELOAD_FLAG}"
25+
gunicorn scancodeio.wsgi:application --bind :8000 --timeout 600 --workers 8 ${GUNICORN_RELOAD_FLAG:-}"
2626
env_file:
2727
- docker.env
2828
expose:

docs/built-in-pipelines.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ Pipeline Base Class
2626

2727
Analyse Docker Image
2828
--------------------
29-
.. autoclass:: scanpipe.pipelines.docker.Docker()
29+
.. autoclass:: scanpipe.pipelines.analyze_docker.Docker()
3030
:members:
3131
:member-order: bysource
3232

3333
.. _pipeline_analyze_root_filesystem:
3434

3535
Analyze Root Filesystem or VM Image
3636
-----------------------------------
37-
.. autoclass:: scanpipe.pipelines.root_filesystem.RootFS()
37+
.. autoclass:: scanpipe.pipelines.analyze_root_filesystem.RootFS()
3838
:members:
3939
:member-order: bysource
4040

4141
.. _analyze_windows_docker_image:
4242

4343
Analyse Docker Windows Image
4444
----------------------------
45-
.. autoclass:: scanpipe.pipelines.docker_windows.DockerWindows()
45+
.. autoclass:: scanpipe.pipelines.analyze_docker_windows.DockerWindows()
4646
:members:
4747
:member-order: bysource
4848

scancodeio/settings.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,25 @@
2929
PROJECT_DIR = environ.Path(__file__) - 1
3030
ROOT_DIR = PROJECT_DIR - 1
3131

32+
# True if running tests through `./manage test`
33+
IS_TESTS = "test" in sys.argv
34+
3235
# Environment
3336

3437
ENV_FILE = "/etc/scancodeio/.env"
3538
if not Path(ENV_FILE).exists():
3639
ENV_FILE = ROOT_DIR(".env")
3740

41+
# Do not use local .env environment when running the tests.
42+
if IS_TESTS:
43+
ENV_FILE = None
44+
3845
env = environ.Env()
3946
environ.Env.read_env(ENV_FILE)
4047

4148
# Security
4249

43-
SECRET_KEY = env.str("SECRET_KEY")
50+
SECRET_KEY = env.str("SECRET_KEY", default="")
4451

4552
ALLOWED_HOSTS = env.list(
4653
"ALLOWED_HOSTS",
@@ -189,7 +196,6 @@
189196
"rest_framework.authtoken",
190197
"django_rq",
191198
"django_probes",
192-
"fontawesomefree",
193199
"taggit",
194200
]
195201

@@ -277,19 +283,17 @@
277283

278284
# Testing
279285

280-
# True if running tests through `./manage test`
281-
IS_TESTS = "test" in sys.argv
282-
283286
if IS_TESTS:
287+
from django.core.management.utils import get_random_secret_key
288+
289+
SECRET_KEY = get_random_secret_key()
284290
# Do not pollute the workspace while running the tests.
285291
SCANCODEIO_WORKSPACE_LOCATION = tempfile.mkdtemp()
286292
SCANCODEIO_REQUIRE_AUTHENTICATION = True
287293
SCANCODEIO_SCAN_FILE_TIMEOUT = 120
288294
# The default password hasher is rather slow by design.
289295
# Using a faster hashing algorithm in the testing context to speed up the run.
290-
PASSWORD_HASHERS = [
291-
"django.contrib.auth.hashers.MD5PasswordHasher",
292-
]
296+
PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"]
293297

294298
# Debug toolbar
295299

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
about_resource: fontawesome-6.7.2
2+
name: fontawesome-free
3+
version: 6.7.2
4+
download_url: https://use.fontawesome.com/releases/v6.7.2/fontawesome-free-6.7.2-web.zip
5+
description: The iconic SVG, font, and CSS toolkit
6+
homepage_url: https://fontawesome.com/
7+
package_url: pkg:generic/[email protected]
8+
license_expression: mit AND ofl-1.1 AND cc-by-4.0
9+
attribute: yes

scancodeio/static/fontawesome-6.7.2/all.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scancodeio/static/fontawesome-6.7.2/brands.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scancodeio/static/fontawesome-6.7.2/conflict-detection.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scancodeio/static/fontawesome-6.7.2/fontawesome.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scancodeio/static/fontawesome-6.7.2/regular.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)