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

Restore functionality and usability #12

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
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
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,44 @@ project/boot/
.idea
out/
all/


# ISFA upgrade specific
all_2015/
all_2020/

# Created by https://www.toptal.com/developers/gitignore/api/bloop,scala,metals,sbt
# Edit at https://www.toptal.com/developers/gitignore?templates=bloop,scala,metals,sbt

### Bloop ###
.bloop/

### Metals ###
.metals/
project/**/metals.sbt

### SBT ###
# Simple Build Tool
# http://www.scala-sbt.org/release/docs/Getting-Started/Directories.html#configuring-version-control

dist/*
target/
lib_managed/
src_managed/
project/boot/
project/plugins/project/
.history
.cache
.lib/

### SBT Patch ###
.bsp/

### Scala ###
*.class
*.log

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# End of https://www.toptal.com/developers/gitignore/api/bloop,scala,metals,sbt
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# ISFA
# Continuation of ISFA

The *ISFA* project is a database of *I*nteger *S*equence *F*ormulas and *A*pplications. The integer sequence formulas are parsed from the [OEIS](http://oeis.org).

A more detailed report can be found [here](https://github.com/eluzhnica/ISFA/blob/master/docs/Enxhell_Luzhnica_BSC.pdf).

## Parts
## Usage
1. Install sbt: https://www.scala-sbt.org/download.html
3. Have a running MongoDB 5.x instance - version 6 drops support for the `insert` operation: Get it from Docker-Hub `docker pull mongo:5` and run it `docker run -d -p 27017:27017 --name mongo mongo:5`
4. Copy all the OEIS files (that is, the `A\d{6}\.txt` files) to `all/`
5. Run ISFA: `sbt "runMain library.Library"` (Caution: This does *not* remove documents in the database. Running it again will add all documents again, doubling the document count)
6. Retrieve the documents from the database as a JSON file `oeis.json`: `docker exec -it mongo mongoexport --db OEIS --collection theory_verified --out oeis.json && docker cp mongo:/oeis.json .`

## Parts
git
The ISFA is currently composed of:

- A parser for math formulas found in the OEIS.
Expand Down
63 changes: 51 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,25 +1,64 @@
name := "OEIS"

version := "1.0"
name := "ISFA_puzzle"

scalaVersion := "2.11.6"
version := "0.2"

libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "1.0.3"
scalaVersion := "2.12.12"

libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.4" % "test"

libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4"
// https://mvnrepository.com/artifact/org.scala-lang.modules/scala-xml
libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "2.0.0-M1"

libraryDependencies += "org.mongodb" %% "casbah" % "2.8.2"
// https://mvnrepository.com/artifact/org.scalatest/scalatest
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.2" % Test

libraryDependencies += "org.scalaj" %% "scalaj-http" % "2.3.0"
// https://mvnrepository.com/artifact/org.scala-lang.modules/scala-parser-combinators
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"

libraryDependencies += "com.novus" %% "salat" % "1.9.9"
// https://mvnrepository.com/artifact/org.mongodb/casbah
libraryDependencies += "org.mongodb" %% "casbah" % "3.1.1"

resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/"
// https://mvnrepository.com/artifact/org.scalaj/scalaj-http
libraryDependencies += "org.scalaj" %% "scalaj-http" % "2.4.2"

// https://mvnrepository.com/artifact/com.github.salat/salat
libraryDependencies += "com.github.salat" %% "salat" % "1.11.2"

//TODO
//resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/"
resolvers += "Typesafe Repo" at "https://dl.bintray.com/typesafe/maven-releases/"

// https://mvnrepository.com/artifact/com.typesafe.play/play-ws
libraryDependencies += "com.typesafe.play" %% "play-ws" % "2.8.7"

// https://mvnrepository.com/artifact/org.json4s/json4s-native
libraryDependencies += "org.json4s" %% "json4s-native" % "3.6.10"

libraryDependencies += "com.typesafe.play" %% "play-ws" % "2.4.3"

// GeneratingFunctionsSagePackage.scalae was missing the SLF4J lib? now it runs
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-api" % "1.7.25",
"ch.qos.logback" % "logback-classic" % "1.2.3"
)
excludeDependencies += "org.apache.logging.log4j" % "log4j-slf4j-impl"

/*'''

libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "1.3.0"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.3"
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
//had to change scala version for this on:
libraryDependencies += "org.mongodb" %% "casbah" % "3.1.1"
//this one worked instantly:
libraryDependencies += "org.scalaj" %% "scalaj-http" % "2.3.0"
//scala version for this one is even lower
libraryDependencies += "com.novus" %% "salat" % "1.9.9"
//resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/"
resolvers += "Typesafe Repo" at "https://dl.bintray.com/typesafe/maven-releases/"
libraryDependencies += "com.typesafe.play" %% "play-ws" % "2.4.3"
libraryDependencies += "org.json4s" %% "json4s-native" % "3.3.0"
//libraryDependencies += "org.json4s" %% "json4s-native" % "3.6.10"
'''*/

def readme(base : File) = base / "README"

def readme(base : File) = base / "README"
Loading