Skip to content

Commit 587feb5

Browse files
committed
Merge branch 'soartech-dev'
2 parents 647eb19 + f825140 commit 587feb5

File tree

122 files changed

+13091
-3111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+13091
-3111
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
builds/
2+
codeclimate.json
3+
.tox
4+
output.xml
5+
.coverage
6+
.pytest_cache/
7+
htmlcov/
8+
*.pyc
9+
*.swp
10+
__pycache__/
11+
12+
113
# Byte-compiled / optimized / DLL files
214
__pycache__/
315
*.py[cod]
@@ -24,6 +36,8 @@ var/
2436
*.egg-info/
2537
.installed.cfg
2638
*.egg
39+
AUTHORS
40+
ChangeLog
2741

2842
# PyInstaller
2943
# Usually these files are written by a python script from a template
@@ -92,3 +106,6 @@ ENV/
92106

93107
# Temporary vim files
94108
*.swp
109+
110+
# PyCharm config
111+
.idea/

.gitlab-ci.yml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
image: "python:3.7"
2+
3+
variables:
4+
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
5+
6+
cache:
7+
paths:
8+
- .cache/pip
9+
10+
stages:
11+
- lint
12+
- test
13+
- document
14+
- deploy
15+
16+
flake8:
17+
stage: lint
18+
allow_failure: true
19+
script:
20+
- pip install flake8 flake8-junit-report
21+
- retval=0
22+
- flake8 --output-file flake8.txt apprentice/ || retval=$?
23+
- flake8_junit flake8.txt flake8_junit.xml
24+
- cat flake8.txt
25+
- exit "$retval"
26+
artifacts:
27+
when: always
28+
reports:
29+
junit: flake8_junit.xml
30+
tags:
31+
- base
32+
33+
coverage:
34+
stage: test
35+
allow_failure: true
36+
script:
37+
- pip install -r requirements.txt --exists-action w
38+
- pip install -r test-requirements.txt
39+
- retval=0
40+
- coverage run --source apprentice -m pytest || retval=$?
41+
- coverage html -d coverage
42+
- coverage report
43+
- exit "$retval"
44+
coverage: '/\d+\%\s*$/'
45+
artifacts:
46+
paths:
47+
- coverage
48+
tags:
49+
- base
50+
51+
pytest:
52+
stage: test
53+
allow_failure: false
54+
script:
55+
- pip install -r requirements.txt --exists-action w
56+
- pip install -r test-requirements.txt
57+
- python -m pytest
58+
artifacts:
59+
when: always
60+
reports:
61+
junit: output.xml
62+
tags:
63+
- base
64+
65+
sphinx:
66+
stage: document
67+
dependencies:
68+
- pytest
69+
script:
70+
- pip install -r requirements.txt --exists-action w
71+
- pip install -r docs/doc-requirements.txt
72+
- apt-get update
73+
- apt-get install make
74+
- cd docs
75+
- make html
76+
- mv _build/html/ ../sphinx
77+
artifacts:
78+
paths:
79+
- sphinx
80+
tags:
81+
- base
82+
only:
83+
- master
84+
85+
publish:
86+
stage: deploy
87+
dependencies:
88+
- sphinx
89+
script:
90+
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
91+
- eval $(ssh-agent -s)
92+
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
93+
- mkdir -p ~/.ssh
94+
- chmod 700 ~/.ssh
95+
- git config user.email "chris.maclellan@soartech.com"
96+
- git config user.name "Chris MacLellan (automated triskele)"
97+
- git remote rm public
98+
- git remote add public git@github.com:apprenticelearner/AL_Core.git
99+
- ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
100+
- git push public HEAD:soartech-dev
101+
tags:
102+
- base
103+
only:
104+
- master
105+
106+
pages:
107+
stage: deploy
108+
dependencies:
109+
- sphinx
110+
- coverage
111+
script:
112+
- mv sphinx public/
113+
- mv coverage public/coverage
114+
environment:
115+
name: pages
116+
url: https://hq-git.soartech.com/apprentice/apprentice
117+
artifacts:
118+
paths:
119+
- public
120+
tags:
121+
- base
122+
only:
123+
- master
124+
125+
dockerize:
126+
stage: deploy
127+
script:
128+
- docker build -t hq-git.soartech.com:4567/apprentice/apprentice .
129+
- docker push hq-git.soartech.com:4567/apprentice/apprentice
130+
tags:
131+
- shell
132+
only:
133+
- master
134+
135+
136+
# pypi:
137+
# stage: deploy
138+
# dependencies:
139+
# - pytest
140+
# script:
141+
# - pip install twine
142+
# - python setup.py sdist bdist_wheel
143+
# - twine upload --repository-url https://nexus.soartech.com:8443/nexus/repository/pypi-internal/ dist/*
144+
# tags:
145+
# - base
146+
# only:
147+
# - master

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
2+
3+
RUN apt-get update && apt install -y software-properties-common && apt-get clean && rm -rf /var/lib/apt/lists/*
4+
RUN add-apt-repository ppa:deadsnakes/ppa
5+
6+
RUN apt-get update && apt-get install -y --no-install-recommends \
7+
python3.8 \
8+
python3-pip \
9+
git \
10+
nano \
11+
&& \
12+
apt-get clean && \
13+
rm -rf /var/lib/apt/lists/*
14+
15+
RUN python3.8 -m pip install --upgrade pip setuptools wheel
16+
RUN python3.8 -m pip install torch
17+
18+
RUN mkdir -p /usr/local/apprentice
19+
WORKDIR /usr/local/apprentice
20+
COPY ./ /usr/local/apprentice
21+
22+
RUN python3.8 -m pip install -r requirements.txt --exists-action=w
23+
RUN python3.8 -m pip install .
24+
25+
RUN pytest tests
26+
27+
#CMD ["/usr/bin/python3.8", "/usr/local/apprentice/django/manage.py", "runserver"]
28+
#CMD ["/bin/sh", "-ec", "sleep 1000"]
File renamed without changes.

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Apprentice / AL_Core
2+
3+
[![Pipeline
4+
Status](https://hq-git.soartech.com/apprentice/apprentice/badges/master/pipeline.svg)](https://hq-git.soartech.com/apprentice/apprentice/commits/master)
5+
6+
[![Coverage
7+
Report](https://hq-git.soartech.com/apprentice/apprentice/badges/master/coverage.svg)](https://apprentice.hq-git.soartech.com/apprentice/coverage/)
8+
9+
Documentation: https://apprentice.hq-git.soartech.com/apprentice
10+
11+
The Apprentice Learner API, this library implement a general interface for
12+
training agents via demonstration and feedback.
13+
14+
This module can be installed with the following pip command: `pip install -f <git repo address>`
15+
116
# Installation
217
There are two main GitHub repositories for working with AL. We will refer to these as AL_Core (https://github.com/apprenticelearner/AL_Core), which is the core library, and AL_HTML (https://github.com/apprenticelearner/AL_HTML), which contains code for interfacing AL with CTAT-HTML tutors.
318

agents/BaseAgent.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)