Skip to content

Commit 0b5871f

Browse files
acheived higher coverage for components fixed typos
1 parent 59b6d2b commit 0b5871f

File tree

124 files changed

+1578
-949
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+1578
-949
lines changed

app/eventyay/eventyay_common/tasks.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,20 +168,18 @@ def collect_billing_invoice(
168168
invoice_voucher: Optional[InvoiceVoucher],
169169
) -> CollectBillingResponse:
170170
"""
171-
Collect billing data for an event on a monthly basis. This function
172-
checks if a billing invoice already exists for the given event and
171+
Collect billing data for an event on a monthly basis.
172+
173+
This function checks if a billing invoice already exists for the given event and
173174
month. If not, it checks if there were any paid orders in the last
174175
month, and if there were, it calculates the total amount and ticket
175176
fee for the last month and creates a new billing invoice.
176177
177-
@param event: The event for which to collect billing data.
178-
@param last_month_date: The date of the last month for which to collect
179-
billing data.
180-
@param ticket_rate: The rate of the ticket fee as a decimal.
181-
@param invoice_voucher: The voucher for which to calculate the ticket fee
182-
discount.
183-
184-
@return: A CollectBillingResponse object containing a boolean value
178+
:param event: The event for which to collect billing data.
179+
:param last_month_date: The date of the last month for which to collect billing data.
180+
:param ticket_rate: The rate of the ticket fee as a decimal.
181+
:param invoice_voucher: The voucher for which to calculate the ticket fee discount.
182+
:return: A CollectBillingResponse object containing a boolean value
185183
indicating whether the billing invoice was created successfully and a
186184
decimal value indicating the voucher discount.
187185
"""

doc/admin/config.rst

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ the following order. The file that is found *last* will override the settings fr
1111
the files found before.
1212

1313
1. ``PRETIX_CONFIG_FILE`` environment variable
14-
2. ``/etc/eventyay/Eventyay.cfg``
14+
2. ``/etc/eventyay/eventyay.cfg``
1515
3. ``~/.Eventyay.cfg``
16-
4. ``Eventyay.cfg`` in the current working directory
16+
4. ``eventyay.cfg`` in the current working directory
1717

1818
The file is expected to be in the INI format as specified in the `Python documentation`_.
1919

@@ -23,7 +23,7 @@ installation tutorials.
2323

2424
.. note::
2525

26-
The configuration file is the recommended way to configure Eventyay. However, you can
26+
The configuration file is the recommended way to configure eventyay. However, you can
2727
also set them through environment variables. In this case, the syntax is
2828
``PRETIX_SECTION_CONFIG``. For example, to configure the setting ``password_reset``
2929
from the ``[Eventyay]`` section, set ``PRETIX_PRETIX_PASSWORD_RESET=off`` in your
@@ -64,7 +64,7 @@ Example::
6464
Defaults to an empty string.
6565

6666
``auth_backends``
67-
A comma-separated list of available auth backends. Defaults to ``Eventyay.base.auth.NativeAuthBackend``.
67+
A comma-separated list of available auth backends. Defaults to ``eventyay.base.auth.NativeAuthBackend``.
6868

6969
``cookie_domain``
7070
The cookie domain to be set. Defaults to ``None``.
@@ -79,7 +79,7 @@ Example::
7979
Enables or disables the "keep me logged in" button. Defaults to ``on``.
8080

8181
``ecb_rates``
82-
By default, Eventyay periodically downloads a XML file from the European Central Bank to retrieve exchange rates
82+
By default, eventyay periodically downloads a XML file from the European Central Bank to retrieve exchange rates
8383
that are used to print tax amounts in the customer currency on invoices for some currencies. Set to ``off`` to
8484
disable this feature. Defaults to ``on``.
8585

@@ -88,7 +88,7 @@ Example::
8888
Defaults to ``off``.
8989

9090
``obligatory_2fa``
91-
Enables or disables obligatory usage of Two-Factor Authentication for users of the Eventyay backend.
91+
Enables or disables obligatory usage of Two-Factor Authentication for users of the eventyay backend.
9292
Defaults to ``False``
9393

9494
``trust_x_forwarded_for``
@@ -105,8 +105,8 @@ Example::
105105
Log violations of the Content Security Policy (CSP). Defaults to ``on``.
106106

107107
``csp_additional_header``
108-
Specifies a CSP header that will be **merged** with Eventyay's default header. For example, if you set this
109-
to ``script-src https://mycdn.com``, Eventyay will add ``https://mycdn.com`` as an **additional** allowed source
108+
Specifies a CSP header that will be **merged** with eventyay's default header. For example, if you set this
109+
to ``script-src https://mycdn.com``, eventyay will add ``https://mycdn.com`` as an **additional** allowed source
110110
to all CSP headers. Empty by default.
111111

112112
``loglevel``
@@ -134,8 +134,8 @@ Example::
134134

135135
[database]
136136
backend=postgresql
137-
name=Eventyay
138-
user=Eventyay
137+
name=eventyay
138+
user=eventyay
139139
password=abcd
140140
host=localhost
141141
port=3306
@@ -156,11 +156,11 @@ Example::
156156
Database replica settings
157157
-------------------------
158158

159-
If you use a replicated database setup, Eventyay expects that the default database connection always points to the primary database node.
159+
If you use a replicated database setup, eventyay expects that the default database connection always points to the primary database node.
160160
Routing read queries to a replica on database layer is **strongly** discouraged since this can lead to inaccurate such as more tickets
161161
being sold than are actually available.
162162

163-
However, Eventyay can still make use of a database replica to keep some expensive queries with that can tolerate some latency from your
163+
However, eventyay can still make use of a database replica to keep some expensive queries with that can tolerate some latency from your
164164
primary database, such as backend search queries. The ``replica`` configuration section can have the same settings as the ``database``
165165
section (except for the ``backend`` setting) and will default back to the ``database`` settings for all values that are not given. This
166166
way, you just need to specify the settings that are different for the replica.
@@ -199,7 +199,7 @@ Example::
199199
[mail]
200200
from=hello@localhost
201201
host=127.0.0.71
202-
user=Eventyay
202+
user=eventyay
203203
password=foobar
204204
port=1025
205205
tls=on
@@ -213,13 +213,13 @@ Example::
213213

214214
``from``
215215
The email address to set as ``From`` header in outgoing emails by the system.
216-
Default: ``Eventyay@localhost``
216+
Default: ``eventyay@localhost``
217217

218218
``tls``, ``ssl``
219219
Use STARTTLS or SSL for the SMTP connection. Off by default.
220220

221221
``admins``
222-
Comma-separated list of email addresses that should receive a report about every error code 500 thrown by Eventyay.
222+
Comma-separated list of email addresses that should receive a report about every error code 500 thrown by eventyay.
223223

224224
.. _`django-settings`:
225225

@@ -234,7 +234,7 @@ Example::
234234

235235
``secret``
236236
The secret to be used by Django for signing and verification purposes. If this
237-
setting is not provided, Eventyay will generate a random secret on the first start
237+
setting is not provided, eventyay will generate a random secret on the first start
238238
and will store it in the filesystem for later usage.
239239

240240
``debug``
@@ -265,24 +265,24 @@ Currently, metrics-collection requires a redis server to be available.
265265
Memcached
266266
---------
267267

268-
You can use an existing memcached server as Eventyay's caching backend::
268+
You can use an existing memcached server as eventyay's caching backend::
269269

270270
[memcached]
271271
location=127.0.0.1:11211
272272

273273
``location``
274274
The location of memcached, either a host:port combination or a socket file.
275275

276-
If no memcached is configured, Eventyay will use Django's built-in local-memory caching method.
276+
If no memcached is configured, eventyay will use Django's built-in local-memory caching method.
277277

278-
.. note:: If you use memcached and you deploy Eventyay across multiple servers, you should use *one*
278+
.. note:: If you use memcached and you deploy eventyay across multiple servers, you should use *one*
279279
shared memcached instance, not multiple ones, because cache invalidations would not be
280280
propagated otherwise.
281281

282282
Redis
283283
-----
284284

285-
If a redis server is configured, Eventyay can use it for locking, caching and session storage
285+
If a redis server is configured, eventyay can use it for locking, caching and session storage
286286
to speed up various operations::
287287

288288
[redis]
@@ -296,7 +296,7 @@ to speed up various operations::
296296
``session``
297297
When this is set to ``True``, redis will be used as the session storage.
298298

299-
If redis is not configured, Eventyay will store sessions and locks in the database. If memcached
299+
If redis is not configured, eventyay will store sessions and locks in the database. If memcached
300300
is configured, memcached will be used for caching instead of redis.
301301

302302
Translations
@@ -309,18 +309,18 @@ can activate them like this::
309309
[languages]
310310
allow_incubating=pt-br,da
311311

312-
You can also tell Eventyay about additional paths where it will search for translations::
312+
You can also tell eventyay about additional paths where it will search for translations::
313313

314314
[languages]
315315
path=/path/to/my/translations
316316

317-
For a given language (e.g. ``pt-br``), Eventyay will then look in the
317+
For a given language (e.g. ``pt-br``), eventyay will then look in the
318318
specific sub-folder, e.g. ``/path/to/my/translations/pt_BR/LC_MESSAGES/django.po``.
319319

320320
Celery task queue
321321
-----------------
322322

323-
For processing long-running tasks asynchronously, Eventyay requires the celery task queue.
323+
For processing long-running tasks asynchronously, eventyay requires the celery task queue.
324324
For communication between the web server and the task workers in both direction, a messaging
325325
queue and a result backend is needed. You can use a redis database for both directions, or
326326
an AMQP server (e.g. RabbitMQ) as a broker and redis or your database as a result backend::
@@ -349,7 +349,7 @@ application. If you want to use sentry, you need to set a DSN in the configurati
349349
Caching
350350
-------
351351

352-
You can adjust some caching settings to control how much storage Eventyay uses::
352+
You can adjust some caching settings to control how much storage eventyay uses::
353353

354354
[cache]
355355
tickets=48 ; Number of hours tickets (PDF, passbook, …) are cached
@@ -358,7 +358,7 @@ You can adjust some caching settings to control how much storage Eventyay uses::
358358
Secret length
359359
-------------
360360

361-
If you are really paranoid, you can increase the length of random strings Eventyay uses in
361+
If you are really paranoid, you can increase the length of random strings eventyay uses in
362362
various places like order codes, secrets in the ticket QR codes, etc. Example::
363363

364364
[entropy]

doc/admin/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Administrator documentation
44
===========================
55

6-
This documentation is for everyone who wants to install Eventyay on a server.
6+
This documentation is for everyone who wants to install eventyay on a server.
77

88
.. toctree::
99
:maxdepth: 2

doc/admin/indexes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
Additional database indices
22
===========================
33

4-
If you have a large Eventyay database, some features such as search for orders or events might turn pretty slow.
4+
If you have a large eventyay database, some features such as search for orders or events might turn pretty slow.
55
For PostgreSQL, we have compiled a list of additional database indexes that you can add to speed things up.
66
Just like any index, they in turn make write operations insignificantly slower and cause the database to use
77
more disk space.
88

9-
The indexes aren't automatically created by Eventyay since Django does not allow us to do so only on PostgreSQL
9+
The indexes aren't automatically created by eventyay since Django does not allow us to do so only on PostgreSQL
1010
(and they won't work on other databases). Also, they're really not necessary if you're not having tens of
1111
thousands of records in your database.
1212

13-
However, this also means they won't automatically adapt if some of the referred fields change in future updates of Eventyay
13+
However, this also means they won't automatically adapt if some of the referred fields change in future updates of eventyay
1414
and you might need to re-check this page and change them manually.
1515

1616
Here is the currently recommended set of commands::
@@ -66,7 +66,7 @@ Here is the currently recommended set of commands::
6666
ON public.eventyaybase_voucher (upper((code)::text));
6767

6868

69-
Also, if you use our ``Eventyay-shipping`` plugin::
69+
Also, if you use our ``eventyay-shipping`` plugin::
7070

7171
CREATE INDEX CONCURRENTLY eventyay_addidx_sa_name
7272
ON eventyay_shipping_shippingaddress

doc/admin/installation/dev_version.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Installing a development version
44
================================
55

6-
If you want to use a feature of Eventyay that is not yet contained in the last monthly release, you can also
7-
install a development version with Eventyay.
6+
If you want to use a feature of eventyay that is not yet contained in the last monthly release, you can also
7+
install a development version with eventyay.
88

99
.. warning:: When in production, we strongly recommend only installing released versions. Development versions might
1010
be broken, incompatible to plugins, or in rare cases incompatible to upgrade later on.
@@ -13,14 +13,14 @@ install a development version with Eventyay.
1313
Manual installation
1414
-------------------
1515

16-
You can use ``pip`` to update Eventyay directly to the development branch. Then, upgrade as usual::
16+
You can use ``pip`` to update eventyay directly to the development branch. Then, upgrade as usual::
1717

1818
$ source /var/eventyay/venv/bin/activate
19-
(venv)$ pip3 install -U "git+https://github.com/fossasia/eventyay.git#egg=Eventyay&subdirectory=src"
20-
(venv)$ python -m Eventyay migrate
21-
(venv)$ python -m Eventyay rebuild
22-
(venv)$ python -m Eventyay updatestyles
23-
# systemctl restart Eventyay-web Eventyay-worker
19+
(venv)$ pip3 install -U "git+https://github.com/fossasia/eventyay.git#egg=eventyay&subdirectory=src"
20+
(venv)$ python -m eventyay migrate
21+
(venv)$ python -m eventyay rebuild
22+
(venv)$ python -m eventyay updatestyles
23+
# systemctl restart eventyay-web eventyay-worker
2424

2525
Docker installation
2626
-------------------
@@ -30,8 +30,8 @@ To use the latest development version with Docker, first pull it from Docker Hub
3030
$ docker pull fossasia/eventyay-tickets:latest
3131

3232

33-
Then change your ``/etc/systemd/system/Eventyay.service`` file to use the ``:latest`` tag instead of ``:stable`` as well
33+
Then change your ``/etc/systemd/system/eventyay.service`` file to use the ``:latest`` tag instead of ``:stable`` as well
3434
and upgrade as usual::
3535

36-
$ systemctl restart Eventyay.service
37-
$ docker exec -it Eventyay.service Eventyay upgrade
36+
$ systemctl restart eventyay.service
37+
$ docker exec -it eventyay.service eventyay upgrade

0 commit comments

Comments
 (0)