Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #1187

Open
wants to merge 71 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
2fee45d
fix: standardise the dates displayed by datepicker
NRayya Jul 30, 2024
cb7ecd5
fix: replace the word "study" with "sample"
NRayya Aug 1, 2024
fa6c89e
Merge branch 'development' of https://github.com/NFDI4Chem/nmrxiv int…
NRayya Aug 1, 2024
09b5ec4
Merge branch 'development' of https://github.com/NFDI4Chem/nmrxiv int…
NRayya Aug 1, 2024
bbbee16
use mixins
NRayya Aug 1, 2024
73ae4aa
fix: add citation banner to public samples wherever missing
NRayya Aug 1, 2024
31ed8e9
fix: unify studies and datasets naming in bioschemas and datacite
NRayya Aug 2, 2024
aad1a62
Merge pull request #1154 from NFDI4Chem/standardise-datepicker
CS76 Aug 14, 2024
5ddaa59
Merge pull request #1157 from NFDI4Chem/remove-studies
CS76 Aug 14, 2024
3ed669a
Merge pull request #1160 from NFDI4Chem/citation-banner
CS76 Aug 14, 2024
79bd14c
Merge pull request #1162 from NFDI4Chem/datacite-bioschemas
CS76 Aug 14, 2024
7866fe2
refactor: remove redundancy and duplicates
NRayya Aug 20, 2024
c4cdc8a
fix: comment out methods to generate schema by name
NRayya Sep 10, 2024
4fee4a6
fix: remove project photo placeholder
NRayya Oct 18, 2024
7bc5702
Merge pull request #1166 from NFDI4Chem/remove-duplicated-code
CS76 Nov 8, 2024
8647a05
Merge pull request #1168 from NFDI4Chem/remove-schema-by-name-methods
CS76 Nov 8, 2024
5974f5d
Merge pull request #1172 from NFDI4Chem/project-photo
CS76 Nov 8, 2024
394ecc4
Apply Laravel coding style
laravel-shift Mar 11, 2025
1662c30
Convert string references to `::class`
laravel-shift Mar 11, 2025
7637d7e
Convert `optional()` to nullsafe operator
laravel-shift Mar 11, 2025
43fbacf
Remove unnecessary `$model` property
laravel-shift Mar 11, 2025
4d99513
Convert route options to fluent methods
laravel-shift Mar 11, 2025
470a7d1
Adopt class based routes
laravel-shift Mar 11, 2025
bf7d5be
Move `resources/lang` folder
laravel-shift Mar 11, 2025
a113736
Slim `lang` files
laravel-shift Mar 11, 2025
b6cf96e
Remove default `app` files
laravel-shift Mar 11, 2025
32203c8
Shift core files
laravel-shift Mar 11, 2025
f6fff1d
Streamline config files
laravel-shift Mar 11, 2025
ca84448
Set new `ENV` variables
laravel-shift Mar 11, 2025
4cd893c
Default new `bootstrap/app.php`
laravel-shift Mar 11, 2025
5d7a3bb
Re-register HTTP middleware
laravel-shift Mar 11, 2025
a5e3390
Consolidate service providers
laravel-shift Mar 11, 2025
bfd38f5
Re-register service providers
laravel-shift Mar 11, 2025
e138beb
Re-register routes
laravel-shift Mar 11, 2025
d7a88e5
Re-register scheduled commands
laravel-shift Mar 11, 2025
e2560dd
Bump Composer dependencies
laravel-shift Mar 11, 2025
8457bac
Use `<env>` tags for configuration
laravel-shift Mar 11, 2025
3f7ad9b
Adopt anonymous migrations
laravel-shift Mar 11, 2025
9650d0a
Rename `password_resets` table
laravel-shift Mar 11, 2025
7fb4332
Convert `$casts` property to method
laravel-shift Mar 11, 2025
7aa0674
Adopt Laravel type hints
laravel-shift Mar 11, 2025
d2386ca
Mark base controller as `abstract`
laravel-shift Mar 11, 2025
5222836
Remove `CreatesApplication` testing trait
laravel-shift Mar 11, 2025
3dbe0cf
Shift cleanup
laravel-shift Mar 11, 2025
9165f76
Merge pull request #1183 from NFDI4Chem/shift-143338
CS76 Mar 11, 2025
260ded2
Merge pull request #1184 from NFDI4Chem/laravel-11x-migration
CS76 Mar 11, 2025
6f97698
Shift core files
laravel-shift Mar 11, 2025
fe75c1c
Remove unused `ValidatesRequests` trait
laravel-shift Mar 11, 2025
bf88452
Remove unused `AuthorizesRequests` trait
laravel-shift Mar 11, 2025
5d83d50
Remove unused `DispatchesJobs` trait
laravel-shift Mar 11, 2025
f7b3526
Remove base controller inheritance
laravel-shift Mar 11, 2025
9cc0278
Default config files
laravel-shift Mar 11, 2025
9ca8f1c
Shift `ENV` variables
laravel-shift Mar 11, 2025
16ba14c
Add new Laravel `composer run dev` script
laravel-shift Mar 11, 2025
bdc1b06
Add `storage/app/private` folder
laravel-shift Mar 11, 2025
b7f185c
Bump Composer dependencies
laravel-shift Mar 11, 2025
3f24c19
Shift cleanup
laravel-shift Mar 11, 2025
c2fc1fa
Merge pull request #1185 from NFDI4Chem/shift-143341
CS76 Mar 11, 2025
06c9bf5
Merge pull request #1186 from NFDI4Chem/laravel-12x-migration
CS76 Mar 11, 2025
a93b53c
feat: laravel 12 migration completed
CS76 Mar 12, 2025
1e8447b
fix: npm audit fixes
CS76 Mar 12, 2025
6e283db
fix: docs build fix
CS76 Mar 12, 2025
df6e6fd
fix: package.json regenerated
CS76 Mar 12, 2025
eb28eba
fix: updated github actions workflow file for docs deployment
CS76 Mar 12, 2025
1834dd4
fix: rollup bug fix
CS76 Mar 12, 2025
65535e6
fix: updated docs deployment branch
CS76 Mar 12, 2025
03dac32
fix: various jetstream latest version issue fixes and tests updates
CS76 Mar 12, 2025
15ec810
fix: vite build fail issue fix
CS76 Mar 12, 2025
7a57df6
fix: fixed test cases
CS76 Mar 12, 2025
a2840cf
fix: upgraded node version to avoid unsupported engine error
CS76 Mar 12, 2025
bef5de0
fix: null value exception handling
CS76 Mar 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .env.ci.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ DB_DATABASE=nmrxiv
DB_USERNAME=postgres
DB_PASSWORD=postgres

BROADCAST_DRIVER=log
CACHE_DRIVER=file
BROADCAST_CONNECTION=log
CACHE_STORE=file
FILESYSTEM_DRIVER=local
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
Expand All @@ -44,7 +44,7 @@ MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_SCHEME=null
MAIL_FROM_ADDRESS=info@nmrxiv.org
MAIL_FROM_NAME="${APP_NAME}"

Expand Down
19 changes: 16 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost:80

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database
PHP_CLI_SERVER_WORKERS=4

BCRYPT_ROUNDS=12
APP_DESCRIPTION='nmrXiv is currently developed as the FAIR, consensus-driven NMR data repository and computational platform. The ultimate goal is to accelerate broader coordination and data sharing among natural product (NP) researchers by enabling the storage, management, sharing and analysis of NMR data.'
COOL_OFF_PERIOD=10
SCHEMA_VERSION=beta
Expand All @@ -20,6 +29,7 @@ DATACITE_API=https://api.datacite.org/


LOG_CHANNEL=stack
LOG_STACK=single
LOG_LEVEL=debug

DB_CONNECTION=pgsql
Expand All @@ -29,12 +39,15 @@ DB_DATABASE=nmrxiv
DB_USERNAME=sail
DB_PASSWORD=password

BROADCAST_DRIVER=log
CACHE_DRIVER=file
BROADCAST_CONNECTION=log
CACHE_STORE=file
FILESYSTEM_DRIVER=local
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

MEMCACHED_HOST=memcached

Expand All @@ -48,7 +61,7 @@ MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_SCHEME=null
MAIL_FROM_ADDRESS=info.nmrxiv@uni-jena.de
MAIL_FROM_NAME="${APP_NAME}"

Expand Down
71 changes: 51 additions & 20 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,64 @@
name: Docs Deployment - GitHub pages

on:
workflow_dispatch: {}
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches:
- development
branches: [development]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
deploy:
# Build job
build:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
fetch-depth: 0 # Not needed if lastUpdated is not enabled
# - uses: pnpm/action-setup@v3 # Uncomment this block if you're using pnpm
# with:
# version: 9 # Not needed if you've set "packageManager" in package.json
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- name: Build
run: npm run docs:build
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
- name: Build with VitePress
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist
- name: Deploy

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/public/build
/public/storage
/storage/*.key
/storage/pail
/vendor
.env
.env.backup
Expand All @@ -13,6 +14,7 @@ Homestead.yaml
npm-debug.log
yarn-error.log
/.idea
/.nova
/.vscode
/resources/ops/kubernetes/secret.yml
docs/.vitepress/dist
Expand Down
10 changes: 0 additions & 10 deletions .pre-commit-config.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion app/Actions/Jetstream/CreateTeam.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function create($user, array $input)
'personal_team' => false,
]));

//return $team;
// return $team;
return redirect()->route('dashboard')->with('success', 'Team created successfully');
}
}
2 changes: 1 addition & 1 deletion app/Actions/Project/CreateNewProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function create(array $input)
$user, ['role' => 'creator']
);
}
$validaton = new Validation();
$validaton = new Validation;
$validaton->save();
$project->associate($validation);
$project->save();
Expand Down
20 changes: 10 additions & 10 deletions app/Actions/Project/DeleteProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ public function deleteStudy($study)
{
$datasets = $study->datasets;
$sample = $study->sample;
//Detach Molecules and Delete Sample
// Detach Molecules and Delete Sample
if ($sample) {
$this->deleteSample($sample);
}
foreach ($datasets as $dataset) {
$this->deleteDatasets($dataset);
}
//Delete Study
// Delete Study
$study->delete();
}

Expand All @@ -115,7 +115,7 @@ public function deleteDatasets($dataset)
if ($nmriumInfo) {
$this->deleteNMRium($nmriumInfo);
}
//Delete Dataset
// Delete Dataset
$dataset->delete();
}

Expand All @@ -133,26 +133,26 @@ public function deleteProject($project)
$draft = $project->draft;
$validation = $project->validation;

//Detach Authors
// Detach Authors
if ($authors && count($authors) > 0) {
$project->authors()->detach(
$authors
);
}
//Detach Citations
// Detach Citations
if ($citations && count($citations) > 0) {
$project->citations()->detach(
$citations
);
}
//Delete Validations
// Delete Validations
if ($validation) {
$validation->delete();
}
//Delete Project
// Delete Project
$project->delete();

//Delete Draft and Files
// Delete Draft and Files
if ($draft) {
$this->deleteDraft($draft);
}
Expand Down Expand Up @@ -183,12 +183,12 @@ public function deleteNMRium($nmriumInfo)
*/
public function deleteDraft($draft)
{
//Delete Files
// Delete Files
$files = $draft->files;
foreach ($files as $file) {
$this->deleteFSO($file);
}
//Delete Draft
// Delete Draft
$draft = $draft->refresh();
$draft->delete();
}
Expand Down
2 changes: 1 addition & 1 deletion app/Actions/Project/InviteProjectMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function invite($user, $project, string $email, ?string $role = null, ?st

$this->validate($project, $email, $role, $message);

//InvitingProjectMember::dispatch($project, $email, $role, $message);
// InvitingProjectMember::dispatch($project, $email, $role, $message);

$invitation = $project->projectInvitations()->create([
'email' => $email,
Expand Down
4 changes: 2 additions & 2 deletions app/Actions/Project/UpdateProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function update(Project $project, array $input)
$validation = $project->validation;

if (! $validation) {
$validation = new Validation();
$validation = new Validation;
$validation->save();
$project->validation()->associate($validation);
$project->save();
Expand Down Expand Up @@ -145,7 +145,7 @@ public function update(Project $project, array $input)
*/
public function attachAuthor(Project $project, $authors)
{
//dd($authors);
// dd($authors);
$authors_map = [];
$index = 0;
foreach ($authors as $author) {
Expand Down
4 changes: 2 additions & 2 deletions app/Actions/Study/InviteStudyMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function invite($user, $study, string $email, ?string $role = null, ?stri

$this->validate($study, $email, $role, $message);

//InvitingStudyMember::dispatch($study, $email, $role, $message);
// InvitingStudyMember::dispatch($study, $email, $role, $message);

$invitation = $study->studyInvitations()->create([
'email' => $email,
Expand All @@ -43,7 +43,7 @@ public function invite($user, $study, string $email, ?string $role = null, ?stri
$invitedUser = User::where('email', $invitation->email)->first();

if ($invitedUser) {
//$invitedUser->notify(new StudyInviteNotification($invitation));
// $invitedUser->notify(new StudyInviteNotification($invitation));
event(new StudyInvite($invitedUser, $invitation));
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Commands/ArchiveData.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class ArchiveData extends Command
/**
* Execute the console command.
*/
public function handle()
public function handle(): void
{
return DB::transaction(function () {
DB::transaction(function () {
$projects = Project::where([
['is_public', true],
['download_url', null],
Expand Down
4 changes: 1 addition & 3 deletions app/Console/Commands/AssignDOIs.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ class AssignDOIs extends Command

/**
* Execute the console command.
*
* @return int
*/
public function handle(AssignIdentifier $assigner)
public function handle(AssignIdentifier $assigner): int
{
return DB::transaction(function () use ($assigner) {
$projects = Project::where([
Expand Down
4 changes: 1 addition & 3 deletions app/Console/Commands/AssignIdentifiers.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ class AssignIdentifiers extends Command

/**
* Execute the console command.
*
* @return int
*/
public function handle(DOIService $doiService)
public function handle(DOIService $doiService): int
{
return DB::transaction(function () use ($doiService) {
$projects = Project::where([
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/DataBackup.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DataBackup extends Command
/**
* Execute the console command.
*/
public function handle()
public function handle(): void
{
DataBackupJob::dispatch();
}
Expand Down
4 changes: 1 addition & 3 deletions app/Console/Commands/DeleteAuthor.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ class DeleteAuthor extends Command

/**
* Execute the console command.
*
* @return int
*/
public function handle()
public function handle(): int
{
$ids = $this->argument('ids') ? explode(',', $this->argument('ids')) : null;
if ($ids) {
Expand Down
4 changes: 1 addition & 3 deletions app/Console/Commands/DeleteCitation.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ class DeleteCitation extends Command

/**
* Execute the console command.
*
* @return int
*/
public function handle()
public function handle(): int
{
$ids = $this->argument('ids') ? explode(',', $this->argument('ids')) : null;
if ($ids) {
Expand Down
Loading