Skip to content

Commit

Permalink
Changes for deployment (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Dec 28, 2021
1 parent 550a8ee commit 6cdc726
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['33', '34']
version: ['34', '35']
container:
image: registry.fedoraproject.org/fedora:${{ matrix.version }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions config/dpkg/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dfkinds (20170604-1) unstable; urgency=low
dfkinds (20211228-1) unstable; urgency=low

* Auto-generated

-- Log2Timeline <log2timeline-dev@googlegroups.com> Sun, 04 Jun 2017 20:14:50 +0200
-- Log2Timeline maintainers <log2timeline-maintainers@googlegroups.com> Tue, 28 Dec 2021 04:57:45 +0100
2 changes: 1 addition & 1 deletion dfkinds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
different tools.
"""

__version__ = '20170604'
__version__ = '20211228'
10 changes: 10 additions & 0 deletions docs/sources/api/dfkinds.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
dfkinds package
===============

Module contents
---------------

.. automodule:: dfkinds
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions docs/sources/api/modules.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
acstore
dfkinds
=======

.. toctree::
:maxdepth: 4

acstore
dfkinds
2 changes: 1 addition & 1 deletion docs/sources/user/Installation-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ To install the release versions of the dependencies run:
```
set PYTHONPATH=.
C:\Python38\python.exe tools\update.py --preset dfkinds
C:\Python3\python.exe tools\update.py --preset dfkinds
```
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,22 +155,23 @@ def parse_requirements_from_file(path):
Args:
path (str): path to the requirements file.
Yields:
str: name and optional version information of the required package.
Returns:
list[str]: name and optional version information of the required packages.
"""
with open(path, 'r') as file_object:
file_contents = file_object.read()

requirements = []
for requirement in pkg_resources.parse_requirements(file_contents):
try:
name = str(requirement.req)
except AttributeError:
name = str(requirement)

if name.startswith('pip '):
continue
if not name.startswith('pip '):
requirements.append(name)

yield name
return requirements


dfkinds_description = (
Expand Down Expand Up @@ -200,7 +201,7 @@ def parse_requirements_from_file(path):
'Programming Language :: Python',
],
packages=find_packages('.', exclude=[
'tests', 'tests.*', 'utils']),
'docs', 'tests', 'tests.*', 'utils']),
package_dir={
'dfkinds': 'dfkinds'
},
Expand Down
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ deps =
commands =
codecov

[testenv:docs]
usedevelop = true
deps =
-rdocs/requirements.txt
commands =
sphinx-build -b html -d build/doctrees docs dist/docs
sphinx-build -b linkcheck docs dist/docs

[testenv:pylint]
skipsdist=True
pip_pre = True
Expand Down
28 changes: 28 additions & 0 deletions utils/update_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
#
# Script that makes changes in preparation of a new release, such as updating
# the version and documentation.

EXIT_FAILURE=1;
EXIT_SUCCESS=0;

VERSION=`date -u +"%Y%m%d"`
DPKG_DATE=`date -R`

# Update the Python module version.
sed "s/__version__ = '[0-9]*'/__version__ = '${VERSION}'/" -i dfkinds/__init__.py

# Update the version in the dpkg configuration files.
cat > config/dpkg/changelog << EOT
dfkinds (${VERSION}-1) unstable; urgency=low
* Auto-generated
-- Log2Timeline maintainers <log2timeline-maintainers@googlegroups.com> ${DPKG_DATE}
EOT

# Regenerate the API documentation.
tox -edocs

exit ${EXIT_SUCCESS};

0 comments on commit 6cdc726

Please sign in to comment.