-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modifying init file including version number
- Loading branch information
Showing
3 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,8 @@ | |
# Standard library imports | ||
from __future__ import division, print_function # Python 3 compatibility | ||
|
||
# Define double undescore variables (https://peps.python.org/pep-0008/#module-level-dunder-names) | ||
# Define double undescore variables | ||
# https://peps.python.org/pep-0008/#module-level-dunder-names | ||
__author__ = "Ghislain Vieilledent" | ||
__email__ = "[email protected]" | ||
__version__ = "1.1" | ||
|
@@ -47,4 +48,4 @@ | |
from .validate import resample_sum | ||
from .validate import validation_npix | ||
|
||
# EOF | ||
# EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Installation setup. | ||
""" | ||
|
||
# ============================================================================== | ||
# author :Ghislain Vieilledent | ||
# email :[email protected], [email protected] | ||
|
@@ -20,11 +23,11 @@ | |
# find_version | ||
def find_version(): | ||
"""Finding package version.""" | ||
with open('forestatrisk/forestatrisk.py', encoding="utf-8") as far_file: | ||
far = far_file.read() | ||
with open('forestatrisk/__init__.py', encoding="utf-8") as init_file: | ||
init_text = init_file.read() | ||
far_version = re.search( | ||
'^__version__\\s*=\\s*"(.*)"', | ||
far, re.M).group(1) | ||
init_text, re.M).group(1) | ||
return far_version | ||
|
||
|
||
|