Skip to content

Commit 117c8bd

Browse files
authored
update setup.py and Readme
1 parent d129048 commit 117c8bd

File tree

2 files changed

+54
-79
lines changed

2 files changed

+54
-79
lines changed

README.md

Lines changed: 25 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
[![Tests](https://github.com/Mat-O-Lab/ckanext-matolabtheme/actions/workflows/test.yml/badge.svg)](https://github.com/Mat-O-Lab/ckanext-matolabtheme/actions/workflows/test.yml)
22
# ckanext-matolabtheme
33

4-
**TODO:** Put a description of your extension here: What does it do? What features does it have? Consider including some screenshots or embedding a video!
5-
4+
CKAN theme of the Mat-O-Lab Project, changes landing Page and add alternative Data Privacy Act in English and German.
65

76
## Requirements
87

9-
**TODO:** For example, you might want to mention here which versions of CKAN this
10-
extension works with.
11-
12-
If your extension works across different versions you can add the following table:
13-
148
Compatibility with core CKAN versions:
159

1610
| CKAN version | Compatible? |
@@ -29,31 +23,24 @@ Suggested values:
2923

3024
## Installation
3125

32-
**TODO:** Add any additional install steps to the list below.
33-
For example installing any non-Python dependencies or adding any required
34-
config settings.
35-
36-
To install ckanext-matolabtheme:
26+
To install the extension:
3727

3828
1. Activate your CKAN virtual environment, for example:
39-
40-
. /usr/lib/ckan/default/bin/activate
41-
42-
2. Clone the source and install it on the virtualenv
43-
44-
git clone https://github.com/Mat-O-Lab/ckanext-matolabtheme.git
45-
cd ckanext-matolabtheme
46-
pip install -e .
47-
pip install -r requirements.txt
48-
29+
```bash
30+
. /usr/lib/ckan/default/bin/activate
31+
```
32+
2. Use pip to install package
33+
```bash
34+
pip install ckanext-matolabtheme
35+
```
4936
3. Add `matolabtheme` to the `ckan.plugins` setting in your CKAN
50-
config file (by default the config file is located at
51-
`/etc/ckan/default/ckan.ini`).
52-
53-
4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
54-
55-
sudo service apache2 reload
37+
   config file (by default the config file is located at
38+
   `/etc/ckan/default/ckan.ini`).
5639

40+
4. Restart CKAN. For example, if you've deployed CKAN with Apache on Ubuntu:
41+
```bash
42+
sudo service apache2 reload
43+
```
5744

5845
## Config settings
5946

@@ -75,62 +62,23 @@ ckan.favicon = /img/favicon.png
7562
If no contact_url is given, it will relate to the about page!
7663

7764

78-
**TODO:** Document any optional config settings here. For example:
79-
80-
# The minimum number of hours to wait before re-checking a resource
81-
# (optional, default: 24).
82-
ckanext.matolabtheme.some_setting = some_default_value
83-
84-
8565
## Developer installation
8666

87-
To install ckanext-matolabtheme for development, activate your CKAN virtualenv and
67+
To install ckanext-csvtocsvw for development, activate your CKAN virtualenv and
8868
do:
89-
90-
git clone https://github.com/Mat-O-Lab/ckanext-matolabtheme.git
91-
cd ckanext-matolabtheme
92-
python setup.py develop
93-
pip install -r dev-requirements.txt
94-
69+
```bash
70+
git clone https://github.com/Mat-O-Lab/ckanext-matolabtheme.git
71+
cd ckanext-matolabtheme
72+
python setup.py develop
73+
pip install -r dev-requirements.txt
74+
```
9575

9676
## Tests
9777

9878
To run the tests, do:
99-
100-
pytest --ckan-ini=test.ini
101-
102-
103-
## Releasing a new version of ckanext-matolabtheme
104-
105-
If ckanext-matolabtheme should be available on PyPI you can follow these steps to publish a new version:
106-
107-
1. Update the version number in the `setup.py` file. See [PEP 440](http://legacy.python.org/dev/peps/pep-0440/#public-version-identifiers) for how to choose version numbers.
108-
109-
2. Make sure you have the latest version of necessary packages:
110-
111-
pip install --upgrade setuptools wheel twine
112-
113-
3. Create a source and binary distributions of the new version:
114-
115-
python setup.py sdist bdist_wheel && twine check dist/*
116-
117-
Fix any errors you get.
118-
119-
4. Upload the source distribution to PyPI:
120-
121-
twine upload dist/*
122-
123-
5. Commit any outstanding changes:
124-
125-
git commit -a
126-
git push
127-
128-
6. Tag the new release of the project on GitHub with the version number from
129-
the `setup.py` file. For example if the version number in `setup.py` is
130-
0.0.1 then do:
131-
132-
git tag 0.0.1
133-
git push --tags
79+
```bash
80+
pytest --ckan-ini=test.ini
81+
```
13482

13583
## License
13684

setup.py

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,43 @@
11
# -*- coding: utf-8 -*-
2-
from setuptools import setup
2+
from codecs import open # To use a consistent encoding
3+
from os import path, environ
4+
5+
from setuptools import find_packages, setup # Always prefer setuptools over distutils
6+
7+
here = path.abspath(path.dirname(__file__))
8+
9+
10+
# Get the long description from the relevant file
11+
with open(path.join(here, "README.md"), encoding="utf-8") as f:
12+
long_description = f.read()
313

414
setup(
15+
name="""ckanext-matolabtheme""",
516
# If you are changing from the default layout of your extension, you may
617
# have to change the message extractors, you can read more about babel
718
# message extraction at
819
# http://babel.pocoo.org/docs/messages/#extraction-method-mapping-and-configuration
20+
version=environ.get('VERSION', '0.0.0'),
21+
description="""CKAN theme of the Mat-O-Lab Project, changes landing Page and add alternative Data Privacy Act in English and German.""",
22+
long_description=long_description,
23+
long_description_content_type="text/markdown",
24+
# The project's main homepage.
25+
url="https://github.com/Mat-O-Lab/ckanext-matolabtheme",
26+
# Author details
27+
author="""Thomas Hanke""",
28+
author_email="""[email protected]""",
29+
# Choose your license
30+
license="AGPL",
931
message_extractors={
1032
'ckanext': [
1133
('**.py', 'python', None),
1234
('**.js', 'javascript', None),
1335
('**/templates/**.html', 'ckan', None),
1436
],
15-
}
37+
},
38+
entry_points="""
39+
[ckan.plugins]
40+
matolabtheme=ckanext.matolabtheme.plugin:MatolabthemePlugin
41+
""",
42+
1643
)

0 commit comments

Comments
 (0)