Skip to content

Commit

Permalink
feat: ✨ Prepare v12.2.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobiClark committed Aug 18, 2023
2 parents 325d677 + 977e2a9 commit 32cac2e
Show file tree
Hide file tree
Showing 26 changed files with 249 additions and 100 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/Build-and-deploy-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ run-name: ${{ github.actor }} is building a linux release for SODA
on:
push:
branches:
- staging
- main

jobs:
Expand All @@ -23,10 +24,13 @@ jobs:

- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
activate-environment: env-electron-python
environment-file: tools/anaconda-env/environment-Linux.yml
auto-update-conda: true
auto-activate-base: false
- run: |
conda activate env-electron-python
conda info
conda list
Expand All @@ -37,10 +41,12 @@ jobs:
- name: Install package.json modules and their dependencies
run: npm install --ignore-scripts

- name: Build and deploy on Linux
- name: Build the python server executable
run: |
npm run python-onefile-build-unix
- name: Deploy the app to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
conda activate env-electron-python
npm run python-onefile-build
npm run deploy-linux
12 changes: 9 additions & 3 deletions .github/workflows/Build-and-deploy-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ run-name: ${{ github.actor }} is building a MAC release for SODA
on:
push:
branches:
- staging
- main

jobs:
Expand All @@ -23,10 +24,13 @@ jobs:

- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
activate-environment: env-electron-python
environment-file: tools/anaconda-env/environment-MAC.yml
auto-update-conda: true
auto-activate-base: false
- run: |
conda activate env-electron-python
conda info
conda list
Expand All @@ -42,12 +46,14 @@ jobs:
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}

- name: Build and deploy on MAC
- name: Build the python server executable
run: |
npm run python-onefile-build-unix
- name: Deploy the app to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
appleId: ${{ secrets.APPLE_ID }}
appleIdPassword: ${{ secrets.APPLE_PASSWORD }}
run: |
conda activate env-electron-python
npm run python-onefile-build
npm run deploy-mac
13 changes: 10 additions & 3 deletions .github/workflows/Build-and-deploy-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- staging
- main

jobs:
deploy-on-windows:
Expand All @@ -17,16 +18,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9

- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
activate-environment: env-electron-python
environment-file: tools/anaconda-env/environment-Windows.yml
auto-update-conda: true
auto-activate-base: false
- run: |
conda activate env-electron-python
conda info
conda list
Expand All @@ -37,9 +41,12 @@ jobs:
- name: Install package.json modules and their dependencies
run: npm install --ignore-scripts

- name: Build and deploy on Windows
- name: Build the python server executable
run: |
npm run python-onefile-build-win
- name: Deploy the app to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run python-onefile-build
npm run deploy-win
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to SODA will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## v.12.2.1 - 2023-08-18

## Bug fixes:

- Free Form Mode's Standalone Validator feature no longer shows a validation results table when validation fails due to a user missing required metadata files.
- Linking your ORCID ID with Pennsieve through SODA for SPARC no longer fails to authenticate when given a valid user profile.

## v.12.2.0 - 2023-08-01

## Feature Additions:
Expand Down
27 changes: 21 additions & 6 deletions assets/css/guided.css
Original file line number Diff line number Diff line change
Expand Up @@ -705,20 +705,35 @@
opacity: 0.75;
}

/* Styling for tile buttons when selected/not-selected */
.guided--radio-button.tile-button.selected {
border: 1px solid var(--color-light-green);
box-shadow: 0px 0px 3px 0px var(--color-light-green);
transition: all 0.25s linear;
-webkit-transition: all 0.25s linear;
}

/*.guided--radio-button.selected {
opacity: 1 !important;
.guided--simple-radio-button {
width: 100%;
display: flex;
flex-direction: row;
align-items: flex-start;
padding: 10px;
border: 1px solid transparent; /* Set a transparent border by default to prevent layout shift */
border-radius: 5px;
box-shadow: 0px 0px 10px #d5d5d5;
margin: 5px 0px;
background-color: #fff;
}

.guided--simple-radio-button:hover {
outline: none;
box-shadow: 0px 0px 3px 0px var(--color-light-green);
cursor: pointer;
}
.guided--simple-radio-button.selected {
border: 1px solid var(--color-light-green);
box-shadow: 0px 0px 3px 0px var(--color-light-green);
}
.guided--radio-button.not-selected {
opacity: 0.4 !important;
}*/

.guided--card-large {
max-width: 180px !important;
Expand Down
Binary file added libcrypto-1_1-x64.dll
Binary file not shown.
Binary file added libssl-1_1-x64.dll
Binary file not shown.
11 changes: 7 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,13 @@ const getScriptPath = () => {
return path.join(__dirname, PY_FLASK_FOLDER, PY_FLASK_MODULE + ".py");
}
if (process.platform === "win32") {
return path.join(__dirname, PY_FLASK_DIST_FOLDER, PY_FLASK_MODULE + ".exe");
const winPath = path.join(__dirname, PY_FLASK_DIST_FOLDER, PY_FLASK_MODULE + ".exe");
log.info("Path to server executable: " + winPath);
return winPath;
} else {
log.info("Since app is packaged returning path: ");
return path.join(process.resourcesPath, PY_FLASK_MODULE);
const unixPath = path.join(process.resourcesPath, PY_FLASK_MODULE);
log.info("Path to server executable: " + unixPath);
return unixPath;
}
};
const selectPort = () => {
Expand All @@ -108,7 +111,7 @@ const createPyProc = async () => {
if (require("fs").existsSync(script)) {
log.info("server exists at specified location");
} else {
log.info("server does not exist at specified location");
log.info("server doesn't exist at specified location");
}
fp(PORT, PORT + portRange)
.then(([freePort]) => {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "soda-for-sparc",
"productName": "SODA for SPARC",
"version": "12.2.0",
"version": "12.2.1",
"description": "Keep Calm and Curate ",
"main": "main.js",
"scripts": {
Expand All @@ -12,7 +12,8 @@
"deploy-win": "electron-builder build --win --publish always",
"deploy-mac": "electron-builder build --mac --publish always",
"deploy-linux": "electron-builder build --linux --publish always",
"python-onefile-build": "python -m PyInstaller --onefile --clean ./pyflask/app.py --distpath ./pyflaskdist",
"python-onefile-build-unix": "python -m PyInstaller --onefile --clean ./pyflask/app.py --distpath ./pyflaskdist",
"python-onefile-build-win": "python -m PyInstaller --onefile --add-data libcrypto-1_1-x64.dll;. --add-data libssl-1_1-x64.dll;. --clean ./pyflask/app.py --distpath ./pyflaskdist",
"postinstall": "electron-builder install-app-deps",
"format": "prettier --ignore-path .gitignore --ignore-path .prettierignore \"./**/*.+(html|css|js|md|yml)\" --write",
"commit": "cz",
Expand Down
2 changes: 1 addition & 1 deletion pyflask/authentication/authenticate.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,4 +321,4 @@ def get_pennsieve_api_key_secret(email, password, keyname):
"name": profile_name
}
except Exception as e:
raise e
raise e
Binary file added pyflask/libcrypto-1_1-x64.dll
Binary file not shown.
Binary file added pyflask/libssl-1_1-x64.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions pyflask/startup/minimumApiVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
def get_api_version():
"""
Returns the version of the API
"""
return {'version': os.getenv('API_VERSION', "12.2.0")}
"""
return {'version': os.getenv('API_VERSION', "12.2.1")}
16 changes: 4 additions & 12 deletions pyflask/users/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
from constants import PENNSIEVE_URL
from utils import (
create_request_headers,
connect_pennsieve_client,
authenticate_user_with_client,
)
from namespaces import NamespaceEnum, get_namespace_logger
from flask import abort
from authentication import get_access_token, get_cognito_userpool_access_token, bf_add_account_username, bf_delete_account, bf_delete_default_profile, delete_duplicate_keys
from authentication import get_access_token, get_cognito_userpool_access_token, bf_add_account_username, delete_duplicate_keys

logger = get_namespace_logger(NamespaceEnum.USER)



def integrate_orcid_with_pennsieve(access_code, pennsieve_account):
def integrate_orcid_with_pennsieve(access_code):
"""
Given an OAuth access code link a user's ORCID ID to their Pennsieve account.
This is required in order to publish a dataset for review with the SPARC Consortium.
Expand All @@ -24,17 +22,11 @@ def integrate_orcid_with_pennsieve(access_code, pennsieve_account):
if access_code == "" or access_code is None:
abort(400, "Cannot integrate your ORCID iD to Pennsieve without an access code.")

# verify Pennsieve account
try:
ps = connect_pennsieve_client()
authenticate_user_with_client(ps, pennsieve_account)
except Exception as e:
abort(400, "Error: Please select a valid Pennsieve account")
token = get_access_token()


try:
jsonfile = {"authorizationCode": access_code}
r = requests.post(f"{PENNSIEVE_URL}/user/orcid", json=jsonfile, headers=create_request_headers(ps))
r = requests.post(f"{PENNSIEVE_URL}/user/orcid", json=jsonfile, headers=create_request_headers(token))
r.raise_for_status()

return r.json()
Expand Down
Loading

0 comments on commit 32cac2e

Please sign in to comment.