Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samk13/invenio-config-kth
invenio configuration KTH
https://github.com/samk13/invenio-config-kth
community config invenio
Last synced: about 5 hours ago
JSON representation
invenio configuration KTH
- Host: GitHub
- URL: https://github.com/samk13/invenio-config-kth
- Owner: Samk13
- License: mit
- Created: 2022-11-07T17:21:38.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-16T23:48:33.000Z (over 1 year ago)
- Last Synced: 2024-04-25T06:21:03.278Z (7 months ago)
- Topics: community, config, invenio
- Language: Python
- Homepage: https://pypi.org/project/invenio-config-kth/
- Size: 196 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
![GitHub](https://img.shields.io/github/license/front-matter/talbot?logo=MIT)
# invenio-config-kth
## Usage
After installation, you are ready to go:
- Create new communities will be restricted to users with role "community-manager"
- Publishing records will be restricted to community admins (Curator, Manager, Owner)
- you can switch new creation to off if you turn CONFIG_KTH_READ_ONLY_MODE = True## Installation
From your instance active venv:
```console
pip install invenio-config-kth
```As default, you can add role name `community-manager` to user programmatically in invenio:
```bash
# Create a role
invenio roles create community-manager # This needed to be added once if role doesn't exists
# Add community-manager role to an user, by its emails
invenio roles add community-manager
```
you can also pre-add your list of emails as controlled vocabularies:There are possibility to change the default role name in `invenio_congig_kth/config.py`
```python
CONFIG_KTH_COMMUNITY_MANAGER_ROLE = "community-manager"
```
Or turn the read only mode:
```python
CONFIG_KTH_READ_ONLY_MODE = False
```## Maintainers
### Setup dev env
after cloning the repo:
```bash
make install
make test
```### Run tests
```bash
make test
```
> When running tests you will get a warning from [black formatter](https://github.com/shopkeep/pytest-black/issues/55), should bump pytest-black version when it's done## Upload to pypi
```console
make package-create
make package-upload USER="" PASS=""
```- `make package-create` command will:
1. remove old dist folder
2. auto increment package version
3. zip the package into dist dir
4. check if the package pass twin checks> You can change version increment to major or minor by adding ARG:
- `make package-create ARG="-ma"` increment major version
- `make package-create ARG="-mi"` increment minor version
- `make package-create` increment patch version
- `make package-check` # verify if the package pass twine checks
- `make package-upload USER="" PASS=""` # will and upload to pypi will prompt for username and pass
or manually:
twine upload -u -p dist/* --verbose