-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from Oceans-1876/release-1.0.0
Release 1.0.0
- Loading branch information
Showing
18 changed files
with
1,623 additions
and
1,485 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 |
---|---|---|
|
@@ -15,7 +15,7 @@ jobs: | |
steps: | ||
# Checkout source code | ||
- name: Check out source code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
# Calculate some variables that are used later | ||
- name: Version information | ||
|
@@ -29,7 +29,7 @@ jobs: | |
fi | ||
echo "GITHUB_BRANCH=${BRANCH}" >> $GITHUB_ENV | ||
if [ "$BRANCH" == "main" ]; then | ||
version=$(cat package.json | grep \"version\" | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,",]//g' | tr -d '[[:space:]]') | ||
version=$(awk -F= '/^version/ { print $2}' pyproject.toml | sed 's/[ "]//g') | ||
tags="latest" | ||
oldversion="" | ||
while [ "${oldversion}" != "${version}" ]; do | ||
|
@@ -52,6 +52,7 @@ jobs: | |
uses: elgohr/[email protected] | ||
env: | ||
BRANCH: ${{ env.GITHUB_BRANCH }} | ||
VERSION: ${{ env.VERSION }} | ||
BUILDNUMBER: ${{ github.run_number }} | ||
GITSHA1: ${{ github.sha }} | ||
with: | ||
|
@@ -60,7 +61,7 @@ jobs: | |
password: ${{ secrets.GITHUB_TOKEN }} | ||
registry: ghcr.io | ||
tags: "${{ env.TAGS }}" | ||
buildargs: BRANCH,BUILDNUMBER,GITSHA1 | ||
buildargs: BRANCH,VERSION,BUILDNUMBER,GITSHA1 | ||
dockerfile: docker/Dockerfile | ||
|
||
- name: Deploy to prod server | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Run unit test | |
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: [ opened, edited ] | ||
types: [opened, edited, synchronize] | ||
|
||
jobs: | ||
pytest: | ||
|
@@ -37,7 +37,7 @@ jobs: | |
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
|
@@ -68,3 +68,4 @@ jobs: | |
POSTGRES_DB: challenger_expedition | ||
FIRST_SUPERUSER: [email protected] | ||
FIRST_SUPERUSER_PASSWORD: secret_password | ||
SECRET_KEY: pytest_secret_key |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.0.0] - 2023-12-04 | ||
|
||
### Added | ||
|
||
- Added Roboto Bold font (in `fonts` submodule). | ||
|
||
### Fixed | ||
|
||
- Optimized station search. | ||
- Fixed pytest workflow failure. | ||
|
||
### Changed | ||
|
||
- Added temporary binomial name filter at species endpoints. | ||
- Replaced string similarity function for fuzzy search. | ||
- Minor changes to several API endpoints. | ||
|
||
## [0.1.0] - 2022-12-21 | ||
|
||
- The initial release of the Challenger-API. |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Contributors | ||
|
||
- Chris Navarro | ||
- Kaveh Karimi-Asli | ||
- Rashmil Panchani | ||
- Michael Wieck-Sosa | ||
- Olajide Jegede | ||
- Wenqi He |
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
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
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,17 +1,23 @@ | ||
from typing import Any, Optional | ||
from typing import Any, Optional, cast | ||
|
||
from sqlalchemy.orm import Session | ||
|
||
from app.crud.base import CRUDBase | ||
from app.models import Station | ||
from app.schemas import StationCreate, StationSummaryPagination, StationUpdate | ||
from app.utils.species import binomial_only | ||
|
||
|
||
class CRUDStation( | ||
CRUDBase[Station, StationCreate, StationUpdate, StationSummaryPagination] | ||
): | ||
def get(self, db: Session, id: Any) -> Optional[Station]: | ||
return db.query(self.model).filter(self.model.name == id).first() | ||
station = cast( | ||
Station, db.query(self.model).filter(self.model.name == id).first() | ||
) | ||
if station: | ||
station.species = binomial_only(station.species) | ||
return station | ||
|
||
|
||
station = CRUDStation(Station) |
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from typing import List | ||
|
||
from app.models import Species | ||
|
||
|
||
def binomial_only(species: List[Species]) -> List[Species]: | ||
""" | ||
TODO: This is a temporary fix. In the future, we could consider filtering out genera | ||
when loading data into the database or as part of the OCR workflow. | ||
""" | ||
# Unlike `current_name`, `current_canonical_full_name` doesn't include | ||
# author(s) and year of publication, so for a genus, there won't be any spaces. | ||
return [ | ||
sp | ||
for sp in species | ||
if sp.current_canonical_simple_name and " " in sp.current_canonical_simple_name | ||
] |
Submodule data
updated
15 files
Oops, something went wrong.