Commit graph

15252 commits

Author SHA1 Message Date
faul-sname
4892b58d10
Add migrations using alembic.
* #39 Add Flask-Migrate dep

* #39 Make it such that flask db init can run

https://github.com/miguelgrinberg/Flask-Migrate/issues/196#issuecomment-381343393

* Run flask db init, update migrations.env, commit artifacts

* Set up a script such that you can `docker-compose exec files bash -c 'cd /service; FLASK_APP="files/cli:app" flask '` and have it do whatever flask thing you want

* Fix circular dependency

* import * is evil

* Initial alembic migration, has issues with constraints and nullable columns

* Bring alts table up to date with alembic autogenerate

* Rerun flask db revision autogenerate

* Bring award_relationships table up to date with alembic autogenerate

* [#39/alembic] files/classes/__init__.py is evil but is at least explicitly evil now

* #39 fix model in files/classes/badges.py

* #39 fix model in files/classes/domains.py and files/classes/clients.py

* #39 fix models: comment saves, comment flags

* #39 fix models: comments

* Few more imports

* #39 columns that are not nullable should be flagged as not nullable

* #39 Add missing indexes to model defs

* [#39] add missing unique constraints to model defs

* [#39] Temporarily undo any model changes which cause the sqlalchemy model to be out of sync with the actual dump

* #39 Deforeignkeyify the correct column to make alembic happy

* #39 flask db revision --autogenerate now creates an empty migration

* #39 Migration format such that files are listed in creation order

* #39 Better first revision

* #39 Revert the model changes that were required to get to zero differences between db revision --autogenerate and the existing schema

* #39 The first real migration

* #39 Ensure that foreign key constraints are named in migration

* #39 Alembic migrations for FK constraints, column defs

* [#39] Run DB migrations before starting tests

* [#39] New test to ensure migrations are up to date

* [#39] More descriptive test failure message

* Add -T flag to docker-compose exec

* [#39] Run alembic migrations when starting the container
2022-05-17 18:55:17 -05:00
Michael House
19903cccb5
Adding usernotes. 2022-05-16 11:53:24 -05:00
Ben Rog-Wilhelm
957edab4dc Update rule text for new site. 2022-05-15 14:21:17 -05:00
Ben Rog-Wilhelm
e590068786 Add workflow badge 2022-05-15 14:21:11 -05:00
Ben Rog-Wilhelm
222c2d9df0 Edit a bunch of error messages. 2022-05-15 14:21:05 -05:00
Ben Rog-Wilhelm
8f973ff9c9
Add open-in-tab support for userpages.
Originally written by @faul-sname
2022-05-15 14:20:53 -05:00
Ben Rog-Wilhelm
3c8798e4da
Add run_tests step. 2022-05-14 02:13:53 -05:00
Ben Rog-Wilhelm
14ac41c73a
Fix OSSAR permissions. 2022-05-14 02:13:43 -05:00
Ben Rog-Wilhelm
42dd403d28
Update CodeQL to v2. 2022-05-14 02:13:36 -05:00
Ben Rog-Wilhelm
91692153d2
Remove redundant CodeQL test. 2022-05-14 02:13:27 -05:00
Ben Rog-Wilhelm
1404ffd762
Fix: .gitignore ignores a critical file. 2022-05-14 02:13:08 -05:00
Ben Rog-Wilhelm
4890291861
Add a .dockerignore to make builds faster and smaller. 2022-05-14 02:12:55 -05:00
Ben Rog-Wilhelm
cb38e8118e
Add a script to do all the work of running tests. 2022-05-13 13:04:09 -05:00
Ben Rog-Wilhelm
d7421fc49f
Remove some unnecessary utility scripts. 2022-05-13 13:03:47 -05:00
Ben Rog-Wilhelm
75c91f7c8f
Remove some setup utilities that we no longer use. 2022-05-13 13:03:29 -05:00
FatherInire
a12123ca01
Initial e2e testing
Authored by @FatherInire
2022-05-13 02:55:29 -05:00
Ben Rog-Wilhelm
3e3cb7e2f9
Merge pull request #58 from themotte/remove-marseybux-from-ui
Remove all references to Marseybux, coins, and awards from UI only
2022-05-11 04:26:49 -05:00
Julian Rota
10d8cf037d Remove all references to Marseybux, coins, and awards from UI only 2022-05-10 23:49:45 -04:00
Ben Rog-Wilhelm
820ea7ec17
Merge pull request #57 from iro84657/add-trailing-lf
Add trailing LF to text files
2022-05-10 21:17:42 -05:00
iro84657
b7da8b575a Add trailing LF to text files 2022-05-10 21:05:51 -04:00
iro84657
1edc96841b Convert TheMotte.css line endings to LF 2022-05-10 21:05:46 -04:00
Ben Rog-Wilhelm
a37b48baf5
Merge pull request #55 from drzewiec/remove-pages
Removed user listing and shop pages
2022-05-10 04:14:27 -05:00
Chris Drzewiecki
c03e77d2d4 Set user listing/shop to require admin 2022-05-10 01:08:54 -06:00
Chris Drzewiecki
fd2630e0d1 Removed user listing and shop for non-admin users 2022-05-10 01:04:55 -06:00
Ben Rog-Wilhelm
c966a575b6
Merge pull request #54 from iro84657/remove-rDrama-links
Remove references to rDrama domain, app, and repo
2022-05-09 22:47:17 -05:00
iro84657
2eb2d6a034 Remove references to r/Drama archives 2022-05-09 22:02:15 -04:00
iro84657
8c2ee6a57a Remove references to Android apps 2022-05-09 21:59:20 -04:00
iro84657
6a31b87c35 Remove links to rdrama.net and Aevann1/rDrama 2022-05-09 21:55:42 -04:00
iro84657
6082cfc21b Add TheMotte manifest and remove unused manifests 2022-05-09 21:47:18 -04:00
Ben Rog-Wilhelm
6eab75ea16
Merge pull request #52 from iro84657/remove-holes
Remove references to holes
2022-05-09 20:26:32 -05:00
Ben Rog-Wilhelm
97eb828b30
Merge pull request #53 from aj-m/m49-post-submission-fix
chore: strip references to 'new' prop from submissions
2022-05-09 20:24:15 -05:00
Andrew Montenigro
3e52182a71 fix: remove submissions.new field from db schema 2022-05-09 13:53:59 -05:00
Andrew Montenigro
57caad17b0 chore: strip references to 'new' prop from submissions
fixes #49
2022-05-09 11:49:32 -05:00
iro84657
35fdbd2e2e Remove references to holes 2022-05-09 11:01:11 -04:00
iro84657
5500fc6e8d Remove unused sidebar templates and Snappy messages 2022-05-09 10:34:13 -04:00
medecine4goat
c000dcd18b
Make whitespace consistent in readme 2022-05-09 07:48:09 -05:00
JamPaladin
74476d6223
Add TheMotte theme and make it default.
I created a new theme, "TheMotte" in /assests/css. Someone with any design
skill at all should try improving this. Currently it is a copy of light.css

__main__.py defines the experience for a user without an account. I removed the
check for an OS environment variable, and defaulted to the new theme.

/classes/user.py defines the default for a new account. I removed the check for an OS
environment variable, and defaulted to the new theme.

/routes/settings.py has a list of the themes that checks them for... something.
I added the new one here, just in case.

/templates/settings_profile.html has a hardcoded list that controls which
themes appear in the user settings page. Added the new theme here, so you can
select it.
2022-05-09 07:29:31 -05:00
Ben Rog-Wilhelm
1ee9c1bfa7
Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
Michael House
67d5db425f Fixed a type in routes/front.py:180 2022-05-09 04:54:00 -05:00
Ben Rog-Wilhelm
cb8ecac28e
Merge pull request #44 from iro84657/remove-special-cases
Remove all site-specific special cases
2022-05-09 02:27:49 -05:00
iro84657
193ff08a3d Remove special cases based on request.host 2022-05-09 01:40:09 -04:00
iro84657
4341e2d980 Remove special cases based on SITE 2022-05-09 01:40:09 -04:00
iro84657
71743a3bfc Remove special cases based on SITE_NAME 2022-05-09 01:40:09 -04:00
Ben Rog-Wilhelm
6d2e4b3652
Merge pull request #43 from evangambit/backgroundImages
Remove old backgrounds and replace with a (legal) placeholder
2022-05-09 00:01:50 -05:00
evangambit
4e533e5c37 Remove old backgrounds and replace with a (legal) placeholder
I'm not deleting the code entirely since we may want to use it in the future
2022-05-08 21:43:46 -07:00
iro84657
0bab69947a
Remove hot posts button from mobile interface (#38)
This commit also cleans up some remnants of the previous default sort
orders.
2022-05-08 23:21:43 -05:00
Ben Rog-Wilhelm
728260e4ad
Add .editorconfig. 2022-05-08 23:14:58 -05:00
Ben Rog-Wilhelm
db411b04e4
Remove not-tonally-appropriate Code of Conduct. 2022-05-08 23:14:43 -05:00
Ben Rog-Wilhelm
edfc35bce2
Merge pull request #35 from 64617/frost
Default all sorts to new
2022-05-08 22:18:50 -05:00
64617
8dc3be28fc dont force users who dont want new to switch sorting every time they open a page (Is this the intended behaviour?) 2022-05-09 11:11:54 +08:00