Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fractalis
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fractalis
fractalis
Commits
c1749f6e
There was a problem fetching the pipeline metadata.
Commit
c1749f6e
authored
7 years ago
by
Sascha Herzinger
Browse files
Options
Downloads
Patches
Plain Diff
Making project compatible with python 3.4
parent
466db455
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fractalis/sync.py
+4
-1
4 additions, 1 deletion
fractalis/sync.py
fractalis/utils.py
+5
-7
5 additions, 7 deletions
fractalis/utils.py
setup.py
+20
-19
20 additions, 19 deletions
setup.py
with
29 additions
and
27 deletions
fractalis/sync.py
+
4
−
1
View file @
c1749f6e
...
...
@@ -55,7 +55,10 @@ def cleanup_all() -> None:
for
key
in
redis
.
keys
(
'
data:*
'
):
value
=
redis
.
get
(
key
)
data_state
=
json
.
loads
(
value
)
celery
.
AsyncResult
(
data_state
[
'
task_id
'
]).
get
(
propagate
=
False
)
try
:
celery
.
AsyncResult
(
data_state
.
get
(
'
task_id
'
)).
get
(
propagate
=
False
)
except
ValueError
:
pass
# celery.control.revoke(data_state['task_id'], terminate=True,
# signal='SIGUSR1', wait=True)
redis
.
flushall
()
...
...
This diff is collapsed.
Click to expand it.
fractalis/utils.py
+
5
−
7
View file @
c1749f6e
import
os
import
glob
import
inspect
import
importlib
from
pathlib
import
Path
from
typing
import
List
from
importlib.machinery
import
SourceFileLoader
def
import_module_by_abs_path
(
module_path
:
str
)
->
object
:
...
...
@@ -11,10 +12,7 @@ def import_module_by_abs_path(module_path: str) -> object:
:return: A reference to the imported module.
"""
module_name
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
module_path
))[
0
]
spec
=
importlib
.
util
.
spec_from_file_location
(
module_name
,
module_path
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
spec
.
loader
.
exec_module
(
module
)
return
module
return
SourceFileLoader
(
module_name
,
module_path
).
load_module
()
def
list_classes_with_base_class
(
...
...
@@ -28,8 +26,8 @@ def list_classes_with_base_class(
package
=
importlib
.
import_module
(
package
)
abs_path
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
package
.
__file__
))
class_list
=
[]
for
module_path
in
glob
.
i
glob
(
'
{}/
*/**/*.py
'
.
format
(
abs_path
),
recursive
=
True
):
for
f
in
Path
(
abs_path
).
glob
(
'
*/**/*.py
'
):
module_path
=
str
(
f
)
if
not
os
.
path
.
basename
(
module_path
).
startswith
(
'
_
'
):
module
=
import_module_by_abs_path
(
module_path
)
classes
=
inspect
.
getmembers
(
module
,
inspect
.
isclass
)
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
20
−
19
View file @
c1749f6e
...
...
@@ -8,29 +8,30 @@ setup(
packages
=
find_packages
(),
include_package_data
=
True
,
install_requires
=
[
'
Flask
'
,
'
flask-cors
'
,
'
Flask-Script
'
,
'
flask-request-id-middleware
'
,
'
flask-compress
'
,
'
jsonschema
'
,
'
celery[redis]
'
,
'
redis
'
,
'
pandas
'
,
'
numpy
'
,
'
scipy
'
,
'
sklearn
'
,
'
requests
'
,
'
PyYAML
'
,
'
pycryptodomex
'
,
'
rpy2
'
'
Flask==0.12.2
'
,
'
flask-cors==3.0.3
'
,
'
Flask-Script==2.0.6
'
,
'
flask-request-id-middleware==1.1
'
,
'
flask-compress==1.4.0
'
,
'
typing==3.6.2
'
,
'
jsonschema==2.6.0
'
,
'
celery[redis]==4.1.0
'
,
'
redis==2.10.6
'
,
'
numpy==1.13.3
'
,
'
scipy==0.19.1
'
,
'
pandas==0.20.3
'
,
'
sklearn==0.0
'
,
'
requests==2.18.4
'
,
'
PyYAML==3.12
'
,
'
pycryptodomex==3.4.7
'
,
'
rpy2==2.9.0
'
],
setup_requires
=
[
'
pytest-runner
'
,
'
pytest-runner
==2.12.1
'
,
],
tests_require
=
[
'
pytest==3.0.3
'
,
'
pytest-mock
'
,
'
responses
'
'
pytest-mock
==1.6.3
'
,
'
responses
==0.8.1
'
]
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment