Skip to content

Commit 6dd774b

Browse files
committed
Refactor README.md to be able to host more projects metrics
1 parent 5f1165f commit 6dd774b

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

README.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@
1111
The software is recognized by the [Digital Public Good Alliance](https://digitalpublicgoods.net) as a [Digital Public Good](https://app.digitalpublicgoods.net/a/11113).
1212

1313
## Continuous integration and testing
14-
| Branch | Build Status | Test Status | Quality | Coverage | Documentation
15-
| :---: | :---: | :---: | :---: | :---: | :---: |
16-
| [stable](https://github.com/globaleaks/globaleaks-whistleblowing-software/tree/stable) | [![build workflow](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/build.yml/badge.svg?branch=stable)](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/build.yml?query=branch%3Astable) | [![build workflow](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test.yml/badge.svg?branch=stable)](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test.yml?query=branch%3Astable) | [![Codacy Badge](https://app.codacy.com/project/badge/Grade/c09f1ec9607f4546924d19798a98dd7d?branch=stable)](https://app.codacy.com/gh/globaleaks/globaleaks-whistleblowing-software/dashboard) | [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/c09f1ec9607f4546924d19798a98dd7d?branch=stable)](https://app.codacy.com/gh/globaleaks/globaleaks-whistleblowing-software/dashboard) | [![Build Status](https://readthedocs.org/projects/globaleaks/badge/?version=stable&style=flat)](https://docs.globaleaks.org/en/stable/)
17-
| [devel](https://github.com/globaleaks/globaleaks-whistleblowing-software/tree/devel) | [![build workflow](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/build.yml/badge.svg?branch=devel)](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/build.yml?query=branch%3Adevel) | [![test workflow](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test.yml/badge.svg?branch=devel)](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test.yml?query=branch%3Adevel) | [![Codacy Badge](https://app.codacy.com/project/badge/Grade/c09f1ec9607f4546924d19798a98dd7d?branch=devel)](https://app.codacy.com/gh/globaleaks/globaleaks-whistleblowing-software/dashboard?branch=devel) | [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/c09f1ec9607f4546924d19798a98dd7d?branch=devel)](https://app.codacy.com/gh/globaleaks/globaleaks-whistleblowing-software/dashboard?branch=devel) | [![Build Status](https://readthedocs.org/projects/globaleaks/badge/?version=devel&style=flat)](https://docs.globaleaks.org/en/devel/)
18-
19-
Project best practices and scores:
14+
| Metric | [Stable branch](https://github.com/globaleaks/globaleaks-whistleblowing-software/tree/stable) | [Devel branch](https://github.com/globaleaks/globaleaks-whistleblowing-software/tree/devel) |
15+
| :---- | :---- | :---- |
16+
| Build Status | [![build workflow](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/build.yml/badge.svg?branch=stable)](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/build.yml?query=branch%3Astable) | [![build workflow](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/build.yml/badge.svg?branch=devel)](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/build.yml?query=branch%3Adevel) |
17+
| Tests (Backend) | [![build workflow](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test-backend.yml/badge.svg?branch=stable)](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test-backend.yml?query=branch%3Astable) | [![build workflow](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test-backend.yml/badge.svg?branch=devel)](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test-backend.yml?query=branch%3Adevel) |
18+
| Tests (Client) | [![build workflow](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test-client.yml/badge.svg?branch=stable)](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test-client.yml?query=branch%3Astable) | [![build workflow](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test-client.yml/badge.svg?branch=devel)](https://github.com/globaleaks/globaleaks-whistleblowing-software/actions/workflows/test-client.yml?query=branch%3Adevel) |
19+
| Tests Coverage | [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/c09f1ec9607f4546924d19798a98dd7d?branch=stable)](https://app.codacy.com/gh/globaleaks/globaleaks-whistleblowing-software/dashboard) | [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/c09f1ec9607f4546924d19798a98dd7d?branch=devel)](https://app.codacy.com/gh/globaleaks/globaleaks-whistleblowing-software/dashboard) |
20+
| Code Quality | [![Codacy Badge](https://app.codacy.com/project/badge/Grade/c09f1ec9607f4546924d19798a98dd7d?branch=stable)](https://app.codacy.com/gh/globaleaks/globaleaks-whistleblowing-software/dashboard) | [![Codacy Badge](https://app.codacy.com/project/badge/Grade/c09f1ec9607f4546924d19798a98dd7d?branch=devel)](https://app.codacy.com/gh/globaleaks/globaleaks-whistleblowing-software/dashboard) |
21+
| Documentation | [![Build Status](https://readthedocs.org/projects/globaleaks/badge/?version=stable&style=flat)](https://docs.globaleaks.org/en/stable/) | [![Build Status](https://readthedocs.org/projects/globaleaks/badge/?version=devel&style=flat)](https://docs.globaleaks.org/en/devel/) |
22+
23+
## Project best practices and scores
2024
| Metric | Score
21-
| :---: | :---: |
25+
| :---- | :---- |
2226
| [OpenSSF Scorecard](https://scorecard.dev/) | [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/globaleaks/globaleaks-whistleblowing-software/badge)](https://scorecard.dev/viewer/?uri=github.com/globaleaks/globaleaks-whistleblowing-software)
2327
| [OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/) | [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3816/badge)](https://bestpractices.coreinfrastructure.org/projects/3816)
2428
| [MDN HTTP Observatory](https://developer.mozilla.org/en-US/observatory/analyze?host=try.globaleaks.org) | ![Status](https://img.shields.io/badge/observatory-A%2B-brightgreen)

backend/globaleaks/settings.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
this_directory = os.path.dirname(__file__)
99

1010
possible_client_paths = [
11-
os.path.abspath(os.path.join(this_directory, '../../client/build/')),
12-
'/usr/share/globaleaks/client'
11+
'/usr/share/globaleaks/client',
12+
os.path.abspath(os.path.join(this_directory, '../../client/build/'))
1313
]
1414

1515

@@ -98,14 +98,16 @@ def eval_paths(self):
9898
self.accesslogfile = os.path.abspath(os.path.join(self.log_path, "access.log"))
9999

100100
# Client path detection
101+
client_found=False
102+
self.client_path = possible_client_paths[0]
101103
for path in possible_client_paths:
102104
if os.path.isfile(os.path.join(path, 'index.html')):
103105
self.client_path = path
106+
client_found=True
104107
break
105108

106-
if self.client_path is None:
109+
if not client_found:
107110
print("Unable to find a directory to load the client from")
108-
sys.exit(1)
109111

110112
self.appdata_file = os.path.join(self.client_path, 'data/appdata.json')
111113
self.questionnaires_path = os.path.join(self.client_path, 'data/questionnaires')

0 commit comments

Comments
 (0)