-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/pip/django-3.2.19
- Loading branch information
Showing
214 changed files
with
29,495 additions
and
8,650 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 |
---|---|---|
@@ -1,26 +1 @@ | ||
PORT=8020 | ||
DEBUG=1 | ||
HOST_NAME=monkshood | ||
SECRET_KEY=aLargeRandomSecretKey | ||
DJANGO_SUPERUSER_USERNAME=admin | ||
DJANGO_SUPERUSER_PASSWORD=sekret1 | ||
DJANGO_SUPERUSER_EMAIL=[email protected] | ||
EMAIL_HOST=in-v3.mailjet.com | ||
EMAIL_PORT=25 | ||
EMAIL_HOST_USER=email_username | ||
EMAIL_HOST_PASSWORD=email_password | ||
DEFAULT_FROM_EMAIL=[email protected] | ||
POSTGRES_PASSWORD=sekret2 | ||
DATABASE_URL=postgres://postgres:sekret2@postgres:5432/postgres | ||
|
||
RABBITMQ_DEFAULT_USER=guest | ||
RABBITMQ_DEFAULT_PASS=guest | ||
|
||
AUTH_LDAP_USE=0 | ||
AUTH_LDAP_SERVER_URI=ldap://ldap.forumsys.com:389 | ||
AUTH_LDAP_DIRECT_BIND=1 | ||
AUTH_LDAP_BIND_DN_TEMPLATE=uid=%(user)s,dc=example,dc=com | ||
AUTH_LDAP_BIND_DN=cn=read-only-admin,dc=example,dc=com | ||
AUTH_LDAP_BIND_PASSWORD=password | ||
AUTH_LDAP_SEARCH_BASE=ou=mathematicians,dc=example,dc=com | ||
AUTH_LDAP_SEARCH_FILTER=(uid=%(user)s) | ||
DEBUG=1 |
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,26 @@ | ||
PORT=8020 | ||
DEBUG=1 | ||
HOST_NAME=monkshood | ||
SECRET_KEY=aLargeRandomSecretKey | ||
DJANGO_SUPERUSER_USERNAME=admin | ||
DJANGO_SUPERUSER_PASSWORD=sekret1 | ||
DJANGO_SUPERUSER_EMAIL=[email protected] | ||
EMAIL_HOST=in-v3.mailjet.com | ||
EMAIL_PORT=25 | ||
EMAIL_HOST_USER=email_username | ||
EMAIL_HOST_PASSWORD=email_password | ||
DEFAULT_FROM_EMAIL=[email protected] | ||
POSTGRES_PASSWORD=sekret2 | ||
DATABASE_URL=postgres://postgres:sekret2@postgres:5432/postgres | ||
|
||
RABBITMQ_DEFAULT_USER=guest | ||
RABBITMQ_DEFAULT_PASS=guest | ||
|
||
AUTH_LDAP_USE=0 | ||
AUTH_LDAP_SERVER_URI=ldap://ldap.forumsys.com:389 | ||
AUTH_LDAP_DIRECT_BIND=1 | ||
AUTH_LDAP_BIND_DN_TEMPLATE=uid=%(user)s,dc=example,dc=com | ||
AUTH_LDAP_BIND_DN=cn=read-only-admin,dc=example,dc=com | ||
AUTH_LDAP_BIND_PASSWORD=password | ||
AUTH_LDAP_SEARCH_BASE=ou=mathematicians,dc=example,dc=com | ||
AUTH_LDAP_SEARCH_FILTER=(uid=%(user)s) |
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,4 +1,6 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = E203, W503 | ||
|
||
exclude= | ||
.git, | ||
|
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
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 |
---|---|---|
|
@@ -22,3 +22,5 @@ pkpdapp/static | |
|
||
# nodemodules | ||
frontend/node_modules | ||
|
||
logfile.log* |
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
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,18 @@ | ||
import { defineConfig } from "cypress"; | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
baseUrl: 'http://localhost:3000', | ||
|
||
}, | ||
|
||
component: { | ||
devServer: { | ||
framework: "next", | ||
bundler: "webpack", | ||
}, | ||
}, | ||
}); |
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,2 @@ | ||
*.png | ||
*.mp4 |
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,101 @@ | ||
describe('landing page', () => { | ||
beforeEach(() => { | ||
const { username, password } = { username: 'demo', password: '12345'} | ||
cy.login(username, password) | ||
}) | ||
|
||
it('can create combined pk and pd model and simulate from it', () => { | ||
// create a new project | ||
cy.intercept('POST', '/api/project/').as('createProject') | ||
cy.get('[data-cy="create-project"]').click() | ||
cy.get('[data-cy="create-project-option-Small Molecule"]').click() | ||
cy.wait('@createProject').then((interception) => { | ||
const { id } = interception.response.body | ||
|
||
// select the species | ||
cy.get(`[data-cy="project-${id}"]`).find('[data-cy="select-project.species"]').click() | ||
cy.get('[data-cy="select-option-project.species-Monkey"]').click() | ||
|
||
// select the project | ||
cy.get(`[data-cy="project-${id}"]`).find('[type=radio]').click() | ||
}); | ||
|
||
cy.get('[data-cy="select-project.species"]').last().click() | ||
cy.get('[data-cy="select-option-project.species-Monkey"]').last().click() | ||
|
||
|
||
// go to model tab | ||
cy.get('li').contains('Model').click() | ||
|
||
// select one compartment model | ||
cy.get('[data-cy="select-pk_model"]').click() | ||
cy.get('[data-cy="select-option-pk_model-one_compartment_preclinical"]').click() | ||
|
||
// select pd model | ||
cy.get('[data-cy="select-pd_model"]').click() | ||
cy.get('[data-cy="select-option-pd_model-indirect_effects_stimulation_elimination"]').click() | ||
|
||
// go to map variables tab | ||
cy.contains('button', 'Map Variables').click() | ||
|
||
// dose into Aa compartment | ||
cy.get('[data-cy="checkbox-dosing-Aa"]').click() | ||
|
||
// map C1 to pd effect | ||
cy.get('[data-cy="checkbox-map-to-pd-C1"]').click() | ||
|
||
// go to parameters tab | ||
cy.contains('button', 'Parameters').click() | ||
|
||
cy.get('[data-cy="parameter-CL-value"]').find('input').then(($input) => { | ||
const old_value = $input.val() | ||
|
||
// reset to species defaults | ||
cy.contains('button', 'Reset to Species Defaults').click() | ||
cy.wait(1000) | ||
|
||
// check that the value has changed | ||
cy.get('[data-cy="parameter-CL-value"]').find('input').then(($input) => { | ||
expect($input.val()).not.to.eq(old_value) | ||
}) | ||
}); | ||
|
||
// go to trial design tab | ||
cy.get('li').contains('Trial Design').click() | ||
|
||
// set the dose | ||
cy.get('input[name="doses.0.amount"]').clear().type('1') | ||
|
||
// set the number of doses | ||
cy.get('input[name="doses.0.repeats"]').clear().type('4') | ||
|
||
// set the duration | ||
cy.get('input[name="doses.0.duration"]').clear().type('0.1') | ||
|
||
// set the interval | ||
cy.get('input[name="doses.0.repeat_interval"]').clear().type('0.1') | ||
|
||
// go to simulation tab | ||
cy.get('li').contains('Simulations').click() | ||
|
||
// should be no svg with class "main-svg" | ||
cy.get('svg.main-svg').should('not.exist') | ||
|
||
// add a plot of Aa | ||
cy.get('[data-cy="add-plot"]').click() | ||
cy.get('[data-cy^="add-plot-option-Aa"]').click() | ||
|
||
// now there should be an svg with class "main-svg" | ||
cy.get('svg.main-svg').should('exist') | ||
|
||
// should be no CL slider | ||
cy.get('[data-cy="parameter-slider-CL"]').should('not.exist') | ||
|
||
// add a CL parameter slider | ||
cy.get('[data-cy="add-parameter-slider"]').click() | ||
cy.get('[data-cy="add-parameter-slider-option-CL"]').click() | ||
|
||
// CL slider should exist | ||
cy.get('[data-cy="parameter-slider-CL"]').should('exist') | ||
}); | ||
}); |
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,55 @@ | ||
/// <reference types="cypress" /> | ||
// *********************************************** | ||
// This example commands.ts shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('login', (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) | ||
// | ||
// declare global { | ||
// namespace Cypress { | ||
// interface Chainable { | ||
// login(email: string, password: string): Chainable<void> | ||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element> | ||
// } | ||
// } | ||
// } | ||
|
||
Cypress.Commands.add('login', (username, password) => { | ||
cy.visit('/') | ||
|
||
cy.get('input[name=username]').type(username) | ||
|
||
// {enter} causes the form to submit | ||
cy.get('input[name=password]').type(`${password}{enter}`, { log: false }) | ||
|
||
// we should be redirected to / | ||
cy.url().should('not.contain', 'login') | ||
|
||
// our auth cookies should be present | ||
cy.getCookie('csrftoken').should('exist') | ||
cy.getCookie('sessionid').should('exist') | ||
}) | ||
|
||
export {} |
Oops, something went wrong.