Commit Graph

1194 Commits

Author SHA1 Message Date
Doug Blank
05bd51b425 Remove DB-API XML config; replace with settings.py/.ini 2016-07-12 13:21:09 -04:00
Paul Franklin
4e3706072e enhance Book class (to allow non-identical Book copies to be made)
Historically, a new Book made from an old Book argument would
contain the exact same BookItem objects as the original Book.
That behavior is retained (even though I can't see that it is
ever used), but now copies are possible where the BookItems
are of the same number and type as the original, but not the
exact same BookItem objects.  (No "paper" options are copied.)

In the process of doing that, the "save" method was slightly
tweaked, so its recently-changed (for pylint reasons) strings
have their XML terminator on the same (Python) line as the
XML-start of the keyword, for more clarity.  In the process of
checking that a pathological case was noticed where the metric
paper option could be Boolean in some cases (instead of the
expected zero/one), so that was coped with also.
2016-07-08 09:21:39 -07:00
Paul Franklin
d837e40307 remove trailing whitespace 2016-07-07 11:17:14 -07:00
Brian Matherly
337f6d9c7a 5580: some Book Report subjects are missing or misleading 2016-07-07 09:39:14 -07:00
Paul Franklin
b1b960db0a Merge pull request #189 from prculley/whitespace
fix trailing whitespace
2016-07-05 21:47:36 +00:00
prculley
39720eca3a fix trailing whitespace 2016-07-05 16:35:47 -05:00
prculley
afc7cbc645 Missed the place filter rule when updating for changed example.gramps 2016-07-05 16:18:22 -05:00
prculley
2fa56879c3 Fix filter tests for changed sample.gramps 2016-07-05 15:48:07 -05:00
kulath
6e8df15dcb 2092: Problems when no database is open. Partial fix. Make checks on the
database consistently check that the database exists and is open. Add a
few missing checks. Remove redundant load and direct close of dummy
database on closure.
2016-07-05 11:19:02 +01:00
Nick Hall
746cf0ee1e Move DBAPI default settings into an XML file 2016-07-03 17:42:08 +01:00
Nick Hall
4eb27dfcfa Create new database section in configuration file 2016-07-03 16:15:38 +01:00
Paul Franklin
62d8487f14 change some "place_displayer" strings to the shorter "_pd" 2016-07-02 20:50:31 -07:00
prculley
342bdac02c fix LOG.warn() deprecation warning 2016-06-29 09:44:18 -05:00
Paul Franklin
be76d63ef6 some tweaks to the book report
Formerly, the books.xml file was read in multiple times,
even if it hadn't changed at all.  And since books.xml can
contain multiple books, each of which potentially contains
multiple reports, each with multiple options, all of which
get parsed every time the books.xml file gets read in, the
process potentially can take a while.

Similarly the books.xml file was written out every time a
book was added or deleted, even if the book report continued
to be run, with potentially more changes being made.

So it's changed so that the books.xml file is only read in
once, and written out once, and only then if it needs it.
2016-06-28 11:38:53 -07:00
Doug Blank
871955a559 9514: DBAPI: duplicated signature for gramps.gen.db.generic.DbGeneric.get_media_from_gramps_id 2016-06-26 07:55:05 -04:00
Nick Hall
095e0e529f 9547: Rename non-API database upgrade methods 2016-06-25 22:09:05 +01:00
Nick Hall
535ce58f17 9547: Rename more non-API database methods 2016-06-25 21:55:55 +01:00
Nick Hall
72ca67e7c9 9547: Rename another non-API database method 2016-06-25 21:40:04 +01:00
Nick Hall
ebc91f17f2 9547: Rename some non-API database methods 2016-06-25 21:34:21 +01:00
Nick Hall
7053678526 9547: Remove unused database methods 2016-06-25 19:43:21 +01:00
Nick Hall
c7c674b8c9 9547: Remove deprecated database methods 2016-06-25 19:16:22 +01:00
kulath
f7203b5cd2 Implement stand-alone default DummyDb database including diagnostics
when used incorrectly
2016-06-25 17:04:07 +01:00
prculley
403f53cc57 Bug 9545 and 9546 Vcard export on Windows problems 2016-06-25 10:11:30 -05:00
Nick Hall
b0d492830a Revert ABC changes to DbReadBase and DbWriteBase
Proxies do not implement all abstract methods in DbReadBase.
2016-06-24 14:48:45 +01:00
Nick Hall
e4c2f5fe77 Convert document generators to use abstract base classes 2016-06-23 22:01:20 +01:00
Nick Hall
f0210825de Convert gen.db to use abstract base classes 2016-06-23 20:00:24 +01:00
Nick Hall
fe9af29bf5 Convert gen.lib to use abstract base classes 2016-06-23 19:07:37 +01:00
Paul Franklin
bf8d6c6c03 improve another pylint score (_book.py) 2016-06-23 00:53:17 -07:00
Paul Franklin
091caed234 9537: Wrong Numeric date format for cs_CZ locale 2016-06-21 14:16:12 -07:00
Paul Franklin
597c48b66b more pylint changes: some reformats, some new ones, some 9535 bug fixes 2016-06-20 13:31:35 -07:00
Nick Hall
e32fc6e761 Correct place type for parishes in example database 2016-06-17 23:28:13 +01:00
Nick Hall
b1b4f78764 Add unit tests for repository rules 2016-06-15 22:34:42 +01:00
Nick Hall
f172ca8672 Use with block for file output 2016-06-15 21:57:04 +01:00
Nick Hall
2d2ee2939c Remove redundant io imports 2016-06-15 21:45:31 +01:00
kulath
cd5fa5c1ff Fix DBLOGNAME (".Db") diagnostics for database class instance 2016-06-13 16:08:52 +01:00
Paul Franklin
4c57c9090d move LaTeX no-PIL-software warning into method which needs it 2016-06-11 13:44:44 -07:00
Paul Franklin
6ee612109c Remove buggy _xmlplus imports
It hasn't been maintained upstream for years and isn't in
most operating systems anymore (any?).

https://gramps-project.org/bugs/view.php?id=6947#c31672

provides a link to this:

http://fedoraproject.org/wiki/Features/RemovePyXML#Detailed_Description

I don't think it belongs in gramps.
2016-06-10 14:21:58 -07:00
kulath
5af65e317c Add some DBLOGNAME (".Db") diagnostics (especially for transactions) and
make sure they are the same for BSDDB and for DBAPI.
2016-06-07 18:41:40 +01:00
Paul Franklin
042bb5e2c0 more report pylint improvements 2016-06-05 21:11:27 -07:00
Paul Franklin
21d02ad22c implement fetching sorted Person and Family handles in the proxy DBs 2016-06-04 21:36:08 -07:00
Paul Franklin
84130d221f increase pylint score of proxybase.py from 6.41 to 8.22 2016-06-04 21:19:36 -07:00
Nick Hall
d2fbee8852 Add unit tests for media and note rules 2016-06-04 22:13:04 +01:00
Doug Blank
283ac0f8bb Moved LRU to gramps.gen.utils 2016-06-02 16:41:00 -04:00
Doug Blank
f165e04436 Merge pull request #159 from prculley/test_imports
Test imports
2016-06-02 14:39:45 -04:00
prculley
84e12210cc more pylint and uncompressed .gramps 2016-06-02 11:36:53 -05:00
Nick Hall
0801ef1b30 9472: Use first matching name when generating place titles 2016-05-30 23:05:17 +01:00
prculley
5182055c1f Merge remote-tracking branch 'upstream/master' into test_imports 2016-05-30 08:50:02 -05:00
Nick Hall
91b40c88bf Update deprecated priority constants 2016-05-27 22:15:27 +01:00
Paul Franklin
c469240c65 9450: LivingProxyDB leaves data in when back references followed 2016-05-27 09:13:11 -07:00
Doug Blank
ef0b2b8aea 9450: LivingProxyDB leaves data in when back references followed 2016-05-27 09:10:50 -07:00
prculley
08c99f2929 Merge remote-tracking branch 'upstream/master' into test_imports 2016-05-26 14:02:18 -05:00
prculley
8cda91a377 moved test directory, tweaked tests, and fixes 2016-05-26 11:22:06 -05:00
Doug Blank
1611340dca CacheProxyDb: use getattr() 2016-05-26 08:36:27 -04:00
Doug Blank
3af7ff4e9b Spelling error 2016-05-25 14:41:07 -04:00
Doug Blank
758d63c0fa Remove trailing whitespace 2016-05-25 12:56:33 -04:00
Doug Blank
7649f03c70 CacheProxyDb: adds LRU cache for handle lookups 2016-05-25 12:39:48 -04:00
Nick Hall
7ea7850331 Tidy up whitespace 2016-05-25 17:27:23 +01:00
prculley
7646d41774 Merge remote-tracking branch 'upstream/master' into test_imports 2016-05-24 14:44:08 -05:00
Nick Hall
4413c7c88b Add extra unit test for IsEnclosedBy rule 2016-05-24 16:15:46 +01:00
prculley
7a33b08185 Prototype of test imports module and associated tests 2016-05-23 15:36:52 -05:00
Nick Hall
23a0a492d4 9427: Add inclusive option to IsEnclosedBy rule 2016-05-23 15:36:52 -05:00
Nick Hall
6c2eac9e05 9427: Add inclusive option to IsEnclosedBy rule 2016-05-23 15:20:37 +01:00
Doug Blank
55d2141476 9465: DB-API: duplicate note ID 2016-05-22 07:25:23 -04:00
Nick Hall
15fcf1ed85 Remove Django specific references from docstrings 2016-05-18 15:47:57 +01:00
Nick Hall
fe6c5895b2 Improve pylint score of some new files
The programming guidelines require that new files have a pylint
score of 9.0 or greater.
2016-05-17 22:36:40 +01:00
Nick Hall
7b22c6af1b Remove trailing whitespace 2016-05-16 21:17:11 +01:00
Sam Manzi
7ade71945e Merge pull request #145 from prculley/bug9415
Bug 9415 Place Alt Names gets duplicated entries
2016-05-13 08:57:37 +10:00
Doug Blank
aa9246dde4 DB-API: ensure that undo/redo operations are in a low-level db transaction 2016-05-12 16:33:52 -04:00
prculley
df18fdebea Bug 9415 Place Alt Names gets duplicated entries 2016-05-12 09:36:28 -05:00
Doug Blank
636903bbc7 Merge pull request #141 from prculley/bug9414
Bug 9414 fix empty Place Alternate Names on import
2016-05-11 16:39:49 -04:00
prculley
c7914367b7 Bug 9448: Merge unit test for PlaceCheck not working correctly 2016-05-11 10:18:27 -05:00
prculley
e2b781a221 Bug 9414 fix empty Place Alternate Names on import 2016-05-11 09:50:07 -05:00
Doug Blank
9424539930 Person: add aliases for field names 2016-05-10 12:26:46 -04:00
Nick Hall
e76a27ddd3 Remove trailing whitespace 2016-05-10 16:52:57 +01:00
Nick Hall
f688a96e9a Tidy up class definitions
All python3 classes are new-style classes.  It is no longer
necessary to inherit from object.
2016-05-10 16:06:49 +01:00
Doug Blank
1a05aadca7 Date: add property year 2016-05-09 07:58:45 -04:00
Doug Blank
af487de69a 9441: DB-API with sqlite doesn't unlock the table when txn.batch = True 2016-05-07 13:46:29 -04:00
Doug Blank
ac0fbecc4b Remove accidentally added code, 2 2016-05-07 13:09:47 -04:00
Doug Blank
3ce8c12ae6 Place schema: wrong type for alt_names 2016-05-07 12:28:20 -04:00
Doug Blank
3e827c230e QuerySet: fix removing tag logic 2016-05-07 08:17:19 -04:00
Ondrej Krc-Jediny
d9154a75e1 7907 LDS ordinance statuses enhancement 2016-05-07 15:18:54 +10:00
SNoiraud
c0203ec342 4892: Add a Webcal link to Narrative pages 2016-05-06 22:53:07 +02:00
Doug Blank
6d95cd5dd3 Where: work with methods, ala Rules 2016-05-06 10:04:24 -04:00
Doug Blank
61c2ed3240 QuerySet tag(): remove batch; allow tag removal; test 2016-05-06 08:14:54 -04:00
Doug Blank
47cee7bb1e DbPythonError: adjust message regarding Python 2016-05-04 16:31:37 -04:00
Doug Blank
bfe900f7cf 9429: Text metadata (i.e. *.txt files) implemented for DBAPI backends.
This saves and tests python and schema versions so that this code
won't load future versions of either.
2016-05-04 12:23:26 -04:00
Doug Blank
bd00f36ff1 9433: empty media path must be interpreted as /home/dblank in DB-API 2016-05-04 10:30:17 -04:00
Doug Blank
c3874bdaed 4442: Add a Button to close the current database; refresh gramplets when no db 2016-05-03 20:31:20 -04:00
Doug Blank
331e6d4668 Database: add reload method; re-expand fields before reindexing 2016-05-03 08:07:42 -04:00
Doug Blank
7e570b6724 Fixes for field-based schema and labels
* moved methods to TableObject from PrimaryObj (to include Tag)
* added missing scheme, labels to citation, place, repo, and source
* minor bug fixes
2016-05-02 14:32:50 -04:00
Doug Blank
c8f3c25d84 Fixed get_person_handles(sort_index=True)
Before did not include first_name in sorting (thanks Paul!)

Also added rebuilding all order_by fields when rebuilding
secondaries.
2016-05-01 16:47:58 -04:00
Doug Blank
db6cd7e318 Field name lookup: improve error message 2016-04-30 10:47:50 -04:00
Doug Blank
8f77d6db9f 1144: Auto backup at exit, but not when opening another database 2016-04-30 10:25:09 -04:00
Doug Blank
9690c20cbc InMemoryDB: provide None for dbname 2016-04-30 10:05:17 -04:00
Doug Blank
cec4bd7a15 Merge pull request #124 from sam-m888/MissedWithOpen
Missed 'open' statements
2016-04-30 02:56:10 -04:00
Doug Blank
28e99008e0 9332: gramps_connect: Edit/Save Person 2016-04-29 17:20:19 -04:00
Doug Blank
33f8aa4d3d 2092: Problems when no database is open 2016-04-28 21:06:43 -04:00
Paul Franklin
af995ad48b tweak "living people" option (change option report output) 2016-04-28 09:22:08 -07:00
Paul Franklin
674571f3e3 tweak "living people" option (change choice strings) 2016-04-28 06:29:12 -07:00
Paul Franklin
2ac7c5baa7 add deferred translation to "living people" option 2016-04-27 22:27:25 -07:00