Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
validata-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Validata
validata-ui
Commits
721720cf
Commit
721720cf
authored
Jun 24, 2019
by
Christophe Benz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read version from text file
parent
eba5ec54
Pipeline
#1092
passed with stage
in 5 minutes and 1 second
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
8 deletions
+14
-8
setup.py
setup.py
+7
-4
validata_ui/VERSION
validata_ui/VERSION
+1
-0
validata_ui/__init__.py
validata_ui/__init__.py
+6
-3
validata_ui/version.py
validata_ui/version.py
+0
-1
No files found.
setup.py
View file @
721720cf
...
...
@@ -4,12 +4,15 @@ from pathlib import Path
from
setuptools
import
setup
from
validata_ui.version
import
VERSION
script_dir
=
Path
(
__file__
).
parent
# Gets the long description from the README.md file
readme_filepath
=
Path
(
__file__
).
parent
/
'README.md'
with
readme_filepath
.
open
(
'rt'
,
encoding
=
'utf-8'
)
as
fd_in
:
LONG_DESCRIPTION
=
fd_in
.
read
()
readme_filepath
=
script_dir
/
'README.md'
with
readme_filepath
.
open
(
'rt'
,
encoding
=
'utf-8'
)
as
fd
:
LONG_DESCRIPTION
=
fd
.
read
()
with
(
script_dir
/
'validata_ui'
/
'VERSION'
).
open
(
'rt'
,
encoding
=
'utf-8'
)
as
fd
:
VERSION
=
fd
.
read
()
setup
(
...
...
validata_ui/VERSION
0 → 100644
View file @
721720cf
0.2.1
validata_ui/__init__.py
View file @
721720cf
...
...
@@ -8,16 +8,18 @@ from urllib.parse import quote_plus
import
cachecontrol
import
flask
import
jinja2
import
opendataschema
import
pkg_resources
import
requests
import
tableschema
import
opendataschema
from
.
import
config
from
.version
import
VERSION
log
=
logging
.
getLogger
(
__name__
)
distribution
=
pkg_resources
.
get_distribution
(
"validata-ui"
)
VERSION
=
distribution
.
version
def
generate_schema_from_url_func
(
session
):
"""Generates a function that encloses session"""
...
...
@@ -91,6 +93,7 @@ def urlencode(context, value):
@
app
.
context_processor
def
inject_version
():
global
VERSION
return
{
"validata_ui_version"
:
VERSION
}
...
...
validata_ui/version.py
deleted
100644 → 0
View file @
eba5ec54
VERSION
=
'0.2.1'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment