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

MATH-42 #7

Merged
merged 22 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf

[*.{xml,yml}]
indent_size = 2
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* text=auto eol=lf
*.cs linguist-detectable=true
*.js linguist-detectable=false
*.cshtml linguist-detectable=false
*.razor linguist-detectable=false
*.html linguist-detectable=false
*.htm linguist-detectable=false
*.xml linguist-detectable=false
*.css linguist-detectable=false
*.m linguist-detectable=false
*.nb linguist-detectable=false
93 changes: 72 additions & 21 deletions .github/workflows/build-and-deploy-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,90 @@ name: Build and Deploy PDF

on:
push:
branches:
- master
- main
tags:
- v*
workflow_dispatch:

env:
FILE_NAME: "AStudyOnDynamicEquations"
ACTIONS_RUNNER_DEBUG: false

jobs:
build-resume:
build-pdf:
runs-on: ubuntu-latest
name: Create document
name: Build and Deploy PDF

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Convert to pdf
id: convert-to-pdf
uses: xu-cheng/latex-action@v2
uses: actions/checkout@v4
with:
root_file: AStudyOnDynamicEquations.tex
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v1.1.1
with:
versionSpec: '5.x'

- name: Determine Version
uses: gittools/actions/gitversion/execute@v1.1.1

- name: Print SemVer
run: |
echo "SemVer: ${{ env.GitVersion_SemVer }}"
echo "BranchName: ${{ env.GitVersion_BranchName }}"
echo "ShortSha: ${{ env.GitVersion_ShortSha }}"
newVersion="${{ env.GitVersion_SemVer }}+${{ env.GitVersion_BranchName }}.${{ env.GitVersion_ShortSha }}"
echo "Next version: $newVersion"

- name: Update version.tex
shell: bash
run: |
newVersion="${{ env.GitVersion_SemVer }}+${{ env.GitVersion_BranchName }}.${{ env.GitVersion_ShortSha }}"
sed -i "s|Local-0.1.0|$newVersion|" "src/sections/version.tex"

- name: Build PDF
uses: xu-cheng/latex-action@v3
with:
root_file: "${{ env.FILE_NAME }}.tex"
working_directory: src
- uses: actions/upload-artifact@v2

- name: List src
run: |
ls -lsa src

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: PDF
path: AStudyOnDynamicEquations.pdf
- uses: actions/checkout@v2
name: "${{ env.FILE_NAME }}-${{ env.GitVersion_InformationalVersion }}"
path: |
src/${{ env.FILE_NAME }}.tex
src/${{ env.FILE_NAME }}.bbl
src/${{ env.FILE_NAME }}.bib
src/sections

- name: Upload artifacts PDF
uses: actions/upload-artifact@v4
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
name: "${{ env.FILE_NAME }}-PDF-${{ env.GitVersion_InformationalVersion }}"
path: |
src/${{ env.FILE_NAME }}.pdf

- name: Clone repository and add document
run: |
git clone https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/kolosovpetro/kolosovpetro.github.io.git ~/kolosovpetro.github.io
cp out/AStudyOnDynamicEquations.pdf ~/kolosovpetro.github.io/pdf/AStudyOnDynamicEquations.pdf
git clone https://$TOKEN@github.com/kolosovpetro/kolosovpetro.github.io.git ~/kolosovpetro.github.io
cp src/${{ env.FILE_NAME }}.pdf ~/kolosovpetro.github.io/pdf/${{ env.FILE_NAME }}.pdf
env:
TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}

- name: Commit document changes if any
run: |
cd ~/kolosovpetro.github.io
git config --global user.name '${{ secrets.GH_NAME }}'
git config --global user.email '${{ secrets.GH_EMAIL }}'
git config --global user.name "$USERNAME"
git config --global user.email "$EMAIL"
git add .
git commit -am "CICD deploy from main repo"
git push
git commit -m "$MESSAGE"
git push
env:
USERNAME: "kolosovpetro"
EMAIL: "kolosovp94@gmail.com"
MESSAGE: "CICD deploy of ${{ env.FILE_NAME }} PDF document"
73 changes: 62 additions & 11 deletions .github/workflows/build-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,75 @@ on:
push:
branches:
- develop
- master
- main
- release/*
pull_request:
branches:
- develop
- main
- master
workflow_dispatch:

env:
FILE_NAME: "AStudyOnDynamicEquations"
ACTIONS_RUNNER_DEBUG: false

jobs:
build-resume:
build-pdf:
runs-on: ubuntu-latest
name: Create document
name: Build PDF

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Convert to pdf
id: convert-to-pdf
uses: xu-cheng/latex-action@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v1.1.1
with:
versionSpec: '5.x'

- name: Determine Version
uses: gittools/actions/gitversion/execute@v1.1.1

- name: Print SemVer
run: |
echo "SemVer: ${{ env.GitVersion_SemVer }}"
echo "BranchName: ${{ env.GitVersion_BranchName }}"
echo "ShortSha: ${{ env.GitVersion_ShortSha }}"
newVersion="${{ env.GitVersion_SemVer }}+${{ env.GitVersion_BranchName }}.${{ env.GitVersion_ShortSha }}"
echo "Next version: $newVersion"

- name: Update version.tex
shell: bash
run: |
newVersion="${{ env.GitVersion_SemVer }}+${{ env.GitVersion_BranchName }}.${{ env.GitVersion_ShortSha }}"
sed -i "s|Local-0.1.0|$newVersion|" "src/sections/version.tex"

- name: Build PDF
uses: xu-cheng/latex-action@v3
with:
root_file: AStudyOnDynamicEquations.tex
root_file: "${{ env.FILE_NAME }}.tex"
working_directory: src
- uses: actions/upload-artifact@v2

- name: List src
run: |
ls -lsa src

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: "${{ env.FILE_NAME }}-${{ env.GitVersion_InformationalVersion }}"
path: |
src/${{ env.FILE_NAME }}.tex
src/${{ env.FILE_NAME }}.bbl
src/${{ env.FILE_NAME }}.bib
src/sections

- name: Upload artifacts PDF
uses: actions/upload-artifact@v4
with:
name: PDF
path: AStudyOnDynamicEquations.pdf
name: "${{ env.FILE_NAME }}-PDF-${{ env.GitVersion_InformationalVersion }}"
path: |
src/${{ env.FILE_NAME }}.pdf
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*-blx.aux
*-blx.bib
*.run.xml
*.annotated.pdf

## Build tool auxiliary files:
*.fdb_latexmk
Expand Down Expand Up @@ -635,4 +636,4 @@ ASALocalRun/
healthchecksdb

# code coverage temp
coverage.opencover.xml
coverage.opencover.xml
7 changes: 7 additions & 0 deletions BIBTEX-CITATION.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@article{kolosov2016study,
title = {{A study on partial dynamic equation on time scales involving derivatives of polynomials}},
author = {Kolosov, Petro},
journal = {{arXiv preprint arXiv:1608.00801}},
note = {\url {https://arxiv.org/abs/1608.00801}},
year = {2016}
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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 v2.0.0](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - In progress

### Changed
- Change bibliography style
- Update CI/CD
- Update version inside document
- Update README.md
- Update line spacing
- Move mathematica programs to addendum
1 change: 1 addition & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mode: Mainline
73 changes: 17 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,19 @@
# A study on partial dynamic equation on time scales involving derivatives of polynomials

[![Build PDF](https://github.com/kolosovpetro/AStudyOnDynamicEquations/actions/workflows/build-pdf.yml/badge.svg)](https://github.com/kolosovpetro/AStudyOnDynamicEquations/actions/workflows/build.yml/badge.svg)
[![Build and Deploy PDF](https://github.com/kolosovpetro/AStudyOnDynamicEquations/actions/workflows/build-and-deploy-pdf.yml/badge.svg)](https://github.com/kolosovpetro/AStudyOnDynamicEquations/actions/workflows/build-and-deploy.yml/badge.svg)
![contributors count](https://img.shields.io/github/contributors/kolosovpetro/AStudyOnDynamicEquations)

<p align="center">
<img src="img/abstract.PNG" alt="abstract"/>
</p>

## What is all about

Source code of the manuscript entitled
"A study on partial dynamic equation on time scales involving derivatives of polynomials"
along with Mathematica programs in order to verify results.

## How to use Mathematica package

- Open the package file `AStudyOnDinamicEquationsPackage.m` in Wolfram Mathematica, I use version 13.0
- Execute the package using `Shift+Enter`
- Open the notebook file `AStudyOnDynamicEquationsNotebook.nb`
- Execute the line: `Needs["AStudyOnDynamicEquations"]`
- Execute the line: `mainTheorem[m_] := Expand[timeScaleDerivativeX[m, t, sigma[t]] + timeScaleDerivativeB[m, t, t]]`
- Continue executing according to the guideline below

## Reproduce the results using Mathematica

Few examples of the outcomes of the manuscript and how to reproduce them

### Example for Z x Z time scale.

<p align="center">
<img src="img/time_scale_z_example_1.PNG" alt="timescale-z"/>
</p>

To reproduce example 4.2 proceed as follows with Mathematica:

- Set `sigma[x_] := x + 1` in Mathematica package and execute definition.
- Execute `timeScaleDerivativeX[1, x, b]` which produces `-3 b + 3 b^2`.
- Execute `Expand[timeScaleDerivativeX[1, t, sigma[t]]]` which produces `3 t + 3 t^2`.
- Execute `timeScaleDerivativeB[1, x, b]` which produces `1 - 6 b^2 + 6 b x`.
- Execute `timeScaleDerivativeB[1, t, t]` which produces `1`.
- Execute `mainTheorem[1]` which produces `1 + 3 t + 3 t^2`.

### Example for R x R time scale.

<p align="center">
<img src="img/time_scale_r_example_1.PNG" alt="timescale-z"/>
</p>

To reproduce example 4.7 proceed as follows with Mathematica:

- Set `sigma[x_] := x + Global`dx` in Mathematica package and execute definition.
- Execute `timeScaleDerivativeX[1, x, b]` which produces `-3 b + 3 b^2`.
- Execute `Limit[Expand[timeScaleDerivativeB[1, x, b]], dx -> 0]` which produces `6 b - 6 b^2 - 3 x + 6 b x`.
- Execute `timeScaleDerivativeX[1, t, t]` which produces `-3 t + 3 t^2`.
- Execute `Limit[Expand[timeScaleDerivativeB[1, t, t]], dx -> 0]` which produces `3t`.
- Execute `Limit[mainTheorem[1], dx -> 0]` which produces `3t^2`.
## Build and run in Intellij IDEA

- Install `MikTeX`: https://miktex.org/download
- Update `MikTeX`
- Install `SumatraPDF` viewer: https://www.sumatrapdfreader.org/download-free-pdf-viewer
- Path to SumatraPDF: `C:\Program Files\SumatraPDF`
- Install `Intellij IDEA Ultimate`: https://www.jetbrains.com/idea/download/#section=windows
- Activate `Intellij IDEA Ultimate`
- Install `TeXiFy IDEA` plugin: https://plugins.jetbrains.com/plugin/9473-texify-idea
- Clone this repository locally: `https://github.com/kolosovpetro/github-latex-template.git`
- Open `github-latex-template` folder in `Intellij IDEA Ultimate` and configure as follows
- LaTeX Configuration
![LaTeX Configuration](./img/latex_configuration.PNG "LaTeX Configuration")
- BibTeX Configuration
![BibTeX Configuration](./img/bibtex_configuration.PNG "BibTeX Configuration")
- Configure Inverse Search in `Intellij IDEA` for SumatraPDF: `Tools -> LaTeX -> Configure Inverse Search`
- Compile document using `Shift + F10`
Binary file removed img/abstract.PNG
Binary file not shown.
Loading