Skip to content

Commit

Permalink
Merge pull request #425 from baobabsoluciones/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
ggsdc authored Mar 16, 2023
2 parents 0693e9b + f42c6b1 commit 2d436eb
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 30 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/cornflow-publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ jobs:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
- name: Tag published version for docker hub trigger
run: |
git config --local user.email "[email protected]"
git config --local user.name "cornflow"
git tag -a v${{ steps.split.outputs_1}} -m "Published cornflow version v${{ steps.split.outputs._1 }}"
git push origin v${{ steps.split.outputs_1}}
- name: Delete tag to launch release
run: git push --delete origin ${{ github.ref_name }}


git push --delete origin ${{ github.ref_name }}
7 changes: 4 additions & 3 deletions .github/workflows/test_cornflow_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
max-parallel: 21
matrix:
python-version: [3.7, 3.8]
python-version: [3.8, 3.9]
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
strategy:
max-parallel: 21
matrix:
python-version: [ 3.7, 3.8 ]
python-version: [ 3.8, 3.9 ]
os: [ ubuntu-latest ]

steps:
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
CLIENT_BRANCH="${{ github.head_ref || github.ref_name }}"
python -m pip install -U "git+https://github.com/baobabsoluciones/cornflow@${CLIENT_BRANCH}#subdirectory=libs/client"
python -m pip install -U "git+https://github.com/baobabsoluciones/cornflow@${CLIENT_BRANCH}#subdirectory=libs/core"
flask db upgrade
flask db upgrade -d cornflow/migrations/
flask access_init
flask register_deployed_dags -r http://127.0.0.1:8080 -u admin -p admin
flask create_admin_user -u admin -e [email protected] -p Adminpassword1!
Expand All @@ -136,6 +136,7 @@ jobs:
SECRET_KEY: THISNEEDSTOBECHANGED
OPEN_DEPLOYMENT: 1
AUTH_TYPE: 1
LOG_LEVEL: 10
- name: Run unit tests
run: |
coverage run --source=./cornflow_client/ -m unittest discover -s cornflow_client/tests/unit
Expand Down
5 changes: 5 additions & 0 deletions cornflow-dags/DAG/activate_dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ def solve(**kwargs):
else:
default_args = utils.default_args

kwargs = {}
if app.extra_args is not None:
kwargs = app.extra_args

dag = DAG(
app.name,
description=app.description,
default_args=default_args,
schedule_interval=None,
tags=["model"],
**kwargs
)
with dag:
t1 = PythonOperator(task_id=app.name, python_callable=solve)
Expand Down
2 changes: 1 addition & 1 deletion cornflow-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ENV DEBIAN_FRONTEND noninteractive
ENV TERM linux

# CORNFLOW vars
ARG CORNFLOW_VERSION=1.0.0
ARG CORNFLOW_VERSION=1.0.1

# install linux pkg
RUN apt update -y && apt-get install -y --no-install-recommends \
Expand Down
14 changes: 14 additions & 0 deletions cornflow-server/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version 1.0.1
---------------

- released: 2023-03-16
- comments: fixed requirements versions in order to better handle the dockerfile construction on dockerhub.
- changelog:
- fixed version of cornflow-core to 0.1.9
- fixed version of cornflow-client to 1.0.10

version 1.0.0
--------------

- released: 2023-03-15
- comments: initial release of cornflow package
2 changes: 1 addition & 1 deletion cornflow-server/cornflow/commands/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def register_actions_command(verbose: bool = True):

if verbose:
if len(actions_to_register) > 0:
current_app.logger.info("Actions registered: ", actions_to_register)
current_app.logger.info(f"Actions registered: {actions_to_register}")
else:
current_app.logger.info("No new actions to be registered")

Expand Down
38 changes: 19 additions & 19 deletions cornflow-server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
alembic==1.9.2
apispec
click
cornflow-core
cornflow-client
cryptography
apispec<=6.2.0
click<=8.1.3
cornflow-core<=0.1.9
cornflow-client<=1.0.10
cryptography<=39.0.2
Flask==2.1.3
flask-apispec
flask-cors
Flask-Migrate
flask-inflate
Flask-RESTful
flask-apispec<=0.11.4
flask-cors<=3.0.10
flask-inflate<=0.3
Flask-Migrate<=4.0.4
Flask-RESTful<=0.3.9
Flask-SQLAlchemy==2.5.1
gevent
greenlet
gunicorn
jsonpatch
marshmallow
PuLP
psycopg2
PyJWT
gevent<=22.10.2
greenlet<=2.0.2
gunicorn<=20.1.0
jsonpatch<=1.32
marshmallow<=3.19.0
PuLP<=2.7.0
psycopg2<=2.95
PyJWT<=2.6.0
SQLAlchemy==1.3.21
Werkzeug
Werkzeug<=2.2.3
2 changes: 1 addition & 1 deletion cornflow-server/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setuptools.setup(
name="cornflow",
version="1.0.0",
version="1.0.1",
author="baobab soluciones",
author_email="[email protected]",
description="Cornflow is an open source multi-solver optimization server with a REST API built using flask.",
Expand Down
9 changes: 9 additions & 0 deletions libs/client/cornflow_client/core/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ def default_args(self) -> Union[Dict, None]:
"""
return None

@property
def extra_args(self) -> Dict:
"""
Optional property
:return: dictionary with optional arguments for the DAG
"""
return None

@property
@abstractmethod
def instance(self) -> Type[InstanceCore]:
Expand Down
2 changes: 1 addition & 1 deletion libs/client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setuptools.setup(
name="cornflow-client",
version="1.0.9",
version="1.0.10",
author="baobab soluciones",
author_email="[email protected]",
description="Client to connect to a cornflow server",
Expand Down

0 comments on commit 2d436eb

Please sign in to comment.