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

Create a CSV from a set of applications #352

Merged
merged 4 commits into from
Oct 27, 2014
Merged

Conversation

richard-jones
Copy link
Contributor

No description provided.

@emanuil-tolev
Copy link
Contributor

The latest build about this seems to be failing https://drone.io/github.com/DOAJ/doaj/105 ?

…un in pycharm), then revert change to get_columber in csv wrapper, and update corresponding usage in get_column
@richard-jones
Copy link
Contributor Author

build is now fixed - minor change to what gets returned by get_colnumber had affected the test.

@Steven-Eardley
Copy link
Contributor

@richard-jones, how do your created CSVs (via portality/reapplication.py) relate to BulkReapplication() objects (from portality/models/reapplication.py)? Will the CSVs be made using the latter model, or will the model be created at the same time from the same information?

@Steven-Eardley
Copy link
Contributor

I ask because we discussed tying them together by naming the CSV file with the Bulk_Reapplication's ID, plus it contains the 'friendly display name' for the spreadsheet.

@richard-jones
Copy link
Contributor Author

portality.reapplication.make_csv is just a utility for turning a bunch of model.Suggestion objects into a CSV at some given location. So, it's up to some calling code - most likely in the script which initialises the reapplication overall (cc @nimphal / @emanuil-tolev for issue #309 ) - to utilise it.

I'm imagining something like:

reapps = []
for journal in journals_for_this_publisher:
    reapps.append(journal.make_reapplication())

bulkreapp = models.BulkReapplication()
bulkreapp.spreadsheet_name = publisher + ".csv"
bulkreapp.make_id() # or however this is done
reapplication.make_csv(app.config.get("BULK_REAPP_PATH") + bulkreapp.id + ".csv", reapps)
bulkreapp.save()

emanuil-tolev pushed a commit that referenced this pull request Oct 27, 2014
Create a CSV from a set of applications
@emanuil-tolev emanuil-tolev merged commit fa23f6d into develop Oct 27, 2014
@emanuil-tolev
Copy link
Contributor

@richard-jones I'm not deleting the feature/reapp_csv branch yet as you may need to rebase your csv validate branch on it again, to include this test fix you just did. I'll pick it up and delete it at some point in the future. once the csv work is complete.

@Steven-Eardley Steven-Eardley deleted the feature/reapp_csv branch November 6, 2014 19:10
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

Successfully merging this pull request may close these issues.

3 participants