From 560021a1863099cacfbecb1b19c07ec08089e839 Mon Sep 17 00:00:00 2001 From: Stephen <32943259+CoderSales@users.noreply.github.com> Date: Thu, 14 Dec 2023 01:32:07 +0000 Subject: [PATCH 1/9] Update README md Add explanation of how this works to README md --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 107a437..0970269 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,23 @@ TODO: (In Progress) Make an automatic referencing program. - Output: Reference +- How it works: + - main.py calls a couple python files in the root directory like date.py + and imports folders files and functions from lines folder + - one file either author.py or journal.py + was used to develop functionality + of going through a line of the BibTex.bib + file + searching for a starting element + stripping this + and returning the relevant substring + then this was copied and edited + to add different functionality for the + various parts of the reference + main assembles these + and prints reference + + - Next step : Trying to replace author first name with initial and dot in author string from author line From ef84d9f75756b47ff79734588da66616aa7d61f4 Mon Sep 17 00:00:00 2001 From: Stephen <32943259+CoderSales@users.noreply.github.com> Date: Thu, 14 Dec 2023 01:32:56 +0000 Subject: [PATCH 2/9] Update README md Update Description in README md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0970269..e9b881d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Description -AI-Research-Project-Referencing-Program-Attempt +AI Research Project Referencing Program Attempt ## Recommended Requirements (setup tested for) From a9298704535d4b63cd609b28f2e6d6c63286bea1 Mon Sep 17 00:00:00 2001 From: Stephen <32943259+CoderSales@users.noreply.github.com> Date: Thu, 14 Dec 2023 01:35:08 +0000 Subject: [PATCH 3/9] Update README md update description add detail --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index e9b881d..a7a0b9f 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,20 @@ AI Research Project Referencing Program Attempt +Take in BibTex file + +downloaded for a journal article to be referenced + +Outputs formatted reference. + +(Some manual post editting necessary, like italics + +and + +repllacing Author first names + +with initials) + ## Recommended Requirements (setup tested for) Windows From ea4cb79d6d8e3200d14527cc54cbb3e4a1f32c2f Mon Sep 17 00:00:00 2001 From: Stephen <32943259+CoderSales@users.noreply.github.com> Date: Thu, 14 Dec 2023 01:44:23 +0000 Subject: [PATCH 4/9] Update README md Add description code pseudocode text for potential enhancement --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a7a0b9f..938bed9 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,52 @@ TODO: (In Progress) Make an automatic referencing program. from author line from file - BibTex.bib + BibTex.bib + +- nicetohave: + - for D.R.Y. + pass each lines identifier + e.g. journal + into a single file + or function call as an argument + and then + use same function + and send in the following: + +``` + +```python + +listOfIdentifiers=['author', 'journal', ] + +for identifier in listOfIdentifiers: + listOfValues=[] + returnValue=functionCall(identifier) + listOfValues.append(returnValue) +listOfValues +``` + +```text +where functionCall +could be a single file +or +possibly +a +function directly in main.py +called which handles +for each line of +BibTex.bib +returns the corresponding +value + +then need to +format listOfValues +into +output of reference +(similar to how currently done +in main.py +albeit currently +using print statement(s)) ``` ## References From a9542786dc28210d556aaf47ccaf5887064e9b98 Mon Sep 17 00:00:00 2001 From: Stephen <32943259+CoderSales@users.noreply.github.com> Date: Thu, 14 Dec 2023 01:46:05 +0000 Subject: [PATCH 5/9] Update README md Add link to documentation under References --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 938bed9..f26946c 100644 --- a/README.md +++ b/README.md @@ -165,3 +165,4 @@ using print statement(s)) ## References +see [documentation](https://github.com/CoderSales/AI-Research-Project-Referencing-Program/tree/main/documentation) From 408309471f0b12100c4ec65fb4e1ca245dd560b2 Mon Sep 17 00:00:00 2001 From: Stephen <32943259+CoderSales@users.noreply.github.com> Date: Thu, 14 Dec 2023 01:49:27 +0000 Subject: [PATCH 6/9] Update 10 md minor edit fix typo remove e codee to code --- documentation/01st20docs/10.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/01st20docs/10.md b/documentation/01st20docs/10.md index 51e0e17..e1bbc10 100644 --- a/documentation/01st20docs/10.md +++ b/documentation/01st20docs/10.md @@ -23,6 +23,6 @@ vscode git char count on | https://www.google.com/search?q=vscode+git+char+count vscode turn on 50 char limit in git commit subject line | https://www.google.com/search?q=vscode+turn+on+50+char+limit+in+git+commit+subject+line&newwindow=1&sca_esv=589766361&rlz=1C1YTUH_enIE1084IE1084&sxsrf=AM9HkKk-gGYdC45euDUcfxGr9mmLTx-LUQ%3A1702302246610&ei=JhJ3ZbDuJMG2hbIPgMeNIA&ved=0ahUKEwiwmdaFwoeDAxVBW0EAHYBjAwQQ4dUDCBA&uact=5&oq=vscode+turn+on+50+char+limit+in+git+commit+subject+line&gs_lp=Egxnd3Mtd2l6LXNlcnAiN3ZzY29kZSB0dXJuIG9uIDUwIGNoYXIgbGltaXQgaW4gZ2l0IGNvbW1pdCBzdWJqZWN0IGxpbmUyBRAhGKABSKsPUKEBWMYNcAN4AZABAJgBgAGgAdQDqgEDNi4xuAEDyAEA-AEBwgIKEAAYRxjWBBiwA8ICBBAhGBXCAgcQIRigARgK4gMEGAAgQYgGAZAGCA&sclient=gws-wiz-serp -cvscodee insiders git commit title character count missing | https://www.google.com/search?q=cvscodee+insiders+git+commit+title+character+count+missing&newwindow=1&sca_esv=589766361&rlz=1C1YTUH_enIE1084IE1084&sxsrf=AM9HkKmUtgr6aWf2-cjAAJS6QtkgL3evvQ%3A1702302163436&ei=0xF3ZfGBGrOzhbIPnoy6yA8&ved=0ahUKEwixt4HewYeDAxWzWUEAHR6GDvkQ4dUDCBA&uact=5&oq=cvscodee+insiders+git+commit+title+character+count+missing&gs_lp=Egxnd3Mtd2l6LXNlcnAiOmN2c2NvZGVlIGluc2lkZXJzIGdpdCBjb21taXQgdGl0bGUgY2hhcmFjdGVyIGNvdW50IG1pc3NpbmcyChAhGKABGMMEGApIxTJQpQxYpCtwAXgBkAEAmAFgoAGqCKoBAjE2uAEDyAEA-AEBwgIKEAAYRxjWBBiwA8ICBxAjGLACGCfCAggQABiJBRiiBMICCBAAGIAEGKIE4gMEGAAgQYgGAZAGCA&sclient=gws-wiz-serp +cvscode insiders git commit title character count missing | https://www.google.com/search?q=cvscodee+insiders+git+commit+title+character+count+missing&newwindow=1&sca_esv=589766361&rlz=1C1YTUH_enIE1084IE1084&sxsrf=AM9HkKmUtgr6aWf2-cjAAJS6QtkgL3evvQ%3A1702302163436&ei=0xF3ZfGBGrOzhbIPnoy6yA8&ved=0ahUKEwixt4HewYeDAxWzWUEAHR6GDvkQ4dUDCBA&uact=5&oq=cvscodee+insiders+git+commit+title+character+count+missing&gs_lp=Egxnd3Mtd2l6LXNlcnAiOmN2c2NvZGVlIGluc2lkZXJzIGdpdCBjb21taXQgdGl0bGUgY2hhcmFjdGVyIGNvdW50IG1pc3NpbmcyChAhGKABGMMEGApIxTJQpQxYpCtwAXgBkAEAmAFgoAGqCKoBAjE2uAEDyAEA-AEBwgIKEAAYRxjWBBiwA8ICBxAjGLACGCfCAggQABiJBRiiBMICCBAAGIAEGKIE4gMEGAAgQYgGAZAGCA&sclient=gws-wiz-serp -vscode insiders git commit title character count missing | https://www.google.com/search?q=vscode+insiders+git+commit+title+character+count+missing&newwindow=1&sca_esv=589766361&rlz=1C1YTUH_enIE1084IE1084&sxsrf=AM9HkKlpU1wBYYNcu5NSsnCmDwfDgps51g%3A1702311265036&ei=YTV3ZYHpAeK0hbIP6L250AE&ved=0ahUKEwjBnf_R44eDAxViWkEAHeheDhoQ4dUDCBA&uact=5&oq=vscode+insiders+git+commit+title+character+count+missing&gs_lp=Egxnd3Mtd2l6LXNlcnAiOHZzY29kZSBpbnNpZGVycyBnaXQgY29tbWl0IHRpdGxlIGNoYXJhY3RlciBjb3VudCBtaXNzaW5nMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADSL96ULJlWPhzcAN4AZABAJgBP6ABaaoBATK4AQPIAQD4AQHCAgcQIxiwAhgn4gMEGAAgQYgGAZAGCA&sclient=gws-wiz-serp \ No newline at end of file +vscode insiders git commit title character count missing | https://www.google.com/search?q=vscode+insiders+git+commit+title+character+count+missing&newwindow=1&sca_esv=589766361&rlz=1C1YTUH_enIE1084IE1084&sxsrf=AM9HkKlpU1wBYYNcu5NSsnCmDwfDgps51g%3A1702311265036&ei=YTV3ZYHpAeK0hbIP6L250AE&ved=0ahUKEwjBnf_R44eDAxViWkEAHeheDhoQ4dUDCBA&uact=5&oq=vscode+insiders+git+commit+title+character+count+missing&gs_lp=Egxnd3Mtd2l6LXNlcnAiOHZzY29kZSBpbnNpZGVycyBnaXQgY29tbWl0IHRpdGxlIGNoYXJhY3RlciBjb3VudCBtaXNzaW5nMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADMgoQABhHGNYEGLADSL96ULJlWPhzcAN4AZABAJgBP6ABaaoBATK4AQPIAQD4AQHCAgcQIxiwAhgn4gMEGAAgQYgGAZAGCA&sclient=gws-wiz-serp From af7abcb7e8b6c69920d2d2f9dfe43d46f4c04623 Mon Sep 17 00:00:00 2001 From: Stephen <32943259+CoderSales@users.noreply.github.com> Date: Thu, 14 Dec 2023 01:53:50 +0000 Subject: [PATCH 7/9] Update packages md add line breaks --- documentation/Install/packages.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/documentation/Install/packages.md b/documentation/Install/packages.md index f1d87cd..0db0d3c 100644 --- a/documentation/Install/packages.md +++ b/documentation/Install/packages.md @@ -1,7 +1,13 @@ python.exe -m pip install --upgrade pip + pip install openpyxl + pip install numpy + pip install pandas + pip install nltk + pip install --pre bibtexparser + pip install regex From 623cb37a263c6c3a6adb544e16f1957a61f774d4 Mon Sep 17 00:00:00 2001 From: Stephen <32943259+CoderSales@users.noreply.github.com> Date: Thu, 14 Dec 2023 01:54:33 +0000 Subject: [PATCH 8/9] Create python app yml --- .github/workflows/python-app.yml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..f3d4fca --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,39 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest From b49d327ee06a5537ddd474c4ec4fdba73672935d Mon Sep 17 00:00:00 2001 From: Stephen <32943259+CoderSales@users.noreply.github.com> Date: Thu, 14 Dec 2023 01:59:47 +0000 Subject: [PATCH 9/9] Update README md Add note on GitHub suggested workflow testing automation file automatically added on clicking Add Automatically Recommended based on current workflow --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f26946c..ed86075 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,14 @@ output of reference (similar to how currently done in main.py albeit currently -using print statement(s)) +using print statement(s)) + +Add +GitHub suggested +automated workflow +.github/workflows/python-app.yaml +tests deploys +python application ``` ## References