Alexandre Terrasa [Thu, 17 Aug 2017 20:04:48 +0000 (16:04 -0400)]
model: views use filters
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 22 Oct 2017 21:06:04 +0000 (17:06 -0400)]
model: visitor uses filters
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 29 Sep 2017 21:47:43 +0000 (17:47 -0400)]
model: introduce filters
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 29 Sep 2017 21:47:59 +0000 (17:47 -0400)]
model: tag groups as tests
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Fri, 27 Oct 2017 14:06:42 +0000 (10:06 -0400)]
Merge: model: ModelView uses mainmodule
ModelView uses a mainmodule to flatten mclass hierarchies.
Pull-Request: #2568
Jean Privat [Fri, 27 Oct 2017 14:05:50 +0000 (10:05 -0400)]
Merge: json::dynamic: extend `get` to support arrays and keys with dots
Extend `JsonValue::get` to support arrays and keys containing the '.' character.
As a general cleanup, remove services specific to parsing errors as clients should check errors only once, and update and standardize the documentation.
Pull-Request: #2558
Jean Privat [Fri, 27 Oct 2017 14:03:37 +0000 (10:03 -0400)]
Merge: popcorn: pop_test uses NIT_TESTING_ID to determine test port
This PR modifies the *pop-tests* so they use `NIT_TESTING_ID` to select the listening port.
This should avoid ports conflicts when testing multiple PR at the same time on Jenkins.
Let's try this!
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2571
Jean Privat [Fri, 27 Oct 2017 14:03:36 +0000 (10:03 -0400)]
Merge: nitunit: some fixes and improvements for the `before_all`, `after_all` annotations
This PR does three things:
* fixes the importation of `before_all` and `after_all` methods
* allows use of `before_all` and `after_all` methods within classes
* changes the test execution order for imported test suites
### Fix the importation of `before_all` and `after_all` methods
First of all, this PR fixes the behavior of nitunit with multiple test_suite importation.
Be two modules `a` and `b`:
~~~nit
module a is test
class TestA
test
# some test cases
end
fun setup is before_all do # important things
~~~
~~~nit
module b is test
import module a
class TestB
super TestA
test
end
~~~
In this case, because `b` does not introduce any `before_all` method, the method from `a` was not executed.
This is fixed now.
### Class-level `before_all` and `after_all` methods
`before_all` and `after_all` can now be used inside a class definition to indicate methods that must be executed before / after all methods inside the class:
~~~nit
class TestC
test
fun setup is before_all do # something before all test cases of `TestC`
# some test cases
end
~~~
### Tests execution order
Methods with `before*` and `after*` annotations are linearized and called in different ways.
* `before*` methods are called from the least specific to the most specific
* `after*` methods are called from the most specific to the least specific
~~~nit
module test_bdd_connector
import bdd_connector
# Testing the bdd_connector
class TestConnector
test
# test cases using a server
end
# Method executed before testing the module
fun setup_db is before_all do
# start server before all test cases
end
# Method executed after testing the module
fun teardown_db is after_all do
# stop server after all test cases
end
~~~
When dealing with multiple test suites, niunit allows you to import other test suites to factorize your tests:
~~~nit
module test_bdd_users
import test_bdd_connector
# Testing the user table
class TestUsersTable
test
# test cases using the db server from `test_bdd_connector`
end
fun setup_table is before_all do
# create user table
end
fun teardown_table is after_all do
# drop user table
end
~~~
In the previous example, the execution order would be:
1. `test_bdd_connector::setup_db`
2. `test_bdd_users::setup_table`
3. `all test cases from test_bdd_users`
4. `test_bdd_users::teardown_table`
5. `test_bdd_connector::teardown_db`
Pull-Request: #2572
Alexandre Terrasa [Thu, 26 Oct 2017 22:18:58 +0000 (18:18 -0400)]
nitunit: update documentation
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 26 Oct 2017 22:05:13 +0000 (18:05 -0400)]
nitunit: fix nitunits within the README
Most of them seem to be nitish since there is a lot a fake modules used.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 26 Oct 2017 21:44:11 +0000 (17:44 -0400)]
nitunit: linearize test execution
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 26 Oct 2017 21:14:05 +0000 (17:14 -0400)]
nitunit: introduce before/after class tests
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 26 Oct 2017 21:13:27 +0000 (17:13 -0400)]
nitunit: do not execute a before/after test twice
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 26 Oct 2017 20:37:34 +0000 (16:37 -0400)]
nitunit: fix `before-all` and `after-all` detection
Before this commit, nitunit did not lookup annotation from parent modules
if no local definition of Sys was found.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 23 Oct 2017 14:05:42 +0000 (10:05 -0400)]
popcorn: pop_test uses NIT_TESTING_ID to determine test port
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 19 Oct 2017 00:27:19 +0000 (20:27 -0400)]
model_json: update ModelView
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 16 Oct 2017 03:18:55 +0000 (23:18 -0400)]
nitweb: update ModelView
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Tue, 17 Oct 2017 20:09:26 +0000 (16:09 -0400)]
Merge: core: implement `Float::to_precision` in C without callbacks
Fix #2561, int overflows in `Float::to_precision` with a high float value or a high precision.
The native implementation was removed by
9cb09ccf to support the interpreter. Since then, we added support for the FFI in the interpreter so we can bring back a native implementation.
Pull-Request: #2562
Jean Privat [Tue, 17 Oct 2017 20:09:25 +0000 (16:09 -0400)]
Merge: markdown: merge MDProcessor and MDEmitter
The emitter was unecessary.
Also done some cleaning.
Pull-Request: #2563
Jean Privat [Tue, 17 Oct 2017 20:09:24 +0000 (16:09 -0400)]
Merge: lib/config: fix doc
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2564
Jean Privat [Tue, 17 Oct 2017 20:09:23 +0000 (16:09 -0400)]
Merge: lib/markdown: fix `text` for nested markdown blocks
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2565
Alexandre Terrasa [Mon, 16 Oct 2017 03:18:46 +0000 (23:18 -0400)]
nituml: update ModelView
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 16 Oct 2017 03:18:31 +0000 (23:18 -0400)]
metrics: update ModelView
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 16 Oct 2017 03:18:18 +0000 (23:18 -0400)]
nitdoc: update ModelView
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 16 Oct 2017 03:17:59 +0000 (23:17 -0400)]
model_index: update ModeView
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 16 Oct 2017 03:17:36 +0000 (23:17 -0400)]
model_collect: update ModelView
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 16 Oct 2017 03:17:03 +0000 (23:17 -0400)]
model_views: expect a mainmodule
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 12 Oct 2017 00:46:11 +0000 (20:46 -0400)]
lib/markdown: fix `text` for nested markdown blocks
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 12 Oct 2017 00:44:15 +0000 (20:44 -0400)]
lib/config: fix doc
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 11 Oct 2017 03:11:51 +0000 (23:11 -0400)]
lib/markdown: merge processor and emitter
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 11 Oct 2017 02:54:30 +0000 (22:54 -0400)]
lib/markdown: fix nitunits in README
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 11 Oct 2017 02:53:10 +0000 (22:53 -0400)]
lib/markdown: remove warnings
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Tue, 10 Oct 2017 16:52:04 +0000 (12:52 -0400)]
Merge: model_collect: collect more things
A lot of new shortcuts.
Pull-Request: #2560
Jean Privat [Tue, 10 Oct 2017 16:52:03 +0000 (12:52 -0400)]
Merge: model: is_accessor
Add a way to associate attributes and their getters/setters.
This will be useful for filtering things and groupings properties together.
Pull-Request: #2559
Jean Privat [Tue, 10 Oct 2017 16:52:01 +0000 (12:52 -0400)]
Merge: Vector Space Model
# Vector Space Model
Vector Space Model (VSM) is an algebraic model for representing text documents
(and any objects, in general) as vectors of identifiers, such as, for example,
index terms.
It is used in information filtering, information retrieval, indexing and
relevancy rankings.
The `vsm` package provides the following features:
* Vector comparison with cosine similarity.
* Vector indexing and matching with tf * idf.
* File indexing and matching to free text queries.
## Vectors
With VSM, documents are represented by a n-dimensions vector.
Each dimension represent an attribute of the document or object.
For text document, the count of each term found in the document if often used to
build vectors.
### Creating a vector
~~~nit
var vector = new Vector
vector["term1"] = 2.0
vector["term2"] = 1.0
assert vector["term1"] == 2.0
assert vector["term2"] == 1.0
assert vector.norm.is_approx(2.236, 0.001)
~~~
### Comparing vectors
~~~nit
var v1 = new Vector
v1["term1"] = 1.0
v1["term2"] = 2.0
var v2 = new Vector
v2["term2"] = 1.0
v2["term3"] = 3.0
var query = new Vector
query["term2"] = 1.0
var s1 = query.cosine_similarity(v1)
var s2 = query.cosine_similarity(v2)
assert s1 > s2
~~~
## VSMIndex
VSMIndex is a Document index based on VSM.
Using VSMIndex you can index documents associated with their vector.
Documents can then be matched to query vectors.
This represents a minimalistic search engine.
~~~nit
var index = new VSMIndex
var d1 = new Document("Doc 1", "/uri/1", v1)
index.index_document(d1)
var d2 = new Document("Doc 2", "/uri/2", v2)
index.index_document(d2)
assert index.documents.length == 2
query = new Vector
query["term1"] = 1.0
var matches = index.match_vector(query)
assert matches.first.document == d1
~~~
## StringIndex
The StringIndex provides usefull services to index and match strings.
~~~nit
index = new StringIndex
d1 = index.index_string("Doc 1", "/uri/1", "this is a sample")
d2 = index.index_string("Doc 2", "/uri/2", "this and this is another example")
assert index.documents.length == 2
matches = index.match_string("this sample")
assert matches.first.document == d1
~~~
## FileIndex
The FileIndex is a StringIndex able to index and retrieve files.
~~~nit
index = new FileIndex
index.index_files(["/path/to/doc/1", "/path/to/doc/2"])
~~~
Pull-Request: #2556
Reviewed-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Fri, 6 Oct 2017 17:46:36 +0000 (13:46 -0400)]
nlp: use new vector representation
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexis Laferrière [Tue, 3 Oct 2017 14:53:59 +0000 (10:53 -0400)]
core: implement Float::to_precision in C without callbacks
Fix int overflows in Float::to_precision with a high float value
or a high precision.
The native implementation was removed by
9cb09ccf to support the
interpreter, which, at the time, did not support the FFI. Since then, we
added support for thhe FFI in the interpreter.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexandre Terrasa [Fri, 29 Sep 2017 21:32:16 +0000 (17:32 -0400)]
nitweb: use model_collect for definitions lists
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 29 Sep 2017 21:31:58 +0000 (17:31 -0400)]
model_collect: collect more things
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 29 Sep 2017 21:05:48 +0000 (17:05 -0400)]
model_collect: uniformize documentation
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 29 Sep 2017 19:13:23 +0000 (15:13 -0400)]
tests: update tests for vsm
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 27 Sep 2017 02:42:39 +0000 (22:42 -0400)]
lib/vsm: add README
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 22 Sep 2017 20:37:19 +0000 (16:37 -0400)]
lib/vsm: introduce an indexing process based on VSM
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 20 Sep 2017 22:23:40 +0000 (18:23 -0400)]
lib/vsm: accept anything as a dimension
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 20 Sep 2017 22:23:09 +0000 (18:23 -0400)]
lib/nlp: move vsm.nit to its own package
We don't need nlp to use vsm
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 29 Sep 2017 18:46:04 +0000 (14:46 -0400)]
model: remove a warning :p
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 29 Sep 2017 18:45:54 +0000 (14:45 -0400)]
modelize: define attribute getters and setters
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 29 Sep 2017 18:45:34 +0000 (14:45 -0400)]
model: tag getters and setters
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Thu, 28 Sep 2017 23:39:24 +0000 (19:39 -0400)]
Merge: lib: introduce `fca` a module for formal concept analysis
## Building a FormalContext
We use the example from https://en.wikipedia.org/wiki/Formal_concept_analysis:
~~~nit
var fc = new FormalContext[Int, String]
fc.set_object_attributes(1, ["odd", "square"])
fc.set_object_attributes(2, ["even", "prime"])
fc.set_object_attributes(3, ["odd", "prime"])
fc.set_object_attributes(4, ["even", "composite", "square"])
fc.set_object_attributes(5, ["odd", "prime"])
fc.set_object_attributes(6, ["even", "composite"])
fc.set_object_attributes(7, ["odd", "prime"])
fc.set_object_attributes(8, ["even", "composite"])
fc.set_object_attributes(9, ["odd", "square", "composite"])
fc.set_object_attributes(10, ["even", "composite"])
~~~
## Computing the set of FormalConcept
~~~nit
var concepts = fc.formal_concepts
for concept in concepts do
print concept
end
~~~
## Visualizing formal concept with ConceptLattice
~~~nit
var cl = new ConceptLattice[Int, String].from_concepts(concepts)
cl.show_dot
~~~
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2557
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 28 Sep 2017 23:39:23 +0000 (19:39 -0400)]
Merge: .gitignore: ignore more vim files
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2555
Jean Privat [Thu, 28 Sep 2017 23:39:22 +0000 (19:39 -0400)]
Merge: model_visitor: reject is_before and is_after as they are tests
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2554
Jean Privat [Thu, 28 Sep 2017 23:39:22 +0000 (19:39 -0400)]
Merge: doc_commands: parse parameters
This PR allows the user of doc cards to pass parameters through the card declaration:
* `command: arg | option1: value1, option2: value2`
It can be used in a doc command so one can write:
~~~
Here a graph:
[[graph: core::Array | cdepth: 1, pdepth: 4]]
~~~
Pull-Request: #2553
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 28 Sep 2017 23:39:21 +0000 (19:39 -0400)]
Merge: nitweb: fully integrate catalog
Some work to integrate the nit catalog with nitweb:
* make the catalog API more usable
* serves the catalog API through JSON/REST
* integrate with current frontend
New features:
* catalog integration
* new search process and ui
* pagination for results and catalog (faster!)
* cards cleaning
* tabs cleaning
Demo: DIY
Pull-Request: #2552
Alexandre Terrasa [Thu, 28 Sep 2017 23:31:48 +0000 (19:31 -0400)]
lib: introduce `fca` a module for formal concept analysis
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 26 Sep 2017 20:25:45 +0000 (16:25 -0400)]
nitweb: allow options in graph card
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 Aug 2017 23:52:54 +0000 (19:52 -0400)]
src/doc_down: fix `comment` behavior
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 Aug 2017 23:52:35 +0000 (19:52 -0400)]
src/doc_commands: merge Article and Comment commands
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexis Laferrière [Tue, 5 Sep 2017 15:37:24 +0000 (11:37 -0400)]
json::dynamic: update doc
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 5 Sep 2017 15:41:09 +0000 (11:41 -0400)]
json::dynamic: add array index support to `get`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 5 Sep 2017 15:39:18 +0000 (11:39 -0400)]
json::dynamic: remove to_parse_error redundant of to_error
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 5 Sep 2017 15:37:38 +0000 (11:37 -0400)]
json::dynamic: fix warning
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexandre Terrasa [Fri, 22 Sep 2017 20:40:17 +0000 (16:40 -0400)]
.gitignore: ignore more vim files
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 26 Sep 2017 20:46:44 +0000 (16:46 -0400)]
model_visitor: reject is_before and is_after as they are tests
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 Aug 2017 23:32:12 +0000 (19:32 -0400)]
nitweb: use new doc commands parser
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 Aug 2017 23:31:59 +0000 (19:31 -0400)]
nitdoc: use new doc commands parser
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 Aug 2017 22:27:23 +0000 (18:27 -0400)]
nitdoc: remove warnings from doc_readme
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 Aug 2017 22:22:29 +0000 (18:22 -0400)]
nitx: update to doc commands parser
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 29 Aug 2017 22:22:15 +0000 (18:22 -0400)]
src/doc_commands: rewrite doc commands parser
Also add tests
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 16 Aug 2017 23:18:55 +0000 (19:18 -0400)]
nitweb: rewrite search ui
Display a new menu that allows the user to jump on a result page.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 16 Aug 2017 23:17:05 +0000 (19:17 -0400)]
nitweb: catalog refine search algorithm
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 16 Aug 2017 21:29:02 +0000 (17:29 -0400)]
nitweb: remove useless catalog handlers
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 22:13:07 +0000 (18:13 -0400)]
nitweb: add catalog sidebar on package views
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:55:32 +0000 (16:55 -0400)]
nitweb: rewrite catalog frontend
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Wed, 16 Aug 2017 21:32:14 +0000 (17:32 -0400)]
nitweb: remove tabs from cards
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 23:40:33 +0000 (19:40 -0400)]
nitweb: move grades frontend from card to tab
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:44:00 +0000 (16:44 -0400)]
nitweb: rename frontend module `index` in `catalog`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:59:06 +0000 (16:59 -0400)]
nitweb: frontend add ui-pagination directive
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:51:09 +0000 (16:51 -0400)]
nitweb: catalog api serves persons related data
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:50:51 +0000 (16:50 -0400)]
nitweb: catalog api serves tags related data
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:48:59 +0000 (16:48 -0400)]
nitweb: catalog api use mpackage_stats
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:35:21 +0000 (16:35 -0400)]
nitweb: introduce /api/catalog/packages route
List all packages in current catalog
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:33:56 +0000 (16:33 -0400)]
nitweb: introduce custom serialization for CatalogHandler
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:32:38 +0000 (16:32 -0400)]
nitweb: move catalog building to Catalog redef
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:30:35 +0000 (16:30 -0400)]
nitweb: rewrite catalog serialization
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 19:52:04 +0000 (15:52 -0400)]
nitweb: introduce pagination handler
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:25:02 +0000 (16:25 -0400)]
catalog: introduce some sorters
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:24:50 +0000 (16:24 -0400)]
catalog: introduce CatalogStats to retrieve all the stats of the catalog
Useful for serialization
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:24:09 +0000 (16:24 -0400)]
catalog: introduce MPackageStats to retrieve the stats of a MPackage
Usefull for serialization
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:09:17 +0000 (16:09 -0400)]
catalog: associate persons to their short name
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 15 Aug 2017 20:09:05 +0000 (16:09 -0400)]
catalog: associate packages to their full_name
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 8 Jun 2017 23:00:02 +0000 (19:00 -0400)]
catalog: extract gravatar from html
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 8 Jun 2017 22:59:32 +0000 (18:59 -0400)]
catalog: split metadata from MPackage class
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 8 Jun 2017 01:30:02 +0000 (21:30 -0400)]
catalog: fix warnings
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Mon, 25 Sep 2017 20:23:07 +0000 (16:23 -0400)]
Merge: nitunit: use annotations
This PR replace the name heuristics used by nitunit by nice and tidy annotations.
Before:
~~~nit
module test_my_test is test_suite
import test_suite
class TestMyTest
super TestSuite
redef fun before do # something
fun test_my_test do
assert true
end
end
~~~
After:
~~~nit
module my_test is test
class MyTest
test
fun setup is before do # something
fun my_test is test do
assert true
end
end
~~~
Motivations:
* cleaner API / naming policy
* [BDD](https://en.wikipedia.org/wiki/Behavior-driven_development) friendly
* more flexibility as one can define a `after` method in the lib that will only be executed on children module tagged with `test`
* more extensible as one can improve nitunit to support `test(timeout = 150)` or `test(res= "res/test_file.res")`
Used annotations:
* `test` on modules, classes and properties to indicate that nitunit must run this module/class/method
* `before`, `after` on properties from all classes but `Sys` for the before/after each case hooks
* `before_all`, `after_all` on properties from `Sys` for the before/after all cases hooks
This also removes the need of the `lib/test_suite` module.
I also migrated the existing test suites to the new annotations system. Let's see what Jenkins has to say about it.
Should fix #2165
Pull-Request: #2474
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 25 Sep 2017 20:23:05 +0000 (16:23 -0400)]
Merge: gamnit: fluid API, named 3D models, faster nitpick et other fixes
General improvements to the gamnit framework and related services:
* Make the APIs of `CustomTexture` and `VirtualGamepad` a bit more fluid.
* More precise computation of `TextSprite::height` and show the result in `font_showcase`.
* Optimize shadow mapping by caching the light MVP matrix.
* Speedup nitpick by silencing some warnings in `glesv2` and fix warnings created by the serialization framework.
* Fix bug on Kabylake GPU reported by @BlackMinou.
* Fix a few other bugs and possible crashes.
Pull-Request: #2551
Alexis Laferrière [Mon, 25 Sep 2017 12:38:37 +0000 (08:38 -0400)]
gamnit: fix "mismatching precision qualifiers" error on recent Intel GPU
Reported-by: Romain Chanoir <romain.chanoir@viacesi.fr>
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 21 Sep 2017 01:51:54 +0000 (21:51 -0400)]
gamnit: disable our premultiplication on Android
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 15 Sep 2017 12:17:09 +0000 (08:17 -0400)]
gamnit: compute a more precise `TextSprites::height`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 20 Sep 2017 16:45:33 +0000 (12:45 -0400)]
gamnit: fix code duplication in BMFont
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 20 Sep 2017 16:38:56 +0000 (12:38 -0400)]
gamnit: add size info to font_showcase
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>