mtgjson / mtgjson3

MTGJSON repository for Magic Cards
http://mtgjson.com
Other
548 stars 102 forks source link

Full Rewrite #578

Closed ZeldaZach closed 5 years ago

ZeldaZach commented 6 years ago

This summer, I plan on re-writing the entire project (MTGJSONv4) using Python3 over NodeJS9.

This is for sustainability, as there are more python devs than node devs and it'll be easier to manage the system and make changes on my side.

I will be making a new project in the near future and people are free to open tickets/PRs there if they'd like to make changes. Eventually, it will be rolled back to this URL (with this current project being archived).

If there are any questions, comments, or concerns, please feel free to let me know before I get started. I'll be planning out everything (probably on this ticket) before I get started with working so I can be sure I do it right the first time (🤞)

fenhl commented 6 years ago

Some things to consider:

tooomm commented 6 years ago

Also, why don't we run the webpage from github pages? There is https support for custom domains now, too! That would makes deploying easier and updates to files and the changelog are instantly live with each merge for example.

Could have opened an issue on its own, but thought it might fit the "big change" ideas around a rewrite.

silasary commented 6 years ago

That runs counter to the "No output in the repo". But it's an interesting concept.

Note that Github Pages has some issues, including a lack of header control and really short (ten (10) minute) cache expiry.

fenhl commented 6 years ago

We could run the website as a separate repo which is automatically maintained by a bot that just builds the latest release (and maybe also master, we could use something like beta.mtgjson.com for that). This would give us easy access to past versions for adding manual patches when Gatherer introduces new errors.

I'd still recommend against using GitHub Pages though for the reasons @silasary gave since we do have our own server.

gwax commented 6 years ago

I think it's worth thinking of mtgjson as three separate projects:

  1. A downloadable set of .json files containing information about all Magic cards.
  2. A set of tools for maintaining the aforementioned .json files.
  3. A website for presenting and describing the .json files and maintenance tools.

We have run into a decent number of historical problems because we conflate the three. Personally, I would like to see each of these treated independently.

If we focus some energy on making sure that the output of the tools is consistent, we can have useful diffs for the .json files and even include some sanity checks to avoid some of the more annoying data regressions we've seen in the past. Staying away from auto-building everything will be safer and prevent data releases that don't actually change anything just because the code has been updated.

tooomm commented 6 years ago

In the v4 repo there is also a list of planned changes and further goals which should get incorporated in a rewrite as well: https://github.com/mtgjson/mtgjson4#new-features-and-changes https://github.com/mtgjson/mtgjson4_temporary#new-features-and-changes

As well as the "v4" milestone issues: https://github.com/mtgjson/mtgjson/milestone/3

gwax commented 6 years ago

Moving forward, we should consider what relationship, if any, we want to have with Scryfall.

In many ways, Scryfall provides more reliable data than Gatherer, magiccards.info, or any of the other sources of Magic data. If I'm being honest, it's more reliable than mtgjson tends to be.

There are downsides to Scryfall: it's rate limited, it doesn't work offline, it tends to have more data than most people want, and, worst of all, you cannot grab a single, zipped file with everything.

I have considered the idea of building a scraper for Scryfall that generates mtgjson style files and there are only a few ways that would fall short of mtgjson: mostly lack of links to Gatherer, magiccards.info, and some other sites.

In constructing a v4 rewrite, it might be easiest to start with a Scryfall downloader as a starting point and then adding Gatherer, magiccards.info, Librarities, and other sources of information as follow-up work.

ZeldaZach commented 6 years ago

I'll reach out to them and see what we can do

adback03 commented 6 years ago

Also, I'm more than happy to have mtgjson and my project (https://magicthegathering.io) get more closely related. That is, have mtgjson and my api stay even closer (or exact) in terms of data and json structure. A single service providing both a downloadable dataset and an API would be pretty awesome for users.

yeago commented 6 years ago

i have been struggling whether to consider promos as sets or as statuses on a card. there's merits to both, but most projects tend to create them as sets for now. but i wonder if this will break down if wizards begins re-releasing more and more conflicting cards within a set, such as several prerelease promos of the same rare

lincolnthree commented 6 years ago

This already breaks down slightly because we've seen things like:

Search for Azcanta:

Fatal Push:

lincolnthree commented 6 years ago

Statuses would also need to be maintained on very copy of a card, and it would get particularly confusing as cards are re-printed in new sets, I think.

yeago commented 6 years ago

how would ya'll handle a card released as a pre-release promo twice?

silasary commented 6 years ago

They would be two different printings (with different date stamps), so I'd list them twice.

yeago commented 6 years ago

At that point, does there exist any connection to the original set it was (pre..)released in?

lincolnthree commented 6 years ago

Perhaps a "promotional=true" flag and then

"id":"UNIQUE_ID_OF_THIS_PROMO",
"promotional":true,
"promotionalSource": "ID_OF_ORIGINAL_CARD", 
"promotionalType":"FNM" [or "prerelease", "media", "buy-a-box"] 
// then normal fields
"name":"Island...etc"
"setcode":"DOM"

within the same setcode?

yeago commented 6 years ago

i think that would work for (at least...) promos currently in the 'prerelease' set-based dumping ground. i don't know the behavior of wizard for other promo types.

edit: at tappedout, we have foil: [foil / pre] and the rest are promo sets

theelk801 commented 6 years ago

Hi, I'd just like to volunteer to help with this if help is still needed.

ZeldaZach commented 6 years ago

We’re on Discord if you’d like to join. Check out the new repo mtgjson-python and come chat

Thanks, Zach

On Jul 6, 2018, at 2:26 PM, theelk801 notifications@github.com wrote:

Hi, I'd just like to volunteer to help with this if help is still needed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ZeldaZach commented 5 years ago

http://github.com/mtgjson/mtgjson4 :)