-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
1,855 additions
and
1,776 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install . unittest-xml-reporting | ||
- name: Run tests | ||
run: | | ||
python -m xmlrunner discover ldap_ui | ||
- name: Publish test results | ||
uses: dorny/test-reporter@v1 | ||
with: | ||
name: Tests | ||
path: "TEST-*.xml" | ||
reporter: java-junit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python Debugger: Starlette", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"module": "uvicorn", | ||
"args": [ | ||
"app:app", | ||
"--port", | ||
"5000", | ||
"--reload" | ||
] | ||
} | ||
] | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug: Backend", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"module": "uvicorn", | ||
"args": ["app:app", "--port", "5000", "--reload"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,13 @@ | ||
{ | ||
"css.customData": [".vscode/tailwind.json"], | ||
"editor.formatOnSave": true, | ||
"[python]": { | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "charliermarsh.ruff", | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": "explicit" | ||
} | ||
}, | ||
"python.testing.unittestArgs": [ | ||
"-v", | ||
"-s", | ||
".", | ||
"-p", | ||
"*test.py" | ||
], | ||
"python.testing.pytestEnabled": false, | ||
"python.testing.unittestEnabled": true | ||
"python.testing.unittestEnabled": true, | ||
"python.testing.unittestArgs": ["-v", "-s", "./tests", "-p", "*_test.py"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,6 @@ | ||
FROM node:lts-alpine AS builder | ||
COPY . /app | ||
WORKDIR /app | ||
RUN npm audit && npm i && npm run build | ||
|
||
FROM alpine:3 | ||
COPY --from=builder /app/dist /app/dist | ||
RUN apk add --no-cache python3 py3-pip py3-pyldap py3-pytoml \ | ||
&& pip3 install --break-system-packages python-multipart starlette uvicorn | ||
COPY app.py ldap_api.py ldap_helpers.py schema.py settings.py /app/ | ||
RUN apk add --no-cache py3-pip py3-pyldap | ||
RUN pip3 install --break-system-packages ldap_ui | ||
|
||
WORKDIR /app | ||
EXPOSE 5000 | ||
CMD ["/usr/bin/uvicorn", "--host", "0.0.0.0", "--port", "5000", "app:app"] | ||
CMD ["ldap-ui"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import uvicorn | ||
|
||
from . import settings | ||
|
||
__version__ = "0.9.1" | ||
|
||
|
||
def run(): | ||
uvicorn.run( | ||
"ldap_ui.app:app", | ||
log_level="info", | ||
host="127.0.0.1" if settings.DEBUG else None, | ||
port=5000, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from ldap_ui import run | ||
|
||
if __name__ == "__main__": | ||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.