No project description provided
Project description
zeus
Docs are still lagging...
What is this?
This is a collection of tools extracted from a multi-project django monolith. Because we're new to publishing packages, there are a few gotchas:
- This is a monolithic package/install. Consumers can't just install a part, but must install the entire thing.
- This also means the whole thing is versioned together. If we add a shiny new feature after a totally independent breaking change, consumers can't get the new feature without the breaking change.
- This tool doesn't include external dependencies, you will have to install those yourself. We did this so consumers don't need to install packages they may not use.
List of packages and utilities
Utils are grouped by the following package names. That means you import them as so:
from zeus.vanilla import is_ascii
vanilla
is_asciiare_strings_close_enoughgroup_by
versioning
versioning model behaviour has no external dependencies.
Subclassing versioning.core.VersionModel will create a history model that is automatically updated on each save. See the example
changelog (in progress)
changelogs requires many external dependencies: graphene, aiodataloader, graphene-django
creating changelogs currently require a lot of boilerplate code.
TODO: create a function that abstracts away all the graphql and allows querying paginated changelog data for specific models, fields, users and dates.
i18n
Depends on django, bleach, mistune and pyyaml
TextMakerCreator(global_keys,text_file_paths)WatchingTextMakerCreator((global_keys,text_file_paths)- if using
runserverandsettings.DEBUG=True, requires watchdog
- if using
markdown
requires django, bleach and mistune to be installed
markdownis_md_validsanitize_html
Installing
pip install titan-zeus
Installing from git with branch
the entry in requirements.txt should look like this
git+git://github.com/TBS-EACPD/zeus@release-0.1#egg=zeus
If you installed using git and want to update, you'll need to run pip uninstall -y zeus before re-running pip install
Building
How to build dist and egginfo
# in this project:
python setup.py sdist
How to install this locally without pypi (test this right before deploying a new version)
editable mode
When refreshing a local package, you'll also need pip uninstall -y zeus in between installs. This is super annoying, fortunately there's an easier way for python to link directly to the sources so this isn't necessary:
pip uninstall zeus
# then replace zeus in requirements.txt with the following
# -e file:///absolute/path/to/zeus/
locally packaged mode
Once you've got something that work in editable mode, try packaging the app
# in zeus project
python setup.py sdist
# in consumer project
pip uninstall -y zeus
# replace the zeus entry in requirements.txt with
#file:///absolute/path/to/zeus/
Development
- Install postgres and configure your
$PATH - Set up the virtual environment
- we run tests against a postgres DB, so you'll need to run
createdb zeus-dev
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file titan-zeus-2.0.0.tar.gz.
File metadata
- Download URL: titan-zeus-2.0.0.tar.gz
- Upload date:
- Size: 30.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10b9e9f2c5f1c44ea1b168e71bf14070db386c366bbe3f8c8c53e5540a0dafca
|
|
| MD5 |
3a858960c43667fbcc5798f56d424ace
|
|
| BLAKE2b-256 |
a738dc9fa5349fdf5fb754350dc5aae22822f235401c79b506494660a2551001
|
File details
Details for the file titan_zeus-2.0.0-py3-none-any.whl.
File metadata
- Download URL: titan_zeus-2.0.0-py3-none-any.whl
- Upload date:
- Size: 44.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e133f6a832b95d13b98d7b94c3602425d79ceb7f0c4b930d7591f8ce09313c1d
|
|
| MD5 |
023ed778a085c162fcf3020e1fda75ba
|
|
| BLAKE2b-256 |
b02434be9d417b697bbd1d86e691aad93cc3fd40a7d37ebbc2f9b7d70a2c3ad2
|