Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
32c5817
this is just a test txt file
NathanChase22 Sep 13, 2023
650a0d0
add folder
Umer-K-PersonOOO Sep 15, 2023
3bc8d3d
adding folders
Umer-K-PersonOOO Sep 15, 2023
85343e5
create Relay class (nothing in it for now)
NathanChase22 Sep 15, 2023
dfea42b
Test
Adi-Ram123 Sep 20, 2023
0339202
Added a button grid and header. Need to style later
Adi-Ram123 Sep 22, 2023
536dd07
Merge github.com:ECLAIR-Robotics/Beginners-Track into umer/frontend
Umer-K-PersonOOO Sep 22, 2023
74fdb65
added frontend code
Umer-K-PersonOOO Sep 22, 2023
95a4f6d
Merge branch 'team/umer' into umer/frontend
Umer-K-PersonOOO Sep 22, 2023
cf7e077
just pushing some stuff
NathanChase22 Sep 22, 2023
16d41b4
created Relay object
NathanChase22 Sep 23, 2023
113ecaa
Finished Button Grid and started footer code
Adi-Ram123 Sep 23, 2023
2c86f4f
test
rhubarbhill Sep 23, 2023
6f22d62
Merge branch 'umer/frontend' of github.com:ECLAIR-Robotics/Beginners-…
rhubarbhill Sep 23, 2023
342d3ef
finished work on Relay Container
NathanChase22 Sep 23, 2023
af0ff36
changes to Relay object
NathanChase22 Sep 23, 2023
98c6f1d
Merge branch 'umer/frontend' of github.com:ECLAIR-Robotics/Beginners-…
Umer-K-PersonOOO Sep 26, 2023
1a4259c
adding testing button
Umer-K-PersonOOO Sep 26, 2023
1629215
Finished functionality of button
Adi-Ram123 Sep 27, 2023
073a2bb
database
nihalneeru Sep 29, 2023
4702ebd
.
JulianP27 Sep 29, 2023
d297943
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
JulianP27 Sep 29, 2023
edf1d0e
database
kailerlaino Sep 30, 2023
a4db730
database
kailerlaino Sep 30, 2023
0ed1594
Added template database class
Umer-K-PersonOOO Oct 4, 2023
90a4977
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
JulianP27 Oct 5, 2023
ed29df2
added method headers to database class
Umer-K-PersonOOO Oct 10, 2023
61eed8d
added GPIO interactivity to Relay.py
NathanChase22 Oct 10, 2023
40cc511
finished remove method
SaketU Oct 11, 2023
e675c71
someone make table creation pls
Umer-K-PersonOOO Oct 11, 2023
95281bd
thing
Umer-K-PersonOOO Oct 11, 2023
75f7021
thing
Umer-K-PersonOOO Oct 11, 2023
864ccf1
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
JulianP27 Oct 13, 2023
f8ae4ee
getState mehtod in database
JulianP27 Oct 13, 2023
3385486
added "add method"
carchieh Oct 13, 2023
07b21af
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
JulianP27 Oct 13, 2023
d1b6204
setState method
JulianP27 Oct 13, 2023
c2fcc5f
thing
roosetr Oct 14, 2023
3850fda
Merge branch
roosetr Oct 14, 2023
593d6b4
getAllDevices and constructor
JulianP27 Oct 14, 2023
7e1f716
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
roosetr Oct 14, 2023
0f33cb7
mess
roosetr Oct 14, 2023
e34f835
altered method headers, added unittest cases
NathanChase22 Oct 14, 2023
2d06c94
altered string method
NathanChase22 Oct 14, 2023
383ff0b
message
KevinB7777 Oct 17, 2023
32b261c
added unittest for initalizize_low()
NathanChase22 Oct 17, 2023
0a97688
adding f9les
Umer-K-PersonOOO Oct 17, 2023
73ce614
Merge branch 'team/umer' of https://github.com/ECLAIR-Robotics/Beginn…
Umer-K-PersonOOO Oct 17, 2023
31f07f3
add frontend stuff
Umer-K-PersonOOO Oct 17, 2023
bae35bd
finished basecard object
rykhrgrissom Oct 18, 2023
00904aa
added Add New Appliances page
rhubarbhill Oct 18, 2023
e681300
added page for 'Add New Appliances' and Main Page
rhubarbhill Oct 18, 2023
f3ab238
Swith=chg pages
Umer-K-PersonOOO Oct 18, 2023
3c6687e
testButton
Umer-K-PersonOOO Oct 18, 2023
16a62bd
MAKE SURE TO RUN npm audit fix
Umer-K-PersonOOO Oct 18, 2023
2fac436
testing framework
NathanChase22 Oct 19, 2023
912f78a
del
Umer-K-PersonOOO Oct 20, 2023
222a287
Merge branch 'umer/frontend' of github.com:ECLAIR-Robotics/Beginners-…
Umer-K-PersonOOO Oct 20, 2023
ba32481
RelayController Ready!
Umer-K-PersonOOO Oct 20, 2023
93c6d15
Tailwind Start
Umer-K-PersonOOO Oct 20, 2023
fa2eb7a
relaycontroll stated
Umer-K-PersonOOO Oct 20, 2023
8f6b1e6
linking pages
Umer-K-PersonOOO Oct 20, 2023
e4c98a1
added some extra test for PinTest
NathanChase22 Oct 20, 2023
494411d
card text
Umer-K-PersonOOO Oct 21, 2023
4f24635
l
rykhrgrissom Oct 21, 2023
91f9ff7
Merge branch
rykhrgrissom Oct 21, 2023
53da0d9
Added entry boxes to Add New Appliances and made a CSS file for Add N…
rhubarbhill Oct 21, 2023
0faf26d
index.css
Umer-K-PersonOOO Oct 21, 2023
2201a19
Merge branch 'umer/frontend' of github.com:ECLAIR-Robotics/Beginners-…
Umer-K-PersonOOO Oct 21, 2023
646d049
Merge branch 'umer/frontend' of github.com:ECLAIR-Robotics/Beginners-…
rhubarbhill Oct 21, 2023
107a1f0
relayContainer & database cleanup
JulianP27 Oct 21, 2023
ce919d0
del
Umer-K-PersonOOO Oct 24, 2023
7fef1fc
better getState n setState (throw err)
Umer-K-PersonOOO Oct 24, 2023
105bdf8
better get and setState (throw err)
Umer-K-PersonOOO Oct 24, 2023
5754a54
del
Umer-K-PersonOOO Oct 24, 2023
5aca440
database
Umer-K-PersonOOO Oct 24, 2023
5050eff
Starting viewspy
Umer-K-PersonOOO Oct 24, 2023
d49192f
footer stufuf
Umer-K-PersonOOO Oct 31, 2023
f72df53
Merge branch 'umer/frontend' of github.com:ECLAIR-Robotics/Beginners-…
Umer-K-PersonOOO Oct 31, 2023
00bf10d
Merge branch 'team/umer' into relay_test
NathanChase22 Oct 31, 2023
92cffca
Merge pull request #7 from ECLAIR-Robotics/relay_test
NathanChase22 Oct 31, 2023
136cc57
tihng
Umer-K-PersonOOO Oct 31, 2023
993473c
Merge branch
Umer-K-PersonOOO Nov 1, 2023
3a71f82
fixed method naming conventions for Relay and RelayContainer
NathanChase22 Nov 1, 2023
40a4387
base card container
rykhrgrissom Nov 1, 2023
dc9b590
Merge branch 'umer/frontend' of https://github.com/ECLAIR-Robotics/Be…
rykhrgrissom Nov 1, 2023
57fa04b
base card container
rykhrgrissom Nov 1, 2023
8009241
added padding
Umer-K-PersonOOO Nov 1, 2023
e74b716
Updated snake_case in RelayContainer to camelCase
CameronCox123 Nov 1, 2023
9230ca4
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
KevinB7777 Nov 3, 2023
20253c4
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
KevinB7777 Nov 3, 2023
ffc2292
stuff
Umer-K-PersonOOO Nov 3, 2023
6232aea
Merge branch 'team/umer' of https://github.com/ECLAIR-Robotics/Beginn…
Umer-K-PersonOOO Nov 3, 2023
c6e487d
updated mehtods
Umer-K-PersonOOO Nov 3, 2023
8d50614
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
KevinB7777 Nov 3, 2023
ecc06aa
base card
rykhrgrissom Nov 3, 2023
2611ee7
stuff
Umer-K-PersonOOO Nov 3, 2023
fb1fea4
vies.py
Umer-K-PersonOOO Nov 3, 2023
5d712b6
stuff
Umer-K-PersonOOO Nov 3, 2023
d3b3ca5
team/umer
KevinB7777 Nov 3, 2023
b926626
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
KevinB7777 Nov 3, 2023
8b91a9b
stuff
Umer-K-PersonOOO Nov 3, 2023
1f194bf
check if broken
Umer-K-PersonOOO Nov 3, 2023
d9bd732
del
Umer-K-PersonOOO Nov 4, 2023
eed79ca
some database fixes :)
JulianP27 Nov 4, 2023
1f95430
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
JulianP27 Nov 4, 2023
2f8a53e
Adding a fetch function in Add New Appliances to connect to to the ba…
rhubarbhill Nov 4, 2023
0425026
Merge branch 'umer/frontend' of github.com:ECLAIR-Robotics/Beginners-…
rhubarbhill Nov 4, 2023
62040af
brought test files to parent directory, import issues
NathanChase22 Nov 4, 2023
b829c94
We need to merge
NathanChase22 Nov 4, 2023
0bdd764
del
Umer-K-PersonOOO Nov 4, 2023
c13b0e8
took test files into parent directory
NathanChase22 Nov 4, 2023
f471429
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
NathanChase22 Nov 4, 2023
c38cb65
del
Umer-K-PersonOOO Nov 4, 2023
e38894f
changes
KevinB7777 Nov 4, 2023
5a8cfa0
Merge branch 'team/umer' of github.com:ECLAIR-Robotics/Beginners-Trac…
KevinB7777 Nov 4, 2023
3568176
Update RelayContainer.py
KevinB7777 Nov 4, 2023
307d76b
base card
rykhrgrissom Nov 4, 2023
1b9f1b6
base card flex
rykhrgrissom Nov 4, 2023
1f60a43
Merge branch 'umer/frontend' of https://github.com/ECLAIR-Robotics/Be…
rykhrgrissom Nov 4, 2023
e2a5d7d
tig
Umer-K-PersonOOO Nov 4, 2023
998bc12
Merge branch 'umer/frontend' of github.com:ECLAIR-Robotics/Beginners-…
Umer-K-PersonOOO Nov 4, 2023
12d9f83
ButtonGrid fix (maybe)
Umer-K-PersonOOO Nov 4, 2023
291e9e4
button grid fixed (old button css had extra pad)
Umer-K-PersonOOO Nov 4, 2023
bade7ed
del
Umer-K-PersonOOO Nov 8, 2023
d6171a3
Merge branch 'team/umer' of https://github.com/ECLAIR-Robotics/Beginn…
Umer-K-PersonOOO Nov 8, 2023
d22165e
change
Umer-K-PersonOOO Nov 8, 2023
1ef874a
added an endpoint and a backend frontend connection
rhubarbhill Nov 8, 2023
ec1b57b
Merge branch 'umer/frontend' of github.com:ECLAIR-Robotics/Beginners-…
rhubarbhill Nov 8, 2023
7849ce3
merged from team/umer
rhubarbhill Nov 8, 2023
cbe295c
added the relay/add in views.py
rhubarbhill Nov 8, 2023
def62d0
added paremeter types to RContainter
Umer-K-PersonOOO Nov 10, 2023
8fca700
relayContainer fixes
NathanChase22 Nov 11, 2023
68c29b8
relayContainer fixes
NathanChase22 Nov 11, 2023
f65299a
Merge branch 'team/umer'
NathanChase22 Nov 11, 2023
0b543a8
Made it so the ID can only be a number
rhubarbhill Nov 11, 2023
ce5351e
merged
rhubarbhill Nov 11, 2023
118bedd
Cleaned up some old unused code that's no longer needed
rhubarbhill Nov 15, 2023
0558d2a
added to base card
Umer-K-PersonOOO Nov 28, 2023
16a596c
base card
rykhrgrissom Nov 29, 2023
4054c1b
Merge branch 'umer/frontend' of https://github.com/ECLAIR-Robotics/Be…
rykhrgrissom Nov 29, 2023
df6a2ea
Fetch to frontend
Umer-K-PersonOOO Nov 29, 2023
23d77ea
Merge branch 'umer/frontend' of github.com:ECLAIR-Robotics/Beginners-…
Umer-K-PersonOOO Nov 29, 2023
685b645
changing main page to look normal
Umer-K-PersonOOO Dec 1, 2023
daec41f
colors and stuff
Umer-K-PersonOOO Dec 1, 2023
850e073
more styling
Umer-K-PersonOOO Dec 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added .DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
backend-service/core/__pycache__/views.cpython-310.pyc
.gitignore
backend-service/__pycache__/base.cpython-310.pyc
backend-service/core/__pycache__/__init__.cpython-310.pyc
/venv
/__pycache__
/core/__pycache__
*.pyc

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# MAKE SURE TO RUN 'npm audit fix'

# Beginners-Track
## Repository for the beginner's track. **Make your own branch for this repo and name it `team/<teamname>`** before your sub-team starts working

Expand Down
Binary file added backend-service/.DS_Store
Binary file not shown.
247 changes: 247 additions & 0 deletions backend-service/.venv/bin/Activate.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
<#
.Synopsis
Activate a Python virtual environment for the current PowerShell session.
.Description
Pushes the python executable for a virtual environment to the front of the
$Env:PATH environment variable and sets the prompt to signify that you are
in a Python virtual environment. Makes use of the command line switches as
well as the `pyvenv.cfg` file values present in the virtual environment.
.Parameter VenvDir
Path to the directory that contains the virtual environment to activate. The
default value for this is the parent of the directory that the Activate.ps1
script is located within.
.Parameter Prompt
The prompt prefix to display when this virtual environment is activated. By
default, this prompt is the name of the virtual environment folder (VenvDir)
surrounded by parentheses and followed by a single space (ie. '(.venv) ').
.Example
Activate.ps1
Activates the Python virtual environment that contains the Activate.ps1 script.
.Example
Activate.ps1 -Verbose
Activates the Python virtual environment that contains the Activate.ps1 script,
and shows extra information about the activation as it executes.
.Example
Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
Activates the Python virtual environment located in the specified location.
.Example
Activate.ps1 -Prompt "MyPython"
Activates the Python virtual environment that contains the Activate.ps1 script,
and prefixes the current prompt with the specified string (surrounded in
parentheses) while the virtual environment is active.
.Notes
On Windows, it may be required to enable this Activate.ps1 script by setting the
execution policy for the user. You can do this by issuing the following PowerShell
command:
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
For more information on Execution Policies:
https://go.microsoft.com/fwlink/?LinkID=135170
#>
Param(
[Parameter(Mandatory = $false)]
[String]
$VenvDir,
[Parameter(Mandatory = $false)]
[String]
$Prompt
)

<# Function declarations --------------------------------------------------- #>

<#
.Synopsis
Remove all shell session elements added by the Activate script, including the
addition of the virtual environment's Python executable from the beginning of
the PATH variable.
.Parameter NonDestructive
If present, do not remove this function from the global namespace for the
session.
#>
function global:deactivate ([switch]$NonDestructive) {
# Revert to original values

# The prior prompt:
if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
}

# The prior PYTHONHOME:
if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
}

# The prior PATH:
if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
Remove-Item -Path Env:_OLD_VIRTUAL_PATH
}

# Just remove the VIRTUAL_ENV altogether:
if (Test-Path -Path Env:VIRTUAL_ENV) {
Remove-Item -Path env:VIRTUAL_ENV
}

# Just remove VIRTUAL_ENV_PROMPT altogether.
if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
Remove-Item -Path env:VIRTUAL_ENV_PROMPT
}

# Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
}

# Leave deactivate function in the global namespace if requested:
if (-not $NonDestructive) {
Remove-Item -Path function:deactivate
}
}

<#
.Description
Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
given folder, and returns them in a map.
For each line in the pyvenv.cfg file, if that line can be parsed into exactly
two strings separated by `=` (with any amount of whitespace surrounding the =)
then it is considered a `key = value` line. The left hand string is the key,
the right hand is the value.
If the value starts with a `'` or a `"` then the first and last character is
stripped from the value before being captured.
.Parameter ConfigDir
Path to the directory that contains the `pyvenv.cfg` file.
#>
function Get-PyVenvConfig(
[String]
$ConfigDir
) {
Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"

# Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
$pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue

# An empty map will be returned if no config file is found.
$pyvenvConfig = @{ }

if ($pyvenvConfigPath) {

Write-Verbose "File exists, parse `key = value` lines"
$pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath

$pyvenvConfigContent | ForEach-Object {
$keyval = $PSItem -split "\s*=\s*", 2
if ($keyval[0] -and $keyval[1]) {
$val = $keyval[1]

# Remove extraneous quotations around a string value.
if ("'""".Contains($val.Substring(0, 1))) {
$val = $val.Substring(1, $val.Length - 2)
}

$pyvenvConfig[$keyval[0]] = $val
Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
}
}
}
return $pyvenvConfig
}


<# Begin Activate script --------------------------------------------------- #>

# Determine the containing directory of this script
$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
$VenvExecDir = Get-Item -Path $VenvExecPath

Write-Verbose "Activation script is located in path: '$VenvExecPath'"
Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"

# Set values required in priority: CmdLine, ConfigFile, Default
# First, get the location of the virtual environment, it might not be
# VenvExecDir if specified on the command line.
if ($VenvDir) {
Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
}
else {
Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
$VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
Write-Verbose "VenvDir=$VenvDir"
}

# Next, read the `pyvenv.cfg` file to determine any required value such
# as `prompt`.
$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir

# Next, set the prompt from the command line, or the config file, or
# just use the name of the virtual environment folder.
if ($Prompt) {
Write-Verbose "Prompt specified as argument, using '$Prompt'"
}
else {
Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
$Prompt = $pyvenvCfg['prompt'];
}
else {
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
$Prompt = Split-Path -Path $venvDir -Leaf
}
}

Write-Verbose "Prompt = '$Prompt'"
Write-Verbose "VenvDir='$VenvDir'"

# Deactivate any currently active virtual environment, but leave the
# deactivate function in place.
deactivate -nondestructive

# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
# that there is an activated venv.
$env:VIRTUAL_ENV = $VenvDir

if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {

Write-Verbose "Setting prompt to '$Prompt'"

# Set the prompt to include the env name
# Make sure _OLD_VIRTUAL_PROMPT is global
function global:_OLD_VIRTUAL_PROMPT { "" }
Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt

function global:prompt {
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
_OLD_VIRTUAL_PROMPT
}
$env:VIRTUAL_ENV_PROMPT = $Prompt
}

# Clear PYTHONHOME
if (Test-Path -Path Env:PYTHONHOME) {
Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
Remove-Item -Path Env:PYTHONHOME
}

# Add the venv to the PATH
Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
69 changes: 69 additions & 0 deletions backend-service/.venv/bin/activate
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This file must be used with "source bin/activate" *from bash*
# you cannot run it directly

deactivate () {
# reset old environment variables
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
PATH="${_OLD_VIRTUAL_PATH:-}"
export PATH
unset _OLD_VIRTUAL_PATH
fi
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
export PYTHONHOME
unset _OLD_VIRTUAL_PYTHONHOME
fi

# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
hash -r 2> /dev/null
fi

if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
PS1="${_OLD_VIRTUAL_PS1:-}"
export PS1
unset _OLD_VIRTUAL_PS1
fi

unset VIRTUAL_ENV
unset VIRTUAL_ENV_PROMPT
if [ ! "${1:-}" = "nondestructive" ] ; then
# Self destruct!
unset -f deactivate
fi
}

# unset irrelevant variables
deactivate nondestructive

VIRTUAL_ENV="/home/personooo/Documents/GitHub/Beginners-Track/backend-service/.venv"
export VIRTUAL_ENV

_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/bin:$PATH"
export PATH

# unset PYTHONHOME if set
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
# could use `if (set -u; : $PYTHONHOME) ;` in bash
if [ -n "${PYTHONHOME:-}" ] ; then
_OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
unset PYTHONHOME
fi

if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
_OLD_VIRTUAL_PS1="${PS1:-}"
PS1="(.venv) ${PS1:-}"
export PS1
VIRTUAL_ENV_PROMPT="(.venv) "
export VIRTUAL_ENV_PROMPT
fi

# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
hash -r 2> /dev/null
fi
26 changes: 26 additions & 0 deletions backend-service/.venv/bin/activate.csh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This file must be used with "source bin/activate.csh" *from csh*.
# You cannot run it directly.
# Created by Davide Di Blasi <davidedb@gmail.com>.
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>

alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'

# Unset irrelevant variables.
deactivate nondestructive

setenv VIRTUAL_ENV "/home/personooo/Documents/GitHub/Beginners-Track/backend-service/.venv"

set _OLD_VIRTUAL_PATH="$PATH"
setenv PATH "$VIRTUAL_ENV/bin:$PATH"


set _OLD_VIRTUAL_PROMPT="$prompt"

if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
set prompt = "(.venv) $prompt"
setenv VIRTUAL_ENV_PROMPT "(.venv) "
endif

alias pydoc python -m pydoc

rehash
Loading