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

Move modules to pouchdb org #232

Closed
nolanlawson opened this issue Aug 12, 2015 · 21 comments
Closed

Move modules to pouchdb org #232

nolanlawson opened this issue Aug 12, 2015 · 21 comments

Comments

@nolanlawson
Copy link
Member

@marten-de-vries I really appreciate the modularization you've done with PouchDB Server, but it's a bit difficult to collaborate because most of those modules are on Bazaar. It would be a bit easier for the community if those modules were under the pouchdb organization, like express-pouchdb and pouchdb-server.

(I know I know, Github is a total monoculture these days, and it's a shame we took something beautiful and decentralized like Git and centralized it, but this just seems to be the way OSS is done nowadays, sadly. 😛)

Any chance of moving them over here? Also as a first step, it would be helpful to add me and daleharvey as npm owners, so that we can at least publish that way. :)

@gr2m
Copy link
Contributor

gr2m commented Aug 12, 2015

That would be awesome! I'd be more than happy to help with the migration!

@NickColley
Copy link
Contributor

👍 so many good projects! Willing to help out any doc changes etc :)

@marten-de-vries
Copy link
Member

I already switched the Launchpad project to git, but I can see that's still too large a threshold now. I'll start moving them to Github. As for adding others as npm authors, that should've happened long ago. On that too.

@marten-de-vries
Copy link
Member

The todo list. PRs welcome for documentation & test suite as soon as the respective projects for which that needs to be done are moved:

Moved to Github

(all modules have been moved)

In pouchdb org & npm rights

These projects are in the pouchdb organization on Github & have @nolanlawson and @daleharvey added as package maintainers.

(done for all the projects)

Documentation rst -> markdown and inside README.md

Documentation is currently in: https://git.launchpad.net/python-pouchdb/tree/docs/js-plugins.rst?id=d5a4a276dca41b36231dc3a569213931125ff4e5 in the restructured text format. The docs for the plugins need to be moved towards the README.md file, meaning the text format needs to be converted. Also, the docs need to be checked + updated where necessary in this step.

Tests Python -> JS

Tests currently in: https://git.launchpad.net/python-pouchdb/tree/pouchdb/tests/plugins.py?id=d5a4a276dca41b36231dc3a569213931125ff4e5 . The test environment can be setup using pouchdb-plugin-helper. It consists of: eslint (including config), babel (es6 + es7 async/await), mocha (test runner), istanbul (coverage), chai (assertions) and some easily requirable helper functions. See the pouchdb-plugin-helper docs and how it's used in pouchdb-auth for more info.

Add CI

The following modules don't have a test suite of their own, but before moving to github were 100% covered by the other modules' tests. At the very least they should run a linter on Travis, and preferably also those of the above ported tests that made them be covered for 100%. pouchdb-plugin-helper should simplify that.

  • couchdb-eval
  • couchdb-objects
  • couchdb-render
  • couchdb-resp-completer
  • header-case-normalizer (does have its own tests with 100% coverage, but those should be run)
  • pouchdb-bulkdocs-wrapper
  • pouchdb-changeslike-wrapper
  • pouchdb-plugin-error
  • pouchdb-req-http-query
  • pouchdb-route
  • pouchdb-system-db
  • pouchdb-wrappers
  • promise-nodify

Add documentation

These projects barely have a README.md doc of their own. But they should have. At least an example call for every function:

  • couchdb-eval
  • couchdb-objects
  • couchdb-render
  • couchdb-resp-completer
  • pouchdb-bulkdocs-wrapper <- important!
  • pouchdb-changeslike-wrapper <- important!
  • pouchdb-plugin-error
  • pouchdb-req-http-query
  • pouchdb-route
  • pouchdb-system-db
  • pouchdb-wrappers <- important!
  • promise-nodify

Migrate relevant bugs and blueprints

@nolanlawson
Copy link
Member Author

Thanks a lot @marten-de-vries; awesome work and love the transparency about everything you're doing. :)

@marten-de-vries
Copy link
Member

Ok, first step of the migration is done. Now it's just making the projects more github-friendly. I.e., moving docs to README.md files, porting tests to JS, enabling Travis, adding Travis + dependency monitor badges, etc.

@gr2m
Copy link
Contributor

gr2m commented Aug 19, 2015

@marten-de-vries thanks so much, this is awesome!

@gr2m
Copy link
Contributor

gr2m commented Aug 20, 2015

@marten-de-vries let me know if I can help with the tests. I can also setup semantic-release if you are interested, that would mean that new releases get published automatically, based on very simple git message conventions, and it would also automatically create git tags & releases with changelogs. We are doing it all over Hoodie right now and are very happy with it. It's really, really cool, worth checking out if you haven't yet

@marten-de-vries
Copy link
Member

Never used semantic-release before, but it looks handy. Help with moving the docs + tests would certainly be welcome. I'm wondering though if it's worth it to make some kind of npm package that shares most of the test infrastructure of all these new modules, so we don't have to copy/paste files all the time.

package.json's would become something like:

"script": {
  "test": "./node_modules/.bin/pouchdb-plugin-helper test",
   ...
},
"devDependencies": {
  "pouchdb-plugin-helper": "^1.0.0"
  // no other dependencies necessary
}

etc. All coverage, test & jshint config could then stay in one place. Additional commands could be install-travis-file to copy the 'master' travis file directly into the current project, etc. Maybe a bages-code command to generate travis/david-dm badges for in README.md, etc. Probably worth the time it takes to write it for such a bunch of projects. Also, it could be reused for new plugins.

@gr2m
Copy link
Contributor

gr2m commented Aug 22, 2015

For "jshint config", or solution at Hoodie is to try to avoid config files whenever possible, which is why we now use https://www.npmjs.com/package/standard everywhere. It's really cool once you get used to its conventions, it's just another thing you can stop thinking about :)

For the .travis bit, semantic-release-cli sets it up for you, with a quick wizzard. It's really cool :)

And for the badges, yeah, you could write a tool :) But you could also setup one repo with clear commit messages, and then ask for help, so you don't need to do it all on your own. People like me would take the opportunity to get involved into a project with simple things like that :)

@nolanlawson
Copy link
Member Author

I'm wondering though if it's worth it to make some kind of npm package that shares most of the test infrastructure of all these new modules, so we don't have to copy/paste files all the time.

I was actually looking into @bahmutov's dont-break recently in order to fix this. Seems doable, although there's one bug that needs to be fixed first, which is caused by leveldown being slow as molasses to download: bahmutov/dont-break#26

@marten-de-vries
Copy link
Member

@nolanlawson dont-break seems interesting too, but what I meant was (for a start) just not having to replicate the whole istanbul/mocha/chai/pouchdb config all the time.

Since I also want ES7 async/await in the tests to make porting from Python easier, I went ahead and started doing exactly that today. Should be able to publish that soon.

@gr2m ES6/7 also makes using standard impossible, but I have a working centralized eslint config in the same helper module now.

@nolanlawson
Copy link
Member Author

@marten-de-vries that's pretty neat; I love async/await. :) Also yeah, standard looks nice and I'll probably use it for my next project, but I'm not in a hurry to upgrade existing projects.

As for dont-break, it indeed allows us to avoid replicating the entire testing setup of a target dependent; it just npm installs the dependent, links your project to that project, and then runs that project's tests.

@marten-de-vries
Copy link
Member

https://github.com/pouchdb/pouchdb-plugin-helper ; it's incomplete and probably not flexible enough to support at least every module I moved to github as part of this PR, but it's good enough for a 0.1.0 release & to be used by pouchdb-auth (Which I'm planning to push next, as soon as I figure an initial Travis + semantic-release setup out). Afterwards, the whole infrastructure is ready and the porting can begin.

@marten-de-vries
Copy link
Member

I just pushed pouchdb-auth's tests to Github. It should be a good example on how to port tests for the remaining modules. Any help is welcome! I didn't yet set up semantic-release, but that shouldn't be hard to add in the future.

@nolanlawson
Copy link
Member Author

This is mostly done, I'm happy to close this issue. Thanks @marten-de-vries !

marten-de-vries added a commit to pouchdb/pouchdb-validation that referenced this issue Dec 19, 2015
marten-de-vries added a commit to pouchdb/pouchdb-validation that referenced this issue Dec 20, 2015
marten-de-vries added a commit to pouchdb/pouchdb-validation that referenced this issue Dec 20, 2015
marten-de-vries added a commit to pouchdb/pouchdb-security that referenced this issue Dec 20, 2015
@marten-de-vries
Copy link
Member

I'm working on this again this week, so I'm opening it again to make bookkeeping easier (see the task lists a few comments above). I'll re-close it if it stalls again.

If anyone wants to help, adopt one of the PR(s) below, or choose one of projects under 'add documentation' above and write some docs for it.

If no one helps, it'll be finished as well, it'll just take a bit longer. ;)

@gr2m
Copy link
Contributor

gr2m commented Dec 20, 2015

Thanks @marten-de-vries! I’m heads down on shipping Hoodie, otherwise I’d help myself, but I’ll spread the word, maybe someone else finds time to help

marten-de-vries added a commit to pouchdb/pouchdb-update that referenced this issue Dec 21, 2015
marten-de-vries added a commit to pouchdb/pouchdb-list that referenced this issue Dec 21, 2015
marten-de-vries added a commit to pouchdb/pouchdb-update that referenced this issue Dec 21, 2015
marten-de-vries added a commit to pouchdb/pouchdb-show that referenced this issue Dec 23, 2015
marten-de-vries added a commit to pouchdb/pouchdb-vhost that referenced this issue Dec 28, 2015
marten-de-vries added a commit to pouchdb/pouchdb-security that referenced this issue Dec 28, 2015
marten-de-vries added a commit to pouchdb/pouchdb-replicator that referenced this issue Dec 28, 2015
marten-de-vries added a commit to marten-de-vries/pouchdb-seamless-auth that referenced this issue Dec 28, 2015
marten-de-vries added a commit to pouchdb/pouchdb-rewrite that referenced this issue Dec 28, 2015
marten-de-vries added a commit to pouchdb/pouchdb-list that referenced this issue Dec 29, 2015
marten-de-vries added a commit to pouchdb/pouchdb-update that referenced this issue Dec 29, 2015
marten-de-vries added a commit to pouchdb/pouchdb-show that referenced this issue Dec 29, 2015
marten-de-vries added a commit to pouchdb/pouchdb-rewrite that referenced this issue Dec 29, 2015
@marten-de-vries
Copy link
Member

All the relevant Python code has now been ported. That leaves updating documentation.

@gr2m
Copy link
Contributor

gr2m commented Dec 29, 2015

👏

marten-de-vries added a commit to pouchdb/pouchdb-list that referenced this issue Feb 4, 2016
@marten-de-vries
Copy link
Member

Reclosing this issue. I'm going to merge the WIP PRs, then open follow up issues for the docs. Seeing raw reStructuredText in the README file is still an improvement over the current files, and it might add some urgency to porting that over anyway, which would not be a bad thing.

marten-de-vries added a commit to pouchdb/pouchdb-security that referenced this issue Feb 5, 2016
marten-de-vries added a commit to pouchdb/pouchdb-update that referenced this issue Feb 5, 2016
marten-de-vries added a commit to pouchdb/pouchdb-show that referenced this issue Feb 5, 2016
marten-de-vries added a commit to pouchdb/pouchdb-vhost that referenced this issue Feb 5, 2016
marten-de-vries added a commit to pouchdb/pouchdb-replicator that referenced this issue Feb 5, 2016
marten-de-vries added a commit to pouchdb/pouchdb-rewrite that referenced this issue Feb 5, 2016
nolanlawson pushed a commit to pouchdb/pouchdb-server that referenced this issue Feb 22, 2017
* PouchDB plugin updates. (new replicator plug-in initial code - pretty much untested). Also validation update (will become 1.1.0).

* A bunch of JS improvements (incl. replicator module (experimental)) & some improvements to coroutines (nesting them, most notably)

* Improved docs + JS

* Improvements to replicator + auth; documentation translations

* Smaller JS modules.

* Makes _users and _replicator databases system databases (sets extra protections for them like in CouchDB). No regressions, but JS test coverage isn't complete yet.

* JS is all at 1.0.0 at least now & published.

* Fixed a bug in pouchdb-wrappers

* pouchdb-replicator update.

* Improvements to pouchdb-replicator

* Plug-in improvements

* 2.1.2; moved to github

* (pouchdb/express-pouchdb#232) - Modernize pouchdb-replicator

* 2.1.3

* chore(package): update dependencies

http:https://greenkeeper.io/

* chore(package): update pouchdb-plugin-helper to version 3.0.0

http:https://greenkeeper.io/

* chore(package): update random-uuid-v4 to version 0.0.6

https://greenkeeper.io/

* add pouchdb-replicator to the repo

* convert tests to es2015

* remove packages
gr2m pushed a commit to pouchdb/pouchdb-server that referenced this issue Jul 3, 2017
gr2m pushed a commit to pouchdb/pouchdb-server that referenced this issue Jul 3, 2017
gr2m pushed a commit to pouchdb/pouchdb-server that referenced this issue Jul 3, 2017
gr2m pushed a commit to pouchdb/pouchdb-server that referenced this issue Jul 3, 2017
gr2m pushed a commit to pouchdb/pouchdb-server that referenced this issue Jul 3, 2017
gr2m pushed a commit to pouchdb/pouchdb-server that referenced this issue Jul 4, 2017
the-t-in-rtf pushed a commit to the-t-in-rtf/express-pouchdb that referenced this issue Nov 15, 2017
This lets you pass `debug` or mocha flags when running unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants