Commit Graph

59 Commits

Author SHA1 Message Date
jo 22868ce158 chore: remove chdir in setup.py files 2022-07-27 15:35:57 +02:00
Jonas L e75426bc4c
refactor(shared): explode config into multiple files (#1987) 2022-07-25 21:30:15 +02:00
Jonas L 77f5c9951e
chore: improve setuptools find_packages (#1985) 2022-07-25 21:19:41 +02:00
jo 8996d4beb4 chore(shared): update pydantic version range 2022-07-17 21:25:37 +02:00
jo 1a8da4c000 chore(shared): update pyyaml version range 2022-07-17 21:25:37 +02:00
jo 80218f33eb chore: rewrite extract-requirements to python
Using python ast to guess requirements in the setup.py file.
2022-07-17 21:25:37 +02:00
jo be9f36dbdc feat(analyzer): move compute_md5 to shared library 2022-06-28 19:05:14 +02:00
Jonas L 6ef941b3f2
chore(shared): explicit function name time_fromisoformat (#1917) 2022-06-25 17:10:59 +02:00
jo 3ce60d4881 chore: move api-client datetime utils to shared 2022-06-24 17:56:24 +02:00
Jonas L 3705747132
feat(shared): add config trailing slash sanitizer (#1870) 2022-06-11 18:18:34 +02:00
jo f7bb6e7592 feat: move storage path setting to configuration file
- change default storage path to /srv/libretime
- remove music dirs table
- use /tmp for testing storage
- storage dir should always have a trailing slash
2022-06-08 23:23:08 +02:00
jo e4439390fe feat: change config file format to yaml
- docs: add link to yaml.org

BREAKING: The `ini` configuration file format changed to `yml`. Please
rewrite your configuration file using the yaml format.
2022-06-08 23:23:08 +02:00
Jonas L c78854b139
test(shared): remove bad disable no-self-use (#1862) 2022-06-04 22:27:09 +02:00
Jonas L a4caf4782b
fix(shared): allow list settings (#1837) 2022-05-05 18:14:32 +02:00
jo 9130cf2895 feat(shared): allow to disable log rotate/retention 2022-05-05 09:42:34 +02:00
Jonas L d098671f3b
feat: replace click envar with auto_envvar_prefix (#1829) 2022-05-05 09:41:32 +02:00
Jonas L 515a975e51
feat(shared): remove unused abstract app (#1828) 2022-05-04 14:12:06 +02:00
Jonas L 3a2e910f12
feat(shared): compress logs with gz (#1827) 2022-05-04 13:56:20 +02:00
jo 751d430bcc feat: replace exploded base_* with public_url
Fixes #1574

BREAKING CHANGE: The `general` section in the config schema has changed: the `general.base_*`, `general.protocol` and `general.force_ssl` configuration fields have been replaced with a single `general.public_url` field. Be sure to use a valid url with the new configuration field.
2022-04-25 16:45:01 +02:00
Jonas L 87d2da9d84
chore(shared): pin click to 8.0.* (#1732)
8.1.0 dropped support for python 3.6
2022-04-04 11:23:12 +02:00
jo 000f09b095 feat(shared): do not exit on missing config file 2022-03-02 22:03:56 +02:00
Jonas L d55e58e416
chore: auto generate requirements.txt (#1651)
- force LC_ALL for the sort command
2022-02-28 20:02:01 +02:00
jo ba0897a023 fix(shared): fix missing port in public_url 2022-02-25 11:42:28 +02:00
jo 31cf8361be feat(shared): return log level and filepath 2022-02-22 17:33:48 +02:00
jo 045fdc8d96 feat(shared): create time functions 2022-02-22 17:33:48 +02:00
jo 9d7d0ee6ca feat(shared): create general config model 2022-02-22 17:33:48 +02:00
jo d9852940d6 refactor(shared): dict merging using pydantic deep_update 2022-02-22 17:33:48 +02:00
jo 27c2221a68 feat(shared): load config from str filepath 2022-02-22 17:33:48 +02:00
Jonas L 5769821995
test(shared): config with required submodel (#1616) 2022-02-20 20:11:49 +00:00
jo a26f3824bb test(shared): add bandit linter check 2022-02-14 21:01:35 +02:00
jo c7332db8ed test(shared): add missing format lint check 2022-02-14 21:01:35 +02:00
Jonas L 42c2ecdf48
fix(shared): do not strip vhost slash (#1594) 2022-02-14 11:25:10 +02:00
jo 94d3c5e496 docs: fix prose linting errors
- Properly enclose code between triple backticks
- Put paths and url between backticks
- Remove links <> enclosing
- Libretime styled name is LibreTime
- Put urls and paths betwen backticks
- Use sentence like capitalization for headings
- Put tools name between backticks
- Update links
2022-02-11 10:12:07 +01:00
Jonas L 784b9fb225
feat(shared): add url/dsn property to config classes (#1553) 2022-02-02 09:04:48 +02:00
jo 80dfbd3179 fix(shared): set logger encoding and dont assume encoding
Older versions of python might have ascii as default, we
should not assume that the default encoding always is "utf-8"
when opening files.
2022-02-01 04:23:05 +02:00
dependabot[bot] f6fe318278 chore: bump loguru from 0.5.3 to 0.6.0 in /shared
Bumps [loguru](https://github.com/Delgan/loguru) from 0.5.3 to 0.6.0.
- [Release notes](https://github.com/Delgan/loguru/releases)
- [Changelog](https://github.com/Delgan/loguru/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/Delgan/loguru/compare/0.5.3...0.6.0)

---
updated-dependencies:
- dependency-name: loguru
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-01 04:23:05 +02:00
Kyle Robbertze c266221165 fix(shared): pin loguru version
Pinned to 0.5.3 until https://github.com/Delgan/loguru/issues/581 is
fixed
2022-01-31 10:12:28 +01:00
jo 7393db50e0 test: require lint to succeed for shared/ and tools/ 2022-01-26 10:15:35 +02:00
jo 9de82bb568 chore: make linters config consistent in pyproject.toml
- remove mypy config from makefile
2022-01-26 10:15:35 +02:00
jo 7988b7467b test: allow to set python linters to fail per app 2022-01-26 10:15:35 +02:00
jo b9502bc203 test(shared): fix linting 2022-01-26 10:15:35 +02:00
jo 1a1f0488d5 test(shared): ignore pylint warning 2022-01-26 10:15:35 +02:00
jo 0f8cb1a5ed chore: set python build system in pyproject.toml
- fix local package install
- local packages requirement url format
2022-01-26 10:15:35 +02:00
jo 441028a1d2 chore: make setup.py file chdir consistent 2022-01-26 10:15:35 +02:00
Jonas L 1924919e18
fix(shared): type is required for default config submodel (#1536)
We cannot load submodels values from environment variables without having the submodel type annotations.
2022-01-24 15:24:16 +02:00
jo 7aba20f1ac test(shared): check config using optional sections
fix missing DatabaseConfig rename
2022-01-24 12:46:40 +02:00
jo b527c2704d feat(shared): add suffix to shared config models 2022-01-21 11:54:00 +02:00
Jonas L 1561353b20
feat(shared): allow cli parametrized decorators (#1527) 2022-01-20 07:30:35 +02:00
jo 2a8da1e931 test(shared): assert key is from file 2022-01-18 11:14:24 +02:00
jo b1ecf25d6f feat(shared): allow loading from ini config file 2022-01-18 11:14:24 +02:00