Skip to content

Clarification Changes #9141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 31 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
42d6f41
Updated to include quick note for running locally on windows machines
ncclarke Oct 20, 2024
7d28938
fixed spelling mistakes
ncclarke Oct 20, 2024
1e85664
Chore: Added documentation to sqlite_datetime_fix and its methods.
T2703 Oct 21, 2024
4005d1d
Small changes to the added note
AdamMJennissen Oct 21, 2024
0492dc0
Update versioning.py with comments
Cbolt17 Oct 21, 2024
b3b913a
Merge branch 'development' of github.com:ncclarke/open-event-server i…
AdamMJennissen Oct 21, 2024
865a29b
Lincoln's documentation edit on the app/api/admin_sales/events.py file
LincolnOlsen Oct 21, 2024
de0e5b4
Merge branch 'development' of https://github.com/ncclarke/open-event-…
LincolnOlsen Oct 21, 2024
3a5f2b3
Add files via upload
Cbolt17 Nov 21, 2024
1b9ed25
Readme for workflow
ncclarke Nov 21, 2024
64e4c4b
Add or update the Azure App Service build and deployment workflow config
ncclarke Nov 23, 2024
0d26697
Update development_open-event-server.yml
ncclarke Nov 23, 2024
2fd323e
Update development_open-event-server.yml
ncclarke Nov 23, 2024
d4e0e87
Update development_open-event-server.yml
ncclarke Nov 23, 2024
452a3f2
Update development_open-event-server.yml
ncclarke Nov 23, 2024
62ce0ce
Update development_open-event-server.yml
ncclarke Nov 23, 2024
8beb415
Create .env
ncclarke Nov 30, 2024
7749462
Update config.py
ncclarke Nov 30, 2024
1806387
Update .env
ncclarke Nov 30, 2024
defa51a
Create common
ncclarke Nov 30, 2024
c68da26
Add files via upload
ncclarke Nov 30, 2024
77a4ed4
Update development_open-event-server.yml
ncclarke Nov 30, 2024
c68eed7
Delete utils directory
ncclarke Nov 30, 2024
4f38b4a
Update development_open-event-server.yml
ncclarke Nov 30, 2024
3060823
Update development_open-event-server.yml
ncclarke Nov 30, 2024
17c7f0e
Update development_open-event-server.yml
ncclarke Dec 3, 2024
ff694d3
Update development_open-event-server.yml
ncclarke Dec 3, 2024
54531e3
Update development_open-event-server.yml
ncclarke Dec 3, 2024
a930a78
Update development_open-event-server.yml
ncclarke Dec 4, 2024
645358c
Update development_open-event-server.yml
ncclarke Dec 4, 2024
fd9e021
Update development_open-event-server.yml
ncclarke Dec 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/api/admin_sales/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

class AdminSalesByEventsSchema(Schema):
"""
Sales summarized by event
Sales summarized by event. Mainly includes information on the event
itself, but also includes some info on the sales and tickets of the event.

Provides
event(name),
Expand Down
8 changes: 8 additions & 0 deletions app/models/helpers/versioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
import bleach
from bleach.callbacks import nofollow, target_blank

"""
Class to modify strings
"""

# Removes \r
def remove_line_breaks(target_string: str) -> str:
return target_string.replace('\r', '')


# Removes \n
def strip_line_breaks(target_string: str) -> str:
return target_string.replace('\n', '').replace('\r', '')


# Removes whitespace and \r, then removes \n if it contains a-z or A-Z
def clean_up_string(target_string):
if target_string:
if not re.search('[a-zA-Z]', target_string):
Expand All @@ -20,6 +26,7 @@ def clean_up_string(target_string):
return target_string


# Makes html safe
def clean_html(html, allow_link=False):
if html is None:
return None
Expand Down Expand Up @@ -53,6 +60,7 @@ def clean_html(html, allow_link=False):
)


# Removes html from text
def strip_tags(html):
if html is None:
return None
Expand Down
9 changes: 8 additions & 1 deletion app/models/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,31 @@ def checkout(dbapi_connection, connection_record, connection_proxy):
"attempting to check out in pid %s" % (connection_record.info['pid'], pid)
)


# Adjusts the DateTime handling for SQLite databases in SQLAlchemy by converting DateTime fields into an integer format that stores timestamps as seconds.
def sqlite_datetime_fix():

# Converts DateTime objects to Unix timestamps before storage and converts them back to DateTime when retrieved.
class SQLiteDateTimeType(types.TypeDecorator):
impl = types.Integer
epoch = datetime(1970, 1, 1, 0, 0, 0)

# Converts a DateTime object to Unix timestamp when storing the value in the SQLite database.
def process_bind_param(self, value, dialect):
return (value / 1000 - self.epoch).total_seconds()

# Converts a Unix timestamp back to a DateTime object when retrieving the value from the SQLite database.
def process_result_value(self, value, dialect):
return self.epoch + timedelta(seconds=value / 1000)

# Checks if the current database engine is SQLite.
def is_sqlite(inspector):
return inspector.engine.dialect.name == "sqlite"

# Checks if a given column is a DateTime.
def is_datetime(column_info):
return isinstance(column_info['type'], types.DateTime)

# Adjusts DateTime columns when reflecting tables in SQLite.
@event.listens_for(Table, "column_reflect")
def setup_epoch(inspector, table, column_info):
if is_sqlite(inspector) and is_datetime(column_info):
Expand Down
3 changes: 3 additions & 0 deletions docs/installation/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
* Postgres
* OpenSSL

### A quick note for Windows users
Some files within the migrations/versions directory contain illegal file names for a Windows system. The Open Event Server is not optimized for running locally on a Windows machine. Therefore, it is suggested that you use Windows Subsystem for Linux (WSL) or a virtual machine to run the project locally. The setup steps for WSL can be found here: https://learn.microsoft.com/en-us/windows/wsl/install. Once using one of these options, you should be able to complete the following linux setup steps within WSL.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (documentation): Consider using markdown link format for the WSL setup instructions.

For consistency with markdown formatting, you might want to use the following format: WSL setup instructions

Suggested change
Some files within the migrations/versions directory contain illegal file names for a Windows system. The Open Event Server is not optimized for running locally on a Windows machine. Therefore, it is suggested that you use Windows Subsystem for Linux (WSL) or a virtual machine to run the project locally. The setup steps for WSL can be found here: https://learn.microsoft.com/en-us/windows/wsl/install. Once using one of these options, you should be able to complete the following linux setup steps within WSL.
Some files within the migrations/versions directory contain illegal file names for a Windows system. The Open Event Server is not optimized for running locally on a Windows machine. Therefore, it is suggested that you use Windows Subsystem for Linux (WSL) or a virtual machine to run the project locally. The [WSL setup instructions](https://learn.microsoft.com/en-us/windows/wsl/install) can be found here. Once using one of these options, you should be able to complete the following linux setup steps within WSL.


### For mac users
```sh
brew install postgresql
Expand Down
6 changes: 0 additions & 6 deletions package.json

This file was deleted.

5,061 changes: 0 additions & 5,061 deletions poetry.lock

This file was deleted.

Loading