Skip to content

Commit

Permalink
Merge pull request #99 from guzman-raphael/resource-naming
Browse files Browse the repository at this point in the history
Apply resource naming convention updates
  • Loading branch information
Synicix committed Mar 31, 2021
2 parents c2172f6 + 0c554d2 commit 45eec7b
Show file tree
Hide file tree
Showing 19 changed files with 767 additions and 681 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: |
export PHARUS_VERSION=$(cat pharus/version.py | tail -1 | awk -F\' '{print $2}')
export HOST_UID=$(id -u)
docker-compose -f docker-compose-docs.yaml up --exit-code-from pharus --build
docker-compose -f docker-compose-docs.yaml up --exit-code-from pharus-docs --build
echo "PHARUS_VERSION=${PHARUS_VERSION}" >> $GITHUB_ENV
- name: Add docs static artifacts
uses: actions/upload-artifact@v2
Expand Down
18 changes: 15 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@

Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.

## [Unreleased]
## [0.1.0] - 2021-03-31
### Added
- Local database instance pre-populated with sample data for `dev` Docker Compose environment. PR #99
- Capability to insert multiple, update multiple, and delete multiple. PR #99
- Allow dependency restriction to include secondary attributes from parent table. PR #99

### Changed
- Update `datajoint` to newly released `0.13.0`.
- Update `datajoint` to newly released `0.13.0`. PR #97
- Rename service `pharus` to `pharus-docs` in `docs` Docker Compose environment to allow simulataneous development. PR #99
- Update NGINX reverse proxy image reference. PR #99
- Refactored API design to align with common REST resource naming convention. (#38) PR #99
- Hide classes and methods that are internal and subject to change. PR #99

### Removed
- `InvalidDeleteRequest` exception is no longer available as it is now allowed to delete more than 1 record at a time. PR #99

## [0.1.0b2] - 2021-03-12

Expand Down Expand Up @@ -54,7 +66,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
- Support for DataJoint attribute types: `varchar`, `int`, `float`, `datetime`, `date`, `time`, `decimal`, `uuid`.
- Check dependency utility to determine child table references.

[Unreleased]: https://github.com/datajoint/pharus/compare/0.1.0b2...HEAD
[0.1.0]: https://github.com/datajoint/pharus/compare/0.1.0b2...0.1.0
[0.1.0b2]: https://github.com/datajoint/pharus/compare/0.1.0b0...0.1.0b2
[0.1.0b0]: https://github.com/datajoint/pharus/compare/0.1.0a5...0.1.0b0
[0.1.0a5]: https://github.com/datajoint/pharus/releases/tag/0.1.0a5
8 changes: 2 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
User Documentation
==================

.. warning::

The Pharus project is still early in its life and the maintainers are currently actively developing with a priority of addressing first critical issues directly related to the deliveries of `Alpha <https://github.com/datajoint/pharus/milestone/1>`_ and `Beta <https://github.com/datajoint/pharus/milestone/2>`_ milestones. Please be advised that while working through our milestones, we may restructure/refactor the codebase without warning until we issue our `Official Release <https://github.com/datajoint/pharus/milestone/3>`_ currently planned as ``0.1.0`` on ``2021-03-31``.

``pharus`` is a generic REST API server backend for `DataJoint <https://datajoint.io>`_ pipelines built on top of ``flask``, ``datajoint``, and ``pyjwt``.

- `Documentation <https://datajoint.github.io/pharus>`_
Expand Down Expand Up @@ -33,13 +29,13 @@ To start the API server, use the command:

.. code-block:: bash
PHARUS_VERSION=0.1.0b2 docker-compose -f docker-compose-deploy.yaml up -d
PHARUS_VERSION=0.1.0 docker-compose -f docker-compose-deploy.yaml up -d
To stop the API server, use the command:

.. code-block:: bash
PHARUS_VERSION=0.1.0b2 docker-compose -f docker-compose-deploy.yaml down
PHARUS_VERSION=0.1.0 docker-compose -f docker-compose-deploy.yaml down
References
----------
Expand Down
6 changes: 3 additions & 3 deletions docker-compose-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PHARUS_VERSION=0.1.0b2 docker-compose -f docker-compose-deploy.yaml pull
# PHARUS_VERSION=0.1.0b2 docker-compose -f docker-compose-deploy.yaml up -d
# PHARUS_VERSION=0.1.0 docker-compose -f docker-compose-deploy.yaml pull
# PHARUS_VERSION=0.1.0 docker-compose -f docker-compose-deploy.yaml up -d
#
# Intended for production deployment.
# Note: You must run both commands above for minimal outage
Expand All @@ -20,7 +20,7 @@ services:
# - PHARUS_PREFIX=/
fakeservices.datajoint.io:
<<: *net
image: datajoint/nginx:v0.0.15
image: datajoint/nginx:v0.0.16
environment:
- ADD_pharus_TYPE=REST
- ADD_pharus_ENDPOINT=pharus:5000
Expand Down
12 changes: 11 additions & 1 deletion docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ x-net: &net
networks:
- main
services:
local-db:
<<: *net
image: datajoint/mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=pharus
volumes:
- ./tests/init/init.sql:/docker-entrypoint-initdb.d/init.sql
pharus:
<<: *net
extends:
Expand All @@ -21,9 +28,12 @@ services:
volumes:
- ./pharus:/opt/conda/lib/python3.8/site-packages/pharus
command: pharus
depends_on:
local-db:
condition: service_healthy
fakeservices.datajoint.io:
<<: *net
image: datajoint/nginx:v0.0.15
image: datajoint/nginx:v0.0.16
environment:
- ADD_pharus_TYPE=REST
- ADD_pharus_ENDPOINT=pharus:5000
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# PY_VER=3.8 IMAGE=djtest DISTRO=alpine HOST_UID=$(id -u) docker-compose -f docker-compose-docs.yaml up --exit-code-from pharus --build
# PY_VER=3.8 IMAGE=djtest DISTRO=alpine HOST_UID=$(id -u) docker-compose -f docker-compose-docs.yaml up --exit-code-from pharus-docs --build
#
# Used to build documentation artifacts.
version: "2.4"
services:
pharus:
pharus-docs:
image: datajoint/${IMAGE}:py${PY_VER}-${DISTRO}
user: ${HOST_UID}:anaconda
volumes:
Expand Down
5 changes: 0 additions & 5 deletions pharus/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ class UnsupportedTableType(Exception):
class InvalidRestriction(Exception):
"""Exception raised when restrictions result in no records when expected at least one."""
pass


class InvalidDeleteRequest(Exception):
"""Exception raised when attempting to delete >1 or <1 records."""
pass
Loading

0 comments on commit 45eec7b

Please sign in to comment.