Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compendium-v2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
compendium-v2
Commits
637077aa
Commit
637077aa
authored
3 months ago
by
Bjarke Madsen
Browse files
Options
Downloads
Patches
Plain Diff
update readme a bit
parent
dab9b7d9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+10
-9
10 additions, 9 deletions
README.md
with
10 additions
and
9 deletions
README.md
+
10
−
9
View file @
637077aa
...
...
@@ -24,7 +24,7 @@ The server will therefore return an error unless
## Configuration
This app allows specification of a few
example configuration parameters.
These
example configuration parameters. These
parameters should be stored in a file formatted
similarly to
`config-example.json`
, and the name
of this file should be stored in the environment
...
...
@@ -39,7 +39,7 @@ For instructions on building the React frontend see `<name>-webapp/README.md`.
This module has been tested in the following execution environments:
-
As an embedded Flask application.
For example, the application could be launched as follows:
For example, the application could be launched as follows:
```
bash
$
export
FLASK_APP
=
compendium_v2.app
...
...
@@ -52,15 +52,15 @@ for best practices about running in production environments.
## Importing the historical data
Pip install can use the setup.py file to register the click cli commands:
Pip install can use the setup.py file to register the click cli commands:
```
bash
pip
install
--editable
.
survey-publisher-v1
survey-publisher-2022
legacy-survey-publisher
```
To import the 2022 data to the new datamodel for prefilling the 2023 surveys:
```
bash
pip
install
--editable
.
conversion
...
...
@@ -69,16 +69,17 @@ conversion
## Creating a db migration after editing the sqlalchemy models
```
bash
flask db migrate
-m
"description"
cd
compendium_v2
flask db revision
--autogenerate
-m
"description"
```
Then go to the created migration file to make any necessary additions, for example to migrate data.
Also see https://alembic.sqlalchemy.org/en/latest/autogenerate.html#what-does-autogenerate-detect-and-what-does-it-not-detect
Flask-migrate sets
`compare_type=True`
by default.
We use alembic-postgresql-enum to support auto discovery of and applying enum changes.
Note that starting the application applies all upgrades.
This also happens when running
`flask db`
commands such as
`flask db downgrade`
,
so if you want to downgrade 2 or more versions you need to do so in one command, eg by specifying the revision number.
Note that starting the application applies all pending migrations.
Normally this also happens when running
`flask db`
commands such as
`flask db downgrade`
, but we've disabled this in our create_app function.
## Editing a newly created survey
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment