|
|
Thomas De Schampheleire
|
495dea7c2a13
|
5 years ago
|
|
ini: get rid of path 'paster_commands'
We are no longer using 'paster'. The location of the template.ini.make file is a leftover from old times.
|
|
|
Mads Kiilerich
|
6eb1f66ac23f
|
5 years ago
|
|
|
|
|
Mads Kiilerich
|
ef9fd1434270
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
4b68fbe195b6
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
aa6f17a53b49
|
6 years ago
|
|
py3: switch to use Python 3 interpreter, temporarily leaving many things very broken until they have been migrated/fixed in a reviewable way
Bump Mercurial minimum version to 5.2 - the first version that claim stable py3 support.
|
|
|
Mads Kiilerich
|
a8e6bb9ee9ea
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
0a277465fddf
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
609d52bbf917
|
6 years ago
|
|
ini: create separate log handlers for color and null, and add comments hinting how they can be used
Let development.ini use color for the root logger as before. The special effect of color_sql was not visible with the default sqlalchemy log level of WARN, so just use color there as well.
|
|
|
Mads Kiilerich
|
bbf7be28a11e
|
6 years ago
|
|
config: rename .ini settings to avoid beaker-session deprecation warnings
Gets rid of:
data/env/lib/python2.7/site-packages/tg/wsgiapp.py:68 data/env/lib/python2.7/site-packages/tg/wsgiapp.py:68: DeprecationWarning: Session options should start with session. instead of baker.session. app_wrapper = wrapper(self.wrapped_dispatch, self.config)
Old .ini files will still work, but one day upstream will drop the deprecated functionality ...
|
|
|
Mads Kiilerich
|
451b3f9d814e
|
7 years ago
|
|
docs: update i18n doc after TG migration changed lang to i18n.lang and test.ini is generated
These descriptions are not elegant, but now we make them less wrong.
|
|
|
Thomas De Schampheleire
|
52544ad8a946
|
8 years ago
|
|
ini: drop setting initial_repo_scan
The ini setting 'initial_repo_scan' caused a repository scan on each startup of Kallithea. The accompanying comment already warns that the feature should be disabled after the first run to improve startup time.
Now that setup-db is performing the initial repository scan, and considering that administrators can always request a new scan using 'gearbox repo-scan' or via the web interface, the 'initial_repo_scan' feature is no longer considered useful and is removed with this commit.
|
|
|
domruf
|
150173a027ee
|
8 years ago
|
|
ini: set default log level to WARN
DEBUG and INFO are not good choices for the default log levels. With DEBUG and INFO most of the time you can't see the wood for the trees. It is too easy to overlook critical errors or warnings if the log levels DEBUG and INFO are enabled.
|
|
|
Mads Kiilerich
|
163d1c4f2b8b
|
8 years ago
|
|
tests: generate test.ini directly from template
Get rid of the committed generated test.ini
|
|
|
Mads Kiilerich
|
94f6b23e52d0
|
8 years ago
|
|
|
|
|
Mads Kiilerich
|
d06039dc4ca2
|
8 years ago
|
|
ini: drop insertion of header comments in generated ini files
The header comments were kind of redundant and could easily get out of sync. Also, we are moving towards just generating files and don't need this and don't want to maintain it.
|
|
|
Mads Kiilerich
|
7292c5976752
|
8 years ago
|
|
ini: simplify preservation of old settings - just keep the old line as comment
The thing about skipping mako function references is not important.
|
|
|
Mads Kiilerich
|
73934760f601
|
8 years ago
|
|
ini: use proper Mako for generating shipped ini files
Get rid of some regexp hacking ... but we still need some hacking to substitute plain template variables that haven't been marked up.
|
|
|
Mads Kiilerich
|
d7222b590156
|
8 years ago
|
|
|
|
|
Mads Kiilerich
|
e3cce237d77c
|
8 years ago
|
|
ini: extract .ini handling from scripts/generate-ini.py to kallithea/lib/inifile.py
No functional changes - just moving and a minimal amount of adjusting.
|
|
|
Mads Kiilerich
|
ab80515f3096
|
8 years ago
|
|
ini: drop redundant template update of [handler_console] level=DEBUG After 05d09cec7b26, the handlers in the default template no longer had a 'level' setting the ini generator could override with DEBUG. We are apparently fine without it, so just remove the last traces.
|
|
|
Lars Kruse
|
665dfa112f2c
|
8 years ago
|
|
|
|
|
domruf
|
cddff7f0dd08
|
8 years ago
|
|
tests: use temporary copy of test.ini, possibly customized for TEST_DB
It was an undocumented feature that if setting the environment variable TEST_DB, that would be used for tests instead of the default kallithea/tests/test.ini sqlalchemy.url . That did however not work for Git hooks and tests would fail.
Instead, create a copy of test.ini in the temp folder and use that for testing. If TEST_DB is set, edit the file so the specified DB URL is used. This fixes Git hook related tests if TEST_DB is used.
Since this also changes the path of %(here)s to the temporary location, just use the default paths.
This also has the advantage that the data folders are now in the temp folder as well. Therefore a broken data folder, from a past run, can no longer influence a test.
|
|
|
Mads Kiilerich
|
a4715df40299
|
8 years ago
|
|
make-config: use %(here)s in the generated file instead of hardcoding absolute path Restore what paster make-config did until we introduced gearbox in d2aa8b1625a4. The make-config sub command was re-introduced in 6c8af2d22deb but created files with absolute paths.
|
|
|
Anton Schur
|
ff287676b206
|
9 years ago
|
|
|
|
|
Thomas De Schampheleire
|
fc6b1b0e1096
|
9 years ago
|
|
ini: set 'debug' only in one place
In Pylons-based Kallithea, the 'debug' option was set first in [DEFAULTS] and then overridden with 'set debug = X' in [app:main]. Even when the value under [DEFAULTS] was commented out, the use of the 'set' keyword (providing override semantics) was required, because a default value for the global 'debug' was provided in the framework.
The presence of these two debug assignments is confusing. Moreover, TurboGears2 makes the situation more easy and does not expect 'debug' to be in [DEFAULTS] nor does it provide a default at that level. As a result, we can simple use 'debug = X' under [app:main].
Additionally, clarify the Big Fat Warning: the wording 'the line below' is ambiguous and could be misunderstood in an ini file that had previously been changed.
|
|
|
Mads Kiilerich
|
213085032127
|
9 years ago
|
|
gearbox: make a make-config sub-command available again
Drop the old kallithea-config command line tool and rework it to a replacement for the make-config paster command. Make-config was experimental in paste, it doesn't exist with gearbox, it was tied to pylons, and we already have the luxury problem of having two ways of doing almost the same thing. This is a good opportunity to get rid of one of them.
This replacement tool is Kallithea specific and doesn't need to be told that it is Kallithea it has to create a config file for. The command should thus perhaps be given a Kallithea specific name instead of the very generic name ...
|
|
|
Mads Kiilerich
|
d89d586b26ae
|
9 years ago
|
|
|
|
|
Thomas De Schampheleire
|
f973b866fffc
|
9 years ago
|
|
Turbogears2 migration: use sqlalchemy.url iso sqlalchemy.db1.url
In Turbogears2, much of the application initialization is handled by the framework, whereas in Pylons the application was responsible for it. Initializing SQLAlchemy is one such part of initialization which is handled by Turbogears2.
Turbogears2 expects the configuration file to refer to the database using 'sqlalchemy.url' rather than the current 'sqlalchemy.db1.url'. While the exact name is not really important, not following this approach means we'll need to override the sqlalchemy initialization method.
Therefore, as a preparation to the Turbogears2 migration, already change the database reference string under Pylons. When upgrading to a version of Kallithea containing this commit, the .ini file will manually need to be adapted to remove the .db1 strings.
|
|
|
Thomas De Schampheleire
|
b1fc5a98952c
|
9 years ago
|
|
test.ini: align some logging-related settings with development.ini
When manually using test.ini (that is, not via the test suite) the coloring of log output like development.ini provides can be very useful. Note that this color output is not taken along by pytest-capturelog, regardless of this patch.
Some extra-verbose logging in test.ini is on the other hand not needed and could be enabled when needed by a specific developer.
Note: the 'level=DEBUG' setting for handler_console_sql is not taken along to test.ini: it causes duplicate sqlalchemy debug logs, one through handler_console_sql and another through another path.
If future experience points out that some of these changes are actually worse than they were, adjustments can still be made.
|
|
|
Mads Kiilerich
|
9358211ee144
|
9 years ago
|
|
tests: move test data to top level 'data' folder - make grepping in kallithea/ easier
We like to have test.ini under kallithea/tests, but we don't want the temporary files there.
|
|
|
Mads Kiilerich
|
6afa528ee30e
|
10 years ago
|
|
db: get rid of vcs_full_cache - it should always be used
It might make tests less deterministic, but it makes sure that we test what we actually use.
|
|
|
Mads Kiilerich
|
06d5c043e989
|
10 years ago
|
|
ini: add scripts/generate-ini.py for generating all .ini files from template.ini.mako
Based on kallithea/bin/template.ini.mako, generate kallithea/config/deployment.ini_tmpl development.ini kallithea/tests/test.ini
The script might not be pretty, but it works for the given input, and all changes in output will be reviewed thoroughly anyway ...
|