How to Run Multiple Test Files with Haskell Stack Project - unit-testing

I want to setup an existing Haskell project with Stack. The existing project uses multiple files under a test directory; these separate test files by default, Stack (or cabal?) appears to utilize a single test/Spec.hs for testing. How can I continue to use multiple files with this project?
NOTE: I'm learning Haskell, and this project approaches my learning from a "kata" approach. So tests are isolate to focus on one aspect of the language at a time.

Here is a setup for a directory structure like this
> tree
.
├── example.cabal
├── app
│   └── Main.hs
├── ChangeLog.md
├── LICENSE
├── Setup.hs
├── src
│   ├── A
│   │   └── C.hs
│   ├── A.hs
│   └── B.hs
├── stack.yaml
└── tst
├── integration
│   └── Spec.hs
└── unit
├── A
│   └── CSpec.hs
├── ASpec.hs
├── BSpec.hs
└── Spec.hs
you want to have integration tests that are separate from the usual unit tests and several sub-modules that correspond to each module in your src-folder
first of all you need to add the test suites to your
example.cabal file
name: example
...
-- copyright:
-- category:
build-type: Simple
extra-source-files: ChangeLog.md
cabal-version: >=1.10
executable testmain
main-is: Main.hs
hs-source-dirs: app
build-depends: base
, example
library
exposed-modules: A.C,A,B
-- other-modules:
-- other-extensions:
build-depends: base >=4.9 && <4.10
hs-source-dirs: src
default-language: Haskell2010
test-suite unit-tests
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs: tst/unit
build-depends: base
, example
, hspec
, hspec-discover
, ...
test-suite integration-tests
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs: tst/integration
build-depends: base
, example
, hspec
, ...
put the following in your tst/unit/Spec.hs it is from hspec-discover and it discovers (hence the name) all modules of the form ...Spec.hs and executes the spec function from each of those modules.
tst/unit/Spec.hs
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
just this single line
Other test files
then add your unit tests in your ASpec.hs, and others in BSpec.hs,CSpec.hs and your Spec.hs in the tst/integration folder
module ASpec where
import Test.Hspec
import A
spec :: Spec
spec = do
describe "Prelude.head" $ do
it "returns the first element of a list" $ do
head [23 ..] `shouldBe` (23 :: Int)
it "returns the first element of an *arbitrary* list" $
property $ \x xs -> head (x:xs) == (x :: Int)
it "throws an exception if used with an empty list" $ do
evaluate (head []) `shouldThrow` anyException
you can then compile and run your tests with
$> stack test
# now all your tests are executed
$> stack test :unit-tests
# now only the unit tests run
$> stack test :integration-tests
# now only the integration tests run
Sources
You can find all the examples at https://hspec.github.io, if you want to know more about hspec-style testing I guess it would be best to start there. For the stack - go to https://haskellstack.org - there is some information about testing/benchmarking there - I mean about running tests and benchmarks.
For different testing style in haskell see HUnit, QuickCheck, Smallcheck, doctests (If I forgot one, my dearest apologies - those are the ones that I use regularly as well).

Here is a solution with just stack and HUnit. Nothing against hspec, htf, tasty, etc etc, but likewise there is not much glue needed even without those, if you're already using HUnit. It doesn't require editing the cabal file. The original question implies use of hspec, so the #epsilonhalbe is still closer on that criteria.
.
├─stack.yaml
├─package.yaml
├─src/
| ├─A.hs
| ├─B.hs
| ├─Main.hs
├─tst/
| ├─ATest.hs
| ├─BTest.hs
| ├─Main.hs
Example package.yaml file:
name: example
version: 0.1.0.0
dependencies:
- HUnit >= 1.6.1.0 && < 2
library:
source-dirs: src
executables:
example-exe:
main: Main.hs
source-dirs: src
dependencies:
- example
tests:
example-test:
main: Main.hs
source-dirs: tst
dependencies:
- example
- HUnit
In ATest.hs and BTest.hs declare list of tests called huTests in the usual HUnit way, eg,
huTests = ["egTest" ~: "a" ~=? "a"].
Then tst/Main.hs has the glue in a common HUnit idiom (see eg this answer):
import ATest (huTests)
import BTest (huTests)
import System.Exit
import Test.HUnit
main :: IO ()
main = do
results <- runTestTT $
test (ATest.huTests ++ BTest.huTests)
if errors results + failures results == 0 then
putStrLn "Tests passed."
else
die "Tests failed."

Related

how do you mock out node_modules package in jest unit test?

I have an Nx workspace with a library it in that has a unit test that needs to mock a node_module package.
One example is unit testing our interface with Stripe. I have built a mock implementation of the stripe-js that I have npm added to my project.
Without Nx, I would put the stripe-js.ts mock file in the mock folder that is next to the top level src file.
I have tried putting this mock folder beside the workspace folder, but it isn't being picked up by jest.
Where should this mock folder be placed when unit testing in a library?
myorg/
├── __mocks__/
| ├── stripe-js.js
├── apps/
| ├── myapp
├── libs/
| └── lib1
| ├── test.spec.js
├── node_modules
Without Nx, it should be placed in the diagram above, but I am not sure where it should be placed when unit testing lib1.
I was helped out on Slack by an Nx user who had figured out how to do this.
The trick comes in two parts:
The location of the mocks directory is the root of your workspace (ie, beside the node_modules directory
The second part is to modify your jest.preset.js file in the root of your workspace to add a roots entry:
const nxPreset = require('#nrwl/jest/preset').default;
const path = require('path');
module.exports = {
...nxPreset,
roots: ["<rootDir>", path.resolve(__dirname, "./__mocks__")]
};
With the roots entry pointing to the mocks directory, jest will then pick up the automatic mocks for node_module packages.
And for completness, if you want to mock out something like a package called stripe-js, you would create a file in workspace/__mocks__ called stripe-js.js and in that file you would put your mock implementation.

Fast Haskell rebuild+test with file watch using cabal + GHCID?

my question in short is "how to get a fast save-retest workflow in a cabal-managed multi-library haskell project repository?"
I already tried a few things and did some research. Before getting into more details please have a look at the typical project repo structure and then have the question broken down into more details:
Repository Development Structure
i work on multiple Haskell projects that usually have the following form:
.
├── foo
│   ├── foo.cabal
│   ├── src
│   ├── unit-test
│   └── ...
├── bar
│   ├── bar.cabal
│   ├── src
│   ├── unit-test
│   └── ...
├── baz
│   ├── baz.cabal
│   ├── src
│   ├── unit-test
│   └── ...
├── stack.yaml
├── cabal.project
├── nix
│   └── ...
└── ...
The cabal.project file looks like this:
packages:
foo
bar
baz
...
tests: True
run-tests: True
The stack file contains basically the same project list and an LTS ID, so i can just just the stackProject nix function from IOHK's haskell.nix to provide myself a nix shell which has cabal etc. in place. (This question is more about cabal handling so i consider this text paragraph here only a background note that i think is not relevant for this stack overflow question.)
This setup allows me to just run cabal test all anywhere in the project, which is great. This is my simple method to see if i broke anything before closing the next git commit.
Rapid Save-Retest Workflow
Before i got to nix, i used stack build/test --watch which was nice, because i could now have a shell open which always retests and rebuilds the whole project after i changed anything anywhere.
This can be simulated with inotify:
while true; do
inotifywait -e modify -r ./;
cabal test all
done
This is not really fast but it also does the job.
After i got to know about GHCID i was amazed by how blazingly fast it is.
It is also easy to use with cabal repl.
Unfortunately (this problem was also mentioned but left unanswered in a comment here How to run test suite in ghcid with cabal?), GHCID can be run on one specific unit test suite and will not detect changes on the library that the unit tests are supposed to check. (Putting all the library modules into the unit test description in the cabal file is something that i consider an ugly hack and i woul rather like to avoid that)
Also, it seems i can't run GHCID on the whole repository like cabal test all or stack test --watch do.
The extreme speed of GHCID is something that i really want in my workflow.
cabal is a tool that has existed long time before stack, how do people work on their multi-lib repositories to have a fast overview of all the test cases they broke after they edited multiple files in multiple libs? If the GHCID way does not work well, what is the way to do it?
I use a script with stack as follows:
ghcid -c="stack ghci <test-suite>.hs" -T="main" --warnings $#
This means:
Run ghcid
Use stack ghci instead of vanilla ghci
Also load the test suite module into ghci
Run main (from the test suite) upon loading ghci
Run the tests even if the compile generates GHC warnings
You could easily adapt this to use, for example, cabal repl instead of stack ghci.
This has the following drawbacks:
The name of the test module needs to be hard-coded, and is not extracted from package.yaml/the cabal file.
It does not support multiple test suites. These could all be passed to the script, but you'd need a custom main to call them all.
I previously got around these problems by using :!stack test as the command, which runs the all test suites, but since this is issued via the command line rather than loaded into ghci, The tests ran much slower. Additionally, It did not hot-reload on modification to the tests.
The bottom line is: to get the benefits of ghcid, ghcid needs to be informed of which source files to look at. Any reloading of ghcid via a shell command will require a full reload and recompile by ghci, not expoloiting ghci's fast hot reload capability. If this information is stored in a build system config file, your build system needs to integrate with ghcid (absent a custom script.) My guess is this is too low-level for cabal, but I have opened a feature request for stack. Add a comment or reaction there if you want to see this happen!
My current workaround is to nest ghcid calls:
ghcid --target=$LIBRARY_NAME --run=":! ghcid --target=$TEST_SUITE --run"
The innermost ghcid recompiles and reruns the tests when they change, the outermost recompiles the library and restarts the innermost one when the library source changes.
There is ongoing work to support multiple home units in GHC, but as of March 2022, not enough has been implemented yet to support them in ghcid:
Barely any normal GHCi features are supported (#20889). It would be good to support enough for ghcid to work correctly.
In the meantime the ugly hack mentioned by the OP is the best workaround:
during dev time add some settings of the library stanzas to the settings of the test-suite stanzas, usually hs-source-dirs, build-depends, and default-extensions, and remove those local libraries from the build-depends of the test-suite stanzas. import-ing common stanzas can help to reduce this boilerplate.

Organizing OCaml projects: files and modules

I would like to restructure my project from a flat file/module hierarchy into a more nested one. Here is what I have now:
. # Modules:
├── fruit_apple.ml # Fruit_apple
├── fruit_lemon.ml # Fruit_lemon
├── pie_apple.ml # Pie_apple
└── pie_lemon.ml # Pie_lemon
Here is what I want to get:
. # Modules:
├── fruit
│   ├── apple.ml # Fruit.Apple
│   └── lemon.ml # Fruit.Lemon
└── pie
├── apple.ml # Pie.Apple
└── lemon.ml # Pie.Lemon
OCaml has automatic mapping from file name to module name, but it doesn't seem to have one for directories and nested files.
I could have a pie.ml and fruit.ml file where I include the necessary submodules:
(* pie.ml *)
module Apple = struct
include Apple
end
module Lemon = struct
include Lemon
end
But I don't know how to resolve the ambiguity between pie/apple.ml and fruit/apple.ml.
I tried to study Core library, which has Core namespace with nested modules Core.Bool, Core.Bag and so on, but I couldn't find a core.ml file there which I would assume integrates all the submodules.
Since the introduction of module aliases in OCaml the preferred way to deal with this is to:
Develop modules in unambiguously identified modules
with globally unique names.
If you wish, prepare a special module simulating a namespace,
which might be nicer to the user than a flat collection of modules.
So, additionally to your current module definitions, you can add
(* Fruit.ml *)
module Apple = Fruit_Apple
module Lemon = Fruit_Lemon
(* Pie.ml *)
module Apple = Pie_Apple
module Lemon = Pie_Lemon
If appropriate, you should consider adding a global prefix identifying your library, so that other libraries can provide Fruit and Pie modules without competing with yours.

Leiningen can't locate local dependency

I'm having problems using a local version of a library which I don't want to push up to Clojars to test and find out it's broken. I appreciate this is a common problem for lots of devs new to Clojure and Leiningen. I've followed the steps provided by others and it still doesn't work.
In summary:
I've tried lein pom/jar/install, as well as the checkout feature (where you symlink your other project). I think there is a source-paths option I could try, but I'm not sure how that works. I also thought about trying to modify the lein classpath but I'm not sure if that's possible?
For those of you who prefer much more detail...
I have two Leiningen projects:
https://github.com/Integralist/spurious-clojure-aws-sdk-helper
https://github.com/Integralist/spurious-clojure-example
The idea is that the second project "spurious-clojure-example" should use the first "spurious-clojure-aws-sdk-helper" as a dev dependency (as it's a library you use while local dev'ing against faked AWS resources; so no need to use it in a production environment).
The "spurious-clojure-example" project.clj file looks like...
(defproject spurious-clojure-example "0.1.0"
:description "This is an example application that utilises the Spurious Clojure AWS SDK Helper"
:url "https://github.com/integralist/spurious-clojure-example"
:dependencies [[org.clojure/clojure "1.6.0"]
[compojure "1.1.6"]
[hiccup "1.0.5"]
[ring-server "0.3.1"]
[amazonica "0.3.13"]
[environ "1.0.0"]]
:plugins [[lein-ring "0.8.12"]
[lein-environ "1.0.0"]]
:ring {:handler spurious-clojure-example.handler/app
:init spurious-clojure-example.handler/init
:destroy spurious-clojure-example.handler/destroy}
:profiles
{:uberjar {:aot :all}
:production
{:ring
{:open-browser? false, :stacktraces? false, :auto-reload? false}}
:dev
{:dependencies [[ring-mock "0.1.5"]
[ring/ring-devel "1.3.1"]
[spurious-aws-sdk-helper "0.1.0"]]}})
Notice I've put [spurious-aws-sdk-helper "0.1.0"] into :dev {:dependencies}.
The way the "spurious-clojure-aws-sdk-helper" code gets loaded is like so:
(if (env :debug) ; defined in profiles.clj
(do
(require '[spurious-aws-sdk-helper.core :as core])
(...other stuff...)))
The first thing I tried within my "spurious-aws-sdk-helper" project was...
lein pom
lein jar
lein install
...as I was told this would install "spurious-aws-sdk-helper" into the local directory ~/.m2 which Leiningen would look at first as a local cache of remote dependencies.
tree ~/.m2 | grep spurious
├── spurious-aws-sdk-helper
│   └── spurious-aws-sdk-helper
│   │   ├── spurious-aws-sdk-helper-0.1.0.jar
│   │   └── spurious-aws-sdk-helper-0.1.0.pom
│   │   ├── spurious-aws-sdk-helper-0.1.0-SNAPSHOT.jar
│   │   └── spurious-aws-sdk-helper-0.1.0-SNAPSHOT.pom
├── spurious-clojure-example
│   └── spurious-clojure-example
│   │   ├── spurious-clojure-example-0.1.0-SNAPSHOT.jar
│   │   └── spurious-clojure-example-0.1.0-SNAPSHOT.pom
This didn't work. When I connect my Vim editor to an nREPL and try to evaluate the require call to the library it would say it couldn't find the namespace.
I then tried doing the same lein pom/jar/install process for my "spurious-clojure-example" project (just in case there was some strange reason both projects needed to be locally installed). Again, no difference either, but i wasn't expected this to do anything really.
I then tried renaming my projects to remove the -SNAPSHOT from the version number (in case that made Leiningen think the dependency couldn't be used - nonsense I know, but I was clutching at straws).
I moved onto trying out the checkout feature (https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md#checkout-dependencies) and when I evaluated the require call, that would pass through (e.g. no errors) but then one of the dependencies used by "spurious-aws-sdk-helper" would fail to load (i.e. org.clojure/data.json).
As a temporary measure I decided to add org.clojure/data.json to my "spurious-clojure-example" dependencies. So when evaluating the code again in the REPL, it this time got past the first two namespace errors but then it again errored because the spurious-aws-sdk-helper.s3 namespace couldn't be found :-/
At this point I realised I must be missing something really obvious, because it should not be this hard to test a library locally on your computer.
Could someone help me to resolve this problem.
Many thanks!
UPDATE: here is the result of lein classpath for "spurious-clojure-example"...
/Users/markmcdonnell/Code/spurious-clojure-example/test
/Users/markmcdonnell/Code/spurious-clojure-example/src
/Users/markmcdonnell/Code/spurious-clojure-example/dev-resources
/Users/markmcdonnell/Code/spurious-clojure-example/resources
/Users/markmcdonnell/Code/spurious-clojure-example/target/classes
/Users/markmcdonnell/.m2/repository/ns-tracker/ns-tracker/0.2.1/ns-tracker-0.2.1.jar
/Users/markmcdonnell/.m2/repository/org/clojure/tools.macro/0.1.0/tools.macro-0.1.0.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-sqs/1.9.13/aws-java-sdk-sqs-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-s3/1.9.13/aws-java-sdk-s3-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-dynamodb/1.9.13/aws-java-sdk-dynamodb-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-swf-libraries/1.9.13/aws-java-sdk-swf-libraries-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/clojure/algo.generic/0.1.2/algo.generic-0.1.2.jar
/Users/markmcdonnell/.m2/repository/org/clojure/java.classpath/0.2.0/java.classpath-0.2.0.jar
/Users/markmcdonnell/.m2/repository/watchtower/watchtower/0.1.1/watchtower-0.1.1.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-config/1.9.13/aws-java-sdk-config-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-redshift/1.9.13/aws-java-sdk-redshift-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar
/Users/markmcdonnell/.m2/repository/clojure-complete/clojure-complete/0.2.3/clojure-complete-0.2.3.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-glacier/1.9.13/aws-java-sdk-glacier-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk/1.9.13/aws-java-sdk-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-directconnect/1.9.13/aws-java-sdk-directconnect-1.9.13.jar
/Users/markmcdonnell/.m2/repository/ring/ring-codec/1.0.0/ring-codec-1.0.0.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/jetty-server/7.6.8.v20121106/jetty-server-7.6.8.v20121106.jar
/Users/markmcdonnell/.m2/repository/joda-time/joda-time/2.2/joda-time-2.2.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-ec2/1.9.13/aws-java-sdk-ec2-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/jetty-continuation/7.6.8.v20121106/jetty-continuation-7.6.8.v20121106.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-lambda/1.9.13/aws-java-sdk-lambda-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-storagegateway/1.9.13/aws-java-sdk-storagegateway-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-ses/1.9.13/aws-java-sdk-ses-1.9.13.jar
/Users/markmcdonnell/.m2/repository/clj-stacktrace/clj-stacktrace/0.2.5/clj-stacktrace-0.2.5.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-opsworks/1.9.13/aws-java-sdk-opsworks-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-core/1.9.13/aws-java-sdk-core-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/jetty-util/7.6.8.v20121106/jetty-util-7.6.8.v20121106.jar
/Users/markmcdonnell/.m2/repository/ring/ring-servlet/1.2.1/ring-servlet-1.2.1.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-simpleworkflow/1.9.13/aws-java-sdk-simpleworkflow-1.9.13.jar
/Users/markmcdonnell/.m2/repository/clj-time/clj-time/0.4.4/clj-time-0.4.4.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-logs/1.9.13/aws-java-sdk-logs-1.9.13.jar
/Users/markmcdonnell/.m2/repository/robert/hooke/1.3.0/hooke-1.3.0.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudsearch/1.9.13/aws-java-sdk-cloudsearch-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-simpledb/1.9.13/aws-java-sdk-simpledb-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudfront/1.9.13/aws-java-sdk-cloudfront-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-sts/1.9.13/aws-java-sdk-sts-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-codedeploy/1.9.13/aws-java-sdk-codedeploy-1.9.13.jar
/Users/markmcdonnell/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-kinesis/1.9.13/aws-java-sdk-kinesis-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-autoscaling/1.9.13/aws-java-sdk-autoscaling-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/amazon-kinesis-client/1.1.0/amazon-kinesis-client-1.1.0.jar
/Users/markmcdonnell/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
/Users/markmcdonnell/.m2/repository/ring/ring-jetty-adapter/1.2.1/ring-jetty-adapter-1.2.1.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-support/1.9.13/aws-java-sdk-support-1.9.13.jar
/Users/markmcdonnell/.m2/repository/commons-fileupload/commons-fileupload/1.3/commons-fileupload-1.3.jar
/Users/markmcdonnell/.m2/repository/hiccup/hiccup/1.0.5/hiccup-1.0.5.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-elasticbeanstalk/1.9.13/aws-java-sdk-elasticbeanstalk-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/clojure/tools.reader/0.7.3/tools.reader-0.7.3.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cognitoidentity/1.9.13/aws-java-sdk-cognitoidentity-1.9.13.jar
/Users/markmcdonnell/.m2/repository/ring-refresh/ring-refresh/0.1.2/ring-refresh-0.1.2.jar
/Users/markmcdonnell/.m2/repository/org/tukaani/xz/1.5/xz-1.5.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudwatch/1.9.13/aws-java-sdk-cloudwatch-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-rds/1.9.13/aws-java-sdk-rds-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-importexport/1.9.13/aws-java-sdk-importexport-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudformation/1.9.13/aws-java-sdk-cloudformation-1.9.13.jar
/Users/markmcdonnell/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-route53/1.9.13/aws-java-sdk-route53-1.9.13.jar
/Users/markmcdonnell/.m2/repository/ring/ring/1.2.1/ring-1.2.1.jar
/Users/markmcdonnell/.m2/repository/org/clojure/tools.namespace/0.1.3/tools.namespace-0.1.3.jar
/Users/markmcdonnell/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.3.2/jackson-databind-2.3.2.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-elastictranscoder/1.9.13/aws-java-sdk-elastictranscoder-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-elasticache/1.9.13/aws-java-sdk-elasticache-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/iq80/snappy/snappy/0.3/snappy-0.3.jar
/Users/markmcdonnell/.m2/repository/ring/ring-devel/1.2.1/ring-devel-1.2.1.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-kms/1.9.13/aws-java-sdk-kms-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-emr/1.9.13/aws-java-sdk-emr-1.9.13.jar
/Users/markmcdonnell/.m2/repository/clout/clout/1.1.0/clout-1.1.0.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudwatchmetrics/1.9.13/aws-java-sdk-cloudwatchmetrics-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/clojure/tools.nrepl/0.2.6/tools.nrepl-0.2.6.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-elasticloadbalancing/1.9.13/aws-java-sdk-elasticloadbalancing-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-iam/1.9.13/aws-java-sdk-iam-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-datapipeline/1.9.13/aws-java-sdk-datapipeline-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/orbit/javax.servlet/2.5.0.v201103041518/javax.servlet-2.5.0.v201103041518.jar
/Users/markmcdonnell/.m2/repository/org/clojure/clojure/1.6.0/clojure-1.6.0.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-sns/1.9.13/aws-java-sdk-sns-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudtrail/1.9.13/aws-java-sdk-cloudtrail-1.9.13.jar
/Users/markmcdonnell/.m2/repository/environ/environ/1.0.0/environ-1.0.0.jar
/Users/markmcdonnell/.m2/repository/net/jpountz/lz4/lz4/1.2.0/lz4-1.2.0.jar
/Users/markmcdonnell/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.3.2/jackson-core-2.3.2.jar
/Users/markmcdonnell/.m2/repository/compojure/compojure/1.1.6/compojure-1.1.6.jar
/Users/markmcdonnell/.m2/repository/ring-server/ring-server/0.3.1/ring-server-0.3.1.jar
/Users/markmcdonnell/.m2/repository/com/taoensso/nippy/2.7.0/nippy-2.7.0.jar
/Users/markmcdonnell/.m2/repository/amazonica/amazonica/0.3.13/amazonica-0.3.13.jar
/Users/markmcdonnell/.m2/repository/ring/ring-core/1.2.1/ring-core-1.2.1.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/jetty-io/7.6.8.v20121106/jetty-io-7.6.8.v20121106.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/jetty-http/7.6.8.v20121106/jetty-http-7.6.8.v20121106.jar
/Users/markmcdonnell/.m2/repository/org/clojure/core.incubator/0.1.0/core.incubator-0.1.0.jar
/Users/markmcdonnell/.m2/repository/com/taoensso/encore/1.11.2/encore-1.11.2.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cognitosync/1.9.13/aws-java-sdk-cognitosync-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.3.0/jackson-annotations-2.3.0.jar
UPDATE 2:
/Users/markmcdonnell/.m2
└── repository
├── amazonica
├── ant
├── antlr
├── aopalliance
├── args4j
├── asm
├── bbc
├── bidi
├── bouncycastle
├── ch
├── cheshire
├── circleci
├── classworlds
├── clj-stacktrace
├── clj-time
├── clojure-complete
├── clout
├── co
├── com
├── commons-beanutils
├── commons-cli
├── commons-codec
├── commons-collections
├── commons-digester
├── commons-discovery
├── commons-el
├── commons-fileupload
├── commons-httpclient
├── commons-io
├── commons-jelly
├── commons-jexl
├── commons-lang
├── commons-logging
├── commons-net
├── commons-validator
├── compojure
├── compojure-app
├── crypto-equality
├── crypto-random
├── de
├── dom4j
├── dotenv
├── doxia
├── environ
├── findbugs
├── geronimo-spec
├── hiccup
├── http-kit
├── instaparse
├── jackmorrill
├── javax
├── jaxen
├── jdom
├── jfree
├── jline
├── joda-time
├── junit
├── juxt
├── lein-dotenv
├── lein-environ
├── lein-ring
├── leinjacker
├── local
├── log4j
├── medley
├── modular
├── mx4j
├── nekohtml
├── net
├── ns-tracker
├── org
├── oro
├── pathetic
├── plexus
├── potemkin
├── prismatic
├── qdox
├── ring
├── ring-mock
├── ring-refresh
├── ring-server
├── robert
├── spurious-aws-sdk-helper
├── stax
├── thneed
├── tigris
├── trammel
├── velocity
├── watchtower
├── xalan
├── xerces
├── xml-apis
├── xom
└── xpp3
95 directories, 0 files
UPDATE 3: lein with-profile +dev classpath
/Users/markmcdonnell/Code/spurious-clojure-example/test
/Users/markmcdonnell/Code/spurious-clojure-example/src
/Users/markmcdonnell/Code/spurious-clojure-example/dev-resources
/Users/markmcdonnell/Code/spurious-clojure-example/resources
/Users/markmcdonnell/Code/spurious-clojure-example/target/classes
/Users/markmcdonnell/.m2/repository/ns-tracker/ns-tracker/0.2.1/ns-tracker-0.2.1.jar
/Users/markmcdonnell/.m2/repository/org/clojure/tools.macro/0.1.0/tools.macro-0.1.0.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-sqs/1.9.13/aws-java-sdk-sqs-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-s3/1.9.13/aws-java-sdk-s3-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-dynamodb/1.9.13/aws-java-sdk-dynamodb-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-swf-libraries/1.9.13/aws-java-sdk-swf-libraries-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/clojure/algo.generic/0.1.2/algo.generic-0.1.2.jar
/Users/markmcdonnell/.m2/repository/org/clojure/java.classpath/0.2.0/java.classpath-0.2.0.jar
/Users/markmcdonnell/.m2/repository/watchtower/watchtower/0.1.1/watchtower-0.1.1.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-config/1.9.13/aws-java-sdk-config-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-redshift/1.9.13/aws-java-sdk-redshift-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar
/Users/markmcdonnell/.m2/repository/clojure-complete/clojure-complete/0.2.3/clojure-complete-0.2.3.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-glacier/1.9.13/aws-java-sdk-glacier-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk/1.9.13/aws-java-sdk-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-directconnect/1.9.13/aws-java-sdk-directconnect-1.9.13.jar
/Users/markmcdonnell/.m2/repository/ring/ring-codec/1.0.0/ring-codec-1.0.0.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/jetty-server/7.6.8.v20121106/jetty-server-7.6.8.v20121106.jar
/Users/markmcdonnell/.m2/repository/joda-time/joda-time/2.2/joda-time-2.2.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-ec2/1.9.13/aws-java-sdk-ec2-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/jetty-continuation/7.6.8.v20121106/jetty-continuation-7.6.8.v20121106.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-lambda/1.9.13/aws-java-sdk-lambda-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-storagegateway/1.9.13/aws-java-sdk-storagegateway-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-ses/1.9.13/aws-java-sdk-ses-1.9.13.jar
/Users/markmcdonnell/.m2/repository/clj-stacktrace/clj-stacktrace/0.2.5/clj-stacktrace-0.2.5.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-opsworks/1.9.13/aws-java-sdk-opsworks-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-core/1.9.13/aws-java-sdk-core-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/jetty-util/7.6.8.v20121106/jetty-util-7.6.8.v20121106.jar
/Users/markmcdonnell/.m2/repository/ring/ring-servlet/1.2.1/ring-servlet-1.2.1.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-simpleworkflow/1.9.13/aws-java-sdk-simpleworkflow-1.9.13.jar
/Users/markmcdonnell/.m2/repository/clj-time/clj-time/0.4.4/clj-time-0.4.4.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-logs/1.9.13/aws-java-sdk-logs-1.9.13.jar
/Users/markmcdonnell/.m2/repository/robert/hooke/1.3.0/hooke-1.3.0.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudsearch/1.9.13/aws-java-sdk-cloudsearch-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-simpledb/1.9.13/aws-java-sdk-simpledb-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudfront/1.9.13/aws-java-sdk-cloudfront-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-sts/1.9.13/aws-java-sdk-sts-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-codedeploy/1.9.13/aws-java-sdk-codedeploy-1.9.13.jar
/Users/markmcdonnell/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-kinesis/1.9.13/aws-java-sdk-kinesis-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-autoscaling/1.9.13/aws-java-sdk-autoscaling-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/amazon-kinesis-client/1.1.0/amazon-kinesis-client-1.1.0.jar
/Users/markmcdonnell/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
/Users/markmcdonnell/.m2/repository/ring/ring-jetty-adapter/1.2.1/ring-jetty-adapter-1.2.1.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-support/1.9.13/aws-java-sdk-support-1.9.13.jar
/Users/markmcdonnell/.m2/repository/commons-fileupload/commons-fileupload/1.3/commons-fileupload-1.3.jar
/Users/markmcdonnell/.m2/repository/hiccup/hiccup/1.0.5/hiccup-1.0.5.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-elasticbeanstalk/1.9.13/aws-java-sdk-elasticbeanstalk-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/clojure/tools.reader/0.7.3/tools.reader-0.7.3.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cognitoidentity/1.9.13/aws-java-sdk-cognitoidentity-1.9.13.jar
/Users/markmcdonnell/.m2/repository/ring-refresh/ring-refresh/0.1.2/ring-refresh-0.1.2.jar
/Users/markmcdonnell/.m2/repository/org/tukaani/xz/1.5/xz-1.5.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudwatch/1.9.13/aws-java-sdk-cloudwatch-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-rds/1.9.13/aws-java-sdk-rds-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-importexport/1.9.13/aws-java-sdk-importexport-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudformation/1.9.13/aws-java-sdk-cloudformation-1.9.13.jar
/Users/markmcdonnell/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-route53/1.9.13/aws-java-sdk-route53-1.9.13.jar
/Users/markmcdonnell/.m2/repository/ring/ring/1.2.1/ring-1.2.1.jar
/Users/markmcdonnell/.m2/repository/org/clojure/tools.namespace/0.1.3/tools.namespace-0.1.3.jar
/Users/markmcdonnell/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.3.2/jackson-databind-2.3.2.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-elastictranscoder/1.9.13/aws-java-sdk-elastictranscoder-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-elasticache/1.9.13/aws-java-sdk-elasticache-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/iq80/snappy/snappy/0.3/snappy-0.3.jar
/Users/markmcdonnell/.m2/repository/ring/ring-devel/1.2.1/ring-devel-1.2.1.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-kms/1.9.13/aws-java-sdk-kms-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-emr/1.9.13/aws-java-sdk-emr-1.9.13.jar
/Users/markmcdonnell/.m2/repository/clout/clout/1.1.0/clout-1.1.0.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudwatchmetrics/1.9.13/aws-java-sdk-cloudwatchmetrics-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/clojure/tools.nrepl/0.2.6/tools.nrepl-0.2.6.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-elasticloadbalancing/1.9.13/aws-java-sdk-elasticloadbalancing-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-iam/1.9.13/aws-java-sdk-iam-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-datapipeline/1.9.13/aws-java-sdk-datapipeline-1.9.13.jar
/Users/markmcdonnell/.m2/repository/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/orbit/javax.servlet/2.5.0.v201103041518/javax.servlet-2.5.0.v201103041518.jar
/Users/markmcdonnell/.m2/repository/org/clojure/clojure/1.6.0/clojure-1.6.0.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-sns/1.9.13/aws-java-sdk-sns-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cloudtrail/1.9.13/aws-java-sdk-cloudtrail-1.9.13.jar
/Users/markmcdonnell/.m2/repository/environ/environ/1.0.0/environ-1.0.0.jar
/Users/markmcdonnell/.m2/repository/net/jpountz/lz4/lz4/1.2.0/lz4-1.2.0.jar
/Users/markmcdonnell/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.3.2/jackson-core-2.3.2.jar
/Users/markmcdonnell/.m2/repository/compojure/compojure/1.1.6/compojure-1.1.6.jar
/Users/markmcdonnell/.m2/repository/ring-server/ring-server/0.3.1/ring-server-0.3.1.jar
/Users/markmcdonnell/.m2/repository/com/taoensso/nippy/2.7.0/nippy-2.7.0.jar
/Users/markmcdonnell/.m2/repository/amazonica/amazonica/0.3.13/amazonica-0.3.13.jar
/Users/markmcdonnell/.m2/repository/ring/ring-core/1.2.1/ring-core-1.2.1.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/jetty-io/7.6.8.v20121106/jetty-io-7.6.8.v20121106.jar
/Users/markmcdonnell/.m2/repository/org/eclipse/jetty/jetty-http/7.6.8.v20121106/jetty-http-7.6.8.v20121106.jar
/Users/markmcdonnell/.m2/repository/org/clojure/core.incubator/0.1.0/core.incubator-0.1.0.jar
/Users/markmcdonnell/.m2/repository/com/taoensso/encore/1.11.2/encore-1.11.2.jar
/Users/markmcdonnell/.m2/repository/com/amazonaws/aws-java-sdk-cognitosync/1.9.13/aws-java-sdk-cognitosync-1.9.13.jar
/Users/markmcdonnell/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.3.0/jackson-annotations-2.3.0.jar
Justin Smith from the #clojure irc channel helped me to resolve this issue.
It seems that just running lein install was enough, but the real issue was that the error I was seeing about the namespace not being found was actually misleading as there were errors within my helper library that needed to be fixed first before I could load it successfully in my example application.
The advice was to test thoroughly within the REPL (e.g. attempt to load the helper namespace within the helper's own REPL and if it doesn't work then run a linter to verify there is no issues with the code itself).
lein install is the correct approach, but you must have some inconsistency in naming or versions.
It can be helpful to show the classpath that leiningen is actually using:
lein classpath
Or with a profile (the +dev means default +dev):
lein with-profile +dev classpath
You should find the library somewhere under ~/.m2 listed in the output.
lein deps :tree is similar and you may find it easier to find the inconsistency via that.
I had essentially the same issue, could not deal with it for 1.5 days...
The solution involved:
Getting the groupid/artifactid dependancies right in all project.clj files and in the namespace declarations.
There was an unused test file in the library project that had a reference to another charting library which was not declared in the project.clj file. The project compiled and installed without this charting lib declaration. However, referencing this lib using the local repo did not work until I removed this test file (or included the needed charting lib dependency in its project.clj)
I had to remove both of these manual local repository declarations from project.clj files:
:local-repo "file:/home/atmamta/.m2/repository/"
:repositories [["local" "file:/home/atmamta/.m2/repository/"]]
Uninstalled cider snapshot version and its dependent emacs libraries, reinstalled them using the latest stable versions, and modified my ~/.lein/profiles.clj to reflect these changes.
I.e. I changed the [cider/cider-nrepl "SNAPSHOT-x.y.z"] line to [cider/cider-nrepl "0.8.2"] in {:user {:plugins ...}} in file ~/.lein/profiles.clj
Important: cider version has to be the same as cider-nrepl version.

no output generated to make auto documentation by sphinx on fortran code

We want to use autodoc tool Sphinx to make a documentation of fortran programs.
By using two extensions developed by vacumm "vacumm.sphinxext.fortran_domain" and "vacumm.sphinxext.fortran_autodoc", we are supposed to be able to parse fortran codes by Sphinx.
We can successfully run make html to generate html document files, but the output is empty. I mean, it seems that the fortran program has not been parsed and documented, but there is no error.
My program tree is like this:
├── doc
│   ├── _build
│   ├── conf.py
│   ├── index.rst
│   ├── make.bat
│   ├── Makefile
│   ├── _static
│   └── _templates
└── project
└── caf10.f
conf.py includes:
sys.path.insert(0, os.path.abspath("../project/caf10.f"))
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'vacumm.sphinxext.fortran_domain',
'vacumm.sphinxext.fortran_autodoc'
]
fortran_src = [
'/home/Documents/fortran-sphinx/project/caf10.f'
]
index.rst contains:
Documentation for the Code
**************************
.. f:autoprogram:: caf10
Contents:
.. toctree::
:maxdepth: 2
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Fortran program is something like:
C Handling system components
PROGRAM caf10
IMPLICIT NONE
INTEGER NOERR, NSCOM, I
CHARACTER FNAME*12, SCNAME*24
C Initialise program
CALL TQINI(NOERR)
FNAME = 'cosi.dat'
C Open cosi.dat (system C-O-Si)
C for reading
CALL TQOPNA(FNAME, 10, NOERR)
C Read data-file
CALL TQRFIL(NOERR)
C Close data-file
CALL TQCLOS(10, NOERR)
C Print the names of all system components
WRITE(*,FMT='(A)') 'Names of system components:'
DO I=1, NSCOM
CALL TQGNSC(I, SCNAME, NOERR)
WRITE(*,FMT='(I2,A)') I, ': ' // SCNAME
ENDDO
END
We don't have module or function definition in these fortran programs. We want to highlight the codes and comments, use cross references, and print the output of each method into the documentation.
The output of generated document is just the program name, and nothing else is included in the documentation:
program caf10
By running make html, it logs no error:
$ make html
sphinx-build -b html -d _build/doctrees . _build/html
Running Sphinx v1.2.3
loading pickled environment... not yet created
loading intersphinx inventory from http://docs.python.org/objects.inv...
parsing fortran sources... done
building [html]: targets for 1 source files that are out of date
updating environment: 1 added, 0 changed, 0 removed
test1ng sources... [100%] index
/home/masood/Documents/fortran-sphinx-2/doc/index.rst:4: WARNING: test2
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
writing additional files... genindex search
copying static files... done
copying extra files... done
dumping search index... done
dumping object inventory... done
build succeeded, 1 warning.
Do you have any idea how can we make a document which parsed the program, highlighted commands, included comments, and added cross references?